fix: forward build.warnings config to external subcommands#17035
fix: forward build.warnings config to external subcommands#17035raushan728 wants to merge 3 commits into
build.warnings config to external subcommands#17035Conversation
|
r? @weihanglo rustbot has assigned @weihanglo. Use Why was this reviewer chosen?The reviewer was selected based on:
|
| None => ProcessBuilder::new(&cargo_exe), | ||
| }; | ||
| cmd.env(cargo::CARGO_ENV, cargo_exe).args(args); | ||
| if let Ok(handling) = gctx.warning_handling() { |
There was a problem hiding this comment.
This seems reasonable and useful enough to special-case it, though we might want to discuss in team meeting
There was a problem hiding this comment.
@epage
It seems worth to me as it is pretty common with clippy in CI we set env var for overrides. However, I don't know if we want to restrict this to clippy-like binary only to avoid over-expanding the stable interface to all external commands
|
Reminder, once the PR becomes ready for a review, use |
d692f70 to
37b23cf
Compare
|
@rustbot ready |
|
This is a more broad problem than just this case. Should we be handling this in a one-off manner? |
|
This is a broader issue. Open to a generic approach if the team prefers it. |
|
I personally would only handle this generically or not at all. What we should do should be discussed in an Issue. Do ue have an existing one for this class of problem? If not, should we tranfer the clippy issue? |
|
I came across rust-lang/rust-clippy#16963 and wasn't aware of an existing cargo issue for this. Transferring that issue here seems like the right move to continue the discussion. |
|
#11390 is our issue for this. It might be good to keep an issue on clippy's side in case they need to make changes to adapt to this. |
cargo --config='build.warnings="deny"' clippysilently exits 0 even when warnings are present. Outer cargo consumes--configbut never forwards it to external subcommand binaries.Forwards resolved
build.warningsasCARGO_BUILD_WARNINGSenv var when spawning external subcommands.Fixes rust-lang/rust-clippy#16963