-
Notifications
You must be signed in to change notification settings - Fork 304
feat: enhance pixi task add CLI command to support issue #3828 #3884
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
base: main
Are you sure you want to change the base?
feat: enhance pixi task add CLI command to support issue #3828 #3884
Conversation
…pends-on parsing with environment and arguments - Add task arguments with default values support - Enable alias creation via depends-on without commands - Add inputs and outputs glob patterns support - Add validation to ensure either commands or dependencies are provided - Maintain backward compatibility with existing functionality - Fix clippy linting issues and update tests - Fixes prefix-dev#3828
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.
Great additions! It's not yet hooked up properly as i found out with the inputs
and outputs
. I really like the idea of the splitting you implemented on the args and depends on!
Could you add all possible new commands as an integration test?
The best location for that would be: tests/integration_python/test_main_cli.py
.
src/cli/task.rs
Outdated
@@ -212,8 +297,8 @@ impl From<AddArgs> for Task { | |||
Self::Execute(Box::new(Execute { | |||
cmd: CmdArgs::Single(cmd_args.into()), | |||
depends_on, | |||
inputs: None, | |||
outputs: None, | |||
inputs: value.inputs, |
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.
The inputs and outputs are not serialized when adding e.g.:
pixi task add test10 --inputs "*.rs" --outputs "target" echo hello
results in:
test10 = { cmd = "echo hello" }
I removed the I would like to converse about the listing of the inputs, maybe But I wasn't confident about that... |
Summary
This PR enhances the
pixi task add
CLI command to address all requirements from issue #3828.Changes Made
🔧 Enhanced CLI Features
task:env
andtask::arg1,arg2
formats--arg name
and--arg name=default
Inputs/outputs support:Removed to unblock PR--inputs "*.rs"
and--outputs "target/*"
--depends-on
without commands🔄 Backward Compatibility
✅ Testing
Example Usage
Partly resolves #3828