Skip to content

Cargo CLI parameters added #3677

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

Closed
wants to merge 1 commit into from
Closed

Conversation

kolipka
Copy link

@kolipka kolipka commented Feb 9, 2017

Proposition for discussion in issue #3646

Proposition for discussion in issue rust-lang#3646
@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @steveklabnik (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@alexcrichton
Copy link
Member

Thanks for the PR, but a change such as this I think definitely requires an RFC. There's a lot of unintended interactions with this feature and the rest of the CLI interface with Cargo, so I don't think that it's going to be so easy to add the feature. If you'd like assistance in writing an RFC though, please just let me know!

@kolipka
Copy link
Author

kolipka commented Feb 10, 2017

I would love to write RFC, if you can point me where to start I will do it.

@alexcrichton
Copy link
Member

Sure yeah, it would end up being a PR against this repo: https://github.com/rust-lang/rfcs

In general though you may wish to work through the design details first and I wouldn't mind taking a look ahead of time as well. I'm specifically worried about commands like cargo test and cargo run which already take arguments, so how would we know what arguments go to the build script? Additionally, how do we know which build script to send arguments to? Should we support sending arguments to more than one build script?

@kolipka
Copy link
Author

kolipka commented Feb 21, 2017

I had less time to spend on it, so sorry for delay.

  1. I am wrong and totally misunderstood docopt. It should be done exactly as cargo test and cargo run.
  2. For now I have no idea how to pass args to custom_build.rs. I think that all args should be considered as a part of configuration, so should end up in Config. I suspect it still qualify for RFC?

I think that only one build script should get arguments. When I call ./test.sh -a only test.sh will get -a argument. It will parse it and instrument it's dependencies in some way. When I want to instrument set of tools I will use environment variable (eg.: CC, CROSS_COMPILE).

@alexcrichton
Copy link
Member

Right my question is where are arguments even specified? For cargo test all extra arguments to Cargo are already specified as going to the test

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.

4 participants