-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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(task): dependencies #26467
Merged
Merged
feat(task): dependencies #26467
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bartlomieju
reviewed
Nov 14, 2024
bartlomieju
added a commit
that referenced
this pull request
Nov 16, 2024
This commit changes three aspects of `deno task`: 1. Tasks can now be written using object notation like so: ```jsonc { "tasks": { "foo": "deno run foo.js", "bar": { "command": "deno run bar.js" } } ``` 2. Support for comments for tasks is now removed. Comments above tasks will no longer be printed when running `deno task`. 3. Tasks written using object notation can have "description" field that replaces support for comments above tasks: ```jsonc { "tasks": { "bar": { "description": "This is a bar task" "command": "deno run bar.js" } } ``` ``` $ deno task Available tasks: - bar // This is a bar task deno run bar.js ``` Pulled most of the changes from #26467 to support "dependencies" in tasks. Additionally some cleanup was performed to make code easier to read. --------- Co-authored-by: David Sherret <[email protected]>
dsherret
commented
Nov 18, 2024
bartlomieju
reviewed
Nov 19, 2024
Comment on lines
+1
to
+6
Task e deno run e.js | ||
Running e | ||
[UNORDERED_START] | ||
Task b deno run b.js | ||
Running b | ||
Task d deno run d.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking we might want to show that this task is being run because it's a dependency of another task. Could be done in a follow up though.
bartlomieju
reviewed
Nov 19, 2024
bartlomieju
reviewed
Nov 19, 2024
bartlomieju
reviewed
Nov 19, 2024
marvinhagemeister
approved these changes
Nov 19, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds support for "dependencies" in
deno task
subcommand:Executing
deno task serve
will first executebuild
andgenerate
tasks(in parallel) and once both complete the
serve
task will be executed.Number of tasks run in parallel is equal to the no of cores on the machine,
and respects
DENO_JOBS
env var if one is specified.For follow up PRs:
../client:build
)files
andoutput
fields for better caching and coordinationPart of #26462