Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign updeny warnings only when compiling for tests #2622
Conversation
rust-highfive
assigned
huonw
Apr 26, 2016
This comment has been minimized.
This comment has been minimized.
rust-highfive
commented
Apr 26, 2016
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @huonw (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. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
So this is the simplest approach and needs upstream rust to use cap-lints. Another approach could be to never use |
This comment has been minimized.
This comment has been minimized.
|
Would this actually help the compiler? We always run |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
|
I'm not sure I understand, if we use |
This comment has been minimized.
This comment has been minimized.
|
Please see the issue rust-lang/rust/pull/33091 for context and also the wish expressed here rust-lang/rust#33091 (comment) With no deny in the regular build, lint changes will not break cargo. Thus we can accept using cap-lints warn in cargotest like @brson wishes. I think it makes sense. Alternatively, we can change cargo around to not use deny at all in the default build / test configuration and only enable it in cargo's CI. I thought it would be unbeautiful to add some configuration variable in cargo code just for that. |
This comment has been minimized.
This comment has been minimized.
|
Ok, sorted this out on IRC with @bluss. Specifically:
I think that basically only guaranteeing |
alexcrichton
closed this
Apr 27, 2016
This comment has been minimized.
This comment has been minimized.
|
I did mention the alternative above
from our discussion I think it's the best approach. |
This comment has been minimized.
This comment has been minimized.
|
In that sentence, CI is this repository's CI. |
This comment has been minimized.
This comment has been minimized.
|
Unfortunately that still wouldn't help landing changes in Cargo (as they'd still be blocked on broken lints) :( |
This comment has been minimized.
This comment has been minimized.
|
improved lints |
This comment has been minimized.
This comment has been minimized.
|
right! |
bluss commentedApr 26, 2016
deny warnings only when compiling for tests
This makes cargo forward-compatible with lint changes upstream in rust.
This relates to rust-lang/rust/pull/33091. This PR makes cargo never stop compiling from denied lints, but tests may still fail. This allows using
cap-lints warnsensibly in rust's cargotest, since we know it will not break cargo itself.