Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support task id entrypoints #9344

Merged
merged 5 commits into from
Oct 29, 2024

Conversation

chris-olszewski
Copy link
Member

Description

Currently if you run turbo cli#build you will get the following failure*:

Error:   × could not find task `cli#build` in project

*It works if you had "tasks": {"cli#build": {...}} in your root level turbo.json

After this PR, passing a fully qualified task id to run will now work, regardless of how the task definition is defined:

  • In the root turbo.json as build
  • In the root turbo.json as cli#build
  • In the cli workspace's turbo.json as build

The usage of # is safe here as you already have been unable to use # in a unqualified task name.

  • If you attempt to use a # in a task name in a workspace level turbo.json you will get an error about using package task syntax in a workspace file.
  • If you attempt to specify a task in the root turbo.json of the form foo#bar it will be read as the bar task in package foo
  • If you attempt to use foo#bar#baz as a task name in root turbo.json it will work currently with foo#bar#baz and after this PR it will continue to work

Testing Instructions

Added unit tests!

Manual verification by running turbo cli#build.

Copy link

vercel bot commented Oct 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 29, 2024 7:10pm
8 Skipped Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Oct 29, 2024 7:10pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Oct 29, 2024 7:10pm
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Oct 29, 2024 7:10pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Oct 29, 2024 7:10pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Oct 29, 2024 7:10pm
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Oct 29, 2024 7:10pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Oct 29, 2024 7:10pm
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Oct 29, 2024 7:10pm

Copy link
Contributor

@NicholasLYang NicholasLYang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only feedback is maybe add an integration test?

@chris-olszewski chris-olszewski enabled auto-merge (squash) October 29, 2024 19:21
@chris-olszewski chris-olszewski merged commit ba769dc into main Oct 29, 2024
39 checks passed
@chris-olszewski chris-olszewski deleted the olszewski/feat_support_task_id_entrypoint branch October 29, 2024 19:39
anthonyshew added a commit that referenced this pull request Nov 14, 2024
# DO MOT MERGE CONDITION

2.3 release

### Description

Documenting #9344.

### Testing Instructions

👀
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants