-
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
error when compiling with --allow warnings with certain targets #8010
Comments
Hm, that's a tricky one. The
This is required by Cargo in order to know which crate types are valid (and what their output names are). I don't have any good ideas on how to accommodate this. Some bad ones:
|
see rust-lang/cargo#8010 on why I removed RUSTFLAGS="-Awarnings"
If we had #8424, I wonder if we could still show that warning. |
This bug is quite annoying because I'm not sure how to work around it right now. Even when specifying the crate type I get the error:
The best I found so far is to just ignore all the output:
|
Is this really a Cargo issue? It looks like a rustc argument parsing issue to me. If you point me in the right direction, I would be happy to try to fix it since it currently affects Rustlings: rust-lang/rustlings#2036 |
As mentioned above, this isn't really easy to fix. I think we may need to transition to a JSON interface, and that isn't simple. What is your use case for |
My use case in Rustlings is that I run |
My use-case can most probably be done better. The idea is that I have exercises with |
This is a horrible hack, 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
This is a horrible hack, 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
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
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
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
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
### 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
Now that rust-lang/cargo#8010 has been fixed.
Now that rust-lang/cargo#8010 has been fixed.
When I set
RUSTFLAGS="--allow warnings"
and try tocargo build --target wasm32-unknown-unknown
I get the following error:rustc 1.43.0-nightly (564758c4c 2020-03-08)
cargo 1.43.0-nightly (bda5051 2020-03-02)
originally filed here: rust-lang/rust#70070
The text was updated successfully, but these errors were encountered: