-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
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
.