feat(warnings): add build.warnings option#14388
Merged
arlosi merged 3 commits intorust-lang:masterfrom Nov 9, 2024
Merged
Conversation
Collaborator
epage
reviewed
Aug 12, 2024
epage
reviewed
Aug 12, 2024
epage
reviewed
Aug 12, 2024
Contributor
|
☔ The latest upstream changes (presumably #14423) made this pull request unmergeable. Please resolve the merge conflicts. |
epage
reviewed
Sep 14, 2024
epage
reviewed
Sep 14, 2024
epage
reviewed
Sep 14, 2024
epage
reviewed
Sep 14, 2024
epage
reviewed
Sep 14, 2024
epage
reviewed
Sep 14, 2024
Contributor
|
Thanks for the updates! |
f364c80 to
6c80335
Compare
Contributor
|
☔ The latest upstream changes (presumably #14137) made this pull request unmergeable. Please resolve the merge conflicts. |
Muscraft
reviewed
Oct 15, 2024
Contributor
|
☔ The latest upstream changes (presumably #14743) made this pull request unmergeable. Please resolve the merge conflicts. |
epage
reviewed
Oct 29, 2024
epage
reviewed
Oct 29, 2024
epage
approved these changes
Nov 8, 2024
Contributor
epage
left a comment
There was a problem hiding this comment.
CI failure needs to be looked at. I'm assuming its unrelated
ehuss
reviewed
Nov 8, 2024
3 tasks
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 10, 2024
Update cargo 16 commits in 0310497822a7a673a330a5dd068b7aaa579a265e..4a2d8dc636445b276288543882e076f254b3ae95 2024-11-01 19:27:56 +0000 to 2024-11-09 19:10:33 +0000 - test: adjust `cargo_test_env` to unblock rust submodule update (rust-lang/cargo#14803) - feat(warnings): add build.warnings option (rust-lang/cargo#14388) - Revert "feat: Add `CARGO_RUSTC_CURRENT_DIR`" (rust-lang/cargo#14799) - CI: make the `lint-docs` job required (rust-lang/cargo#14797) - Switch CI from bors to merge queue (rust-lang/cargo#14718) - docs(test): Document Execs assertions based on port effort (rust-lang/cargo#14793) - fix(test): Make redactions consistent with snapbox (rust-lang/cargo#14790) - test(gc): Update remaining unordered tests to snapbox (rust-lang/cargo#14785) - Normalize the `target` paths (rust-lang/cargo#14497) - rustfix: replace special-case duplicate handling with error (rust-lang/cargo#14782) - test: Update some emaining unordered tests to snapbox (rust-lang/cargo#14781) - Change config paths to only check CARGO_HOME for cargo-script (rust-lang/cargo#14749) - Enable transfer feature in triagebot (rust-lang/cargo#14777) - Add transactional semantics to `rustfix` (rust-lang/cargo#14747) - doc: fix `GlobalContext` reference (rust-lang/cargo#14773) - chore: update handlebars to v6, fix build error (rust-lang/cargo#14772)
mati865
pushed a commit
to mati865/rust
that referenced
this pull request
Nov 12, 2024
Update cargo 16 commits in 0310497822a7a673a330a5dd068b7aaa579a265e..4a2d8dc636445b276288543882e076f254b3ae95 2024-11-01 19:27:56 +0000 to 2024-11-09 19:10:33 +0000 - test: adjust `cargo_test_env` to unblock rust submodule update (rust-lang/cargo#14803) - feat(warnings): add build.warnings option (rust-lang/cargo#14388) - Revert "feat: Add `CARGO_RUSTC_CURRENT_DIR`" (rust-lang/cargo#14799) - CI: make the `lint-docs` job required (rust-lang/cargo#14797) - Switch CI from bors to merge queue (rust-lang/cargo#14718) - docs(test): Document Execs assertions based on port effort (rust-lang/cargo#14793) - fix(test): Make redactions consistent with snapbox (rust-lang/cargo#14790) - test(gc): Update remaining unordered tests to snapbox (rust-lang/cargo#14785) - Normalize the `target` paths (rust-lang/cargo#14497) - rustfix: replace special-case duplicate handling with error (rust-lang/cargo#14782) - test: Update some emaining unordered tests to snapbox (rust-lang/cargo#14781) - Change config paths to only check CARGO_HOME for cargo-script (rust-lang/cargo#14749) - Enable transfer feature in triagebot (rust-lang/cargo#14777) - Add transactional semantics to `rustfix` (rust-lang/cargo#14747) - doc: fix `GlobalContext` reference (rust-lang/cargo#14773) - chore: update handlebars to v6, fix build error (rust-lang/cargo#14772)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR try to resolve?
Allows control over warnings via a new Cargo configuration option
build.warnings.The primary use case is wanting CI runs to deny warnings, while keeping them as warnings for local development. While this is currently possible by conditionally setting
RUSTFLAGSin CI, that approach is not available for projects that already use another mechanism for settingRUSTFLAGS, since the two would conflict. Additionally, we may in the future make this apply to more than warnings fromrustc.build.warningsconfig option.Option values:
denyemits an error if any warnings occurredwarnis the current existing behaviorallowhides the warningsThe option currently only applies to warnings coming from
rustc, however it's documented as allowing additional categories of warnings from Cargo to be added.Fixes #8424
Fixes #14258
How should we test and review this PR?
Tests are included in the PR. For local testing, after building
cargowith this PR, run