-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix: emit warnings as warnings when learning rust target info #15036
Merged
Conversation
This file contains 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
rustbot
added
A-cfg-expr
Area: Platform cfg expressions
A-infrastructure
Area: infrastructure around the cargo repo, ci, releases, etc.
A-testing-cargo-itself
Area: cargo's tests
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Jan 8, 2025
weihanglo
changed the title
test: show that -Awarnings fails target info probing
fix: emit warnings as warnings when learning rust target info
Jan 8, 2025
epage
reviewed
Jan 8, 2025
weihanglo
force-pushed
the
warn-on-warnings
branch
from
January 8, 2025 20:26
bcb5eeb
to
5992cc8
Compare
epage
reviewed
Jan 8, 2025
weihanglo
force-pushed
the
warn-on-warnings
branch
2 times, most recently
from
January 8, 2025 21:59
ce6f459
to
949e601
Compare
epage
approved these changes
Jan 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to merge when its ready
This will be resolved in the next commit
This is a horrible hack, It lets the rustc invocation for learning target info always emit warnings as warnings. But at least it unblocks people who pass `-Awarnings` via RUSTFLAGS. A long-term solution is a better interface between build systems and the compiler. See the discussion on Zulip: https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Improving.20communication.20interface.20between.20cargo.2Frustc Fixes rust-lang#8010
weihanglo
force-pushed
the
warn-on-warnings
branch
from
January 8, 2025 22:27
949e601
to
5e3558c
Compare
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 11, 2025
Update cargo 18 commits in fd784878cfa843e3e29a6654ecf564c62fae6735..088d496082726091024f1689c124a0c3dccbd775 2025-01-03 20:06:26 +0000 to 2025-01-10 20:10:21 +0000 - docs(reference): Fix PkgIdSpec kind docs (rust-lang/cargo#15049) - feat: Added warning when failing to update index cache (rust-lang/cargo#15014) - docs(ref): Fix the inverted logic about MSRV (rust-lang/cargo#15044) - chore(deps): update msrv (1 version) to v1.84 (rust-lang/cargo#15041) - Remove unnecessary into conversions (rust-lang/cargo#15042) - docs(contrib): Start guidelines for schema design (rust-lang/cargo#15037) - fix: emit warnings as warnings when learning rust target info (rust-lang/cargo#15036) - fix(schemas): Fix the `[lints]` JSON Schema (rust-lang/cargo#15035) - fix(schemas): Fix 'metadata' JSON Schema (rust-lang/cargo#15033) - shorten comment on Ord for SourceKind (rust-lang/cargo#15029) - Make `"C"` explicit in `extern "C"`. (rust-lang/cargo#15034) - simplify SourceID Ord/Eq (rust-lang/cargo#14980) - Setup cargo environment for `cargo rustc --print` (rust-lang/cargo#15026) - Avoid naming variables `str` (rust-lang/cargo#15025) - Bump to 0.87.0; update changelog (rust-lang/cargo#15022) - Update libgit2 to 1.9 (rust-lang/cargo#15018) - Remove condition on RUSTUP_WINDOWS_PATH_ADD_BIN (rust-lang/cargo#15017) - Fix https::self_signed_should_fail for macos (rust-lang/cargo#15016)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-cfg-expr
Area: Platform cfg expressions
A-infrastructure
Area: infrastructure around the cargo repo, ci, releases, etc.
A-testing-cargo-itself
Area: cargo's tests
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
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?
This is a horrible hack,
which lets the rustc invocation for learning target info always emit warnings as warnings.
But at least it unblocks people who pass
-Awarnings
via RUSTFLAGS.A long-term solution is a better interface
between build systems and the compiler.
See the discussion on Zulip:
https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Improving.20communication.20interface.20between.20cargo.2Frustc
Fixes #8010
How should we test and review this PR?
Ensure
CFG_DISABLE_CROSS_TESTS
is not set,and run
cargo t --test testsuite always_emit_warnings_as_warnings_when_learning_target_info
This also additionally adds
wasm32-unknown-unknown
target to Cargo's CI.Additional information