Commit 4d852f0
authored
fix(engine): no longer error if provided task is omitted by filter (#10051)
### Description
Fixes #9619
This PR makes it so we no longer error if the filter excludes a task
provided by the user. This is especially helpful when filters are not
static such as `--affected` or SCM based filters.
### Testing Instructions
Updated unit tests.
Before
```
# Task only defined on `@turbo/types`
[0 olszewski@macbookpro] /Users/olszewski/code/vercel/turborepo $ turbo copy-schema --filter=cli
WARNING No locally installed `turbo` found. Using version: 2.4.4.
turbo 2.4.4
× Missing tasks in project
╰─▶ × Could not find task `copy-schema` in project
# Task only defined at root
[1 olszewski@macbookpro] /Users/olszewski/code/vercel/turborepo $ turbo build check:toml --filter='!cli'
WARNING No locally installed `turbo` found. Using version: 2.4.4.
turbo 2.4.4
× Missing tasks in project
╰─▶ × Could not find task `check:toml` in project
```
After
```
# Task only defined on `@turbo/types`
[0 olszewski@macbookpro] /Users/olszewski/code/vercel/turborepo $ turbo_dev copy-schema --filter=cli
WARNING No locally installed `turbo` found. Using version: 2.4.4.
turbo 2.4.4
• Packages in scope: cli
• Running copy-schema in 1 packages
• Remote caching enabled
No tasks were executed as part of this run.
Tasks: 0 successful, 0 total
Cached: 0 cached, 0 total
Time: 113ms
# Task only defined at root
[0 olszewski@macbookpro] /Users/olszewski/code/vercel/turborepo $ turbo_dev check:toml --filter='!cli'
WARNING No locally installed `turbo` found. Using version: 2.4.4.
turbo 2.4.4
• Packages in scope: @turbo-internal/top-issues-gh-action, @turbo/benchmark, @turbo/codemod, @turbo/eslint-config, @turbo/exe-stub, @turbo/gen, @turbo/releaser, @turbo/telemetry, @turbo/test-utils, @turbo/tsconfig, @turbo/types, @turbo/utils, @turbo/workspaces, @turborepo-examples-tests/basic-npm, @turborepo-examples-tests/basic-pnpm, @turborepo-examples-tests/basic-yarn, @turborepo-examples-tests/kitchen-sink-npm, @turborepo-examples-tests/kitchen-sink-pnpm, @turborepo-examples-tests/kitchen-sink-yarn, @turborepo-examples-tests/non-monorepo-npm, @turborepo-examples-tests/non-monorepo-pnpm, @turborepo-examples-tests/non-monorepo-yarn, @turborepo-examples-tests/with-svelte-npm, @turborepo-examples-tests/with-svelte-pnpm, @turborepo-examples-tests/with-svelte-yarn, @turborepo-examples-tests/with-tailwind-npm, @turborepo-examples-tests/with-tailwind-pnpm, @turborepo-examples-tests/with-tailwind-yarn, cargo-sweep-action, create-turbo, eslint-config-turbo, eslint-plugin-turbo, prysk, turbo-ignore, turbo-vsc, turborepo-examples, turborepo-repository, turborepo-tests-helpers, turborepo-tests-integration
• Running check:toml in 39 packages
• Remote caching enabled
No tasks were executed as part of this run.
Tasks: 0 successful, 0 total
Cached: 0 cached, 0 total
Time: 123ms
```1 parent e85b0d3 commit 4d852f0
1 file changed
+102
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
262 | | - | |
| 262 | + | |
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
279 | 306 | | |
280 | 307 | | |
281 | 308 | | |
| |||
463 | 490 | | |
464 | 491 | | |
465 | 492 | | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
466 | 509 | | |
467 | | - | |
| 510 | + | |
| 511 | + | |
468 | 512 | | |
469 | 513 | | |
470 | 514 | | |
| |||
485 | 529 | | |
486 | 530 | | |
487 | 531 | | |
488 | | - | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
489 | 538 | | |
490 | 539 | | |
491 | 540 | | |
| |||
502 | 551 | | |
503 | 552 | | |
504 | 553 | | |
505 | | - | |
| 554 | + | |
506 | 555 | | |
507 | 556 | | |
508 | 557 | | |
| |||
788 | 837 | | |
789 | 838 | | |
790 | 839 | | |
791 | | - | |
| 840 | + | |
| 841 | + | |
792 | 842 | | |
793 | 843 | | |
794 | 844 | | |
| |||
1460 | 1510 | | |
1461 | 1511 | | |
1462 | 1512 | | |
1463 | | - | |
1464 | | - | |
1465 | | - | |
1466 | | - | |
1467 | | - | |
1468 | | - | |
| 1513 | + | |
1469 | 1514 | | |
1470 | | - | |
| 1515 | + | |
1471 | 1516 | | |
1472 | 1517 | | |
1473 | 1518 | | |
| |||
1505 | 1550 | | |
1506 | 1551 | | |
1507 | 1552 | | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
1508 | 1598 | | |
0 commit comments