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

--debug/--release should be accepted by run/build/install/test/... #6992

Closed
RalfJung opened this issue May 28, 2019 · 5 comments
Closed

--debug/--release should be accepted by run/build/install/test/... #6992

RalfJung opened this issue May 28, 2019 · 5 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@RalfJung
Copy link
Member

Describe the problem you are trying to solve

I am writing a script that wraps cargo, and lets the user pass flags to it. Per default I want everything to be done in release mode, but the user should be able to select debug mode.

Unfortunately, the way to do that is non-uniform: install defaults to release and can be passed --debug; build defaults to debug can can be passed --release. This all makes sense, but what is frustrating is that I cannot do install --release or build --debug, so now I need some complicated logic to strip away the --release flag when we are installing or the --debug flag when we are building.

Describe the solution you'd like

I'd like a consistent way to force debug/release builds across all cargo commands, mostly to avoid needlessly rebuilding stuff. So all applicable commands should accept --debug to do a debug build even if that is their default, and same for --release.

@RalfJung RalfJung added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label May 28, 2019
@RalfJung RalfJung changed the title --debug/--release shiuld be accepted by run/build/install/test/... --debug/--release should be accepted by run/build/install/test/... May 28, 2019
@ehuss
Copy link
Contributor

ehuss commented May 28, 2019

After custom named profiles is done (#6989), the intent is that --profile=release or --profile=debug will address this.

@RalfJung
Copy link
Member Author

So with that, install --profile=release would definitely be redundant, as would build --profile=debug?

@ehuss
Copy link
Contributor

ehuss commented May 28, 2019

Yes.

@RalfJung
Copy link
Member Author

That sounds great. :)

da-x added a commit to da-x/cargo that referenced this issue Jun 20, 2019
@ehuss
Copy link
Contributor

ehuss commented Jun 24, 2019

Closing in favor of the #6988 tracking issue.

@ehuss ehuss closed this as completed Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

No branches or pull requests

2 participants