-
Notifications
You must be signed in to change notification settings - Fork 70
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
0.6.9 fails to build on unstable-less nightly #120
Comments
This will also break everyone's builds using nighty if the feature ever changes. This is about a lint ans therefore purely internal, using it for everyone seems like a bad idea. Can you just use a feature flag instead that you can enable in your CI? |
I don't understand how it would break everyone's build on nightly, could you explain your reasoning please?
As best I can understand you're saying that it's important to you that we support a nightly toolchain without unstable features, is that correct? I wasn't aware of that use case so I used the nightly toolchain to test for support of unstable features. I'll look into this request in the coming week. |
Yes, I use this in CI on crates that only target the stable compiler as a way to help detect accidental breaking changes in the compiler before they make it to beta. Disabling nightly features is important for that usecase to avoid false positives from changes to unstable features that I don't care about. |
https://github.com/rust-lang/rust/blob/master/src/bootstrap/src/bin/rustc.rs
By this do you mean that you have a crate with a dependency on eyre that only targets the stable compiler? I hope that in the meantime you don't find any false positives from enabling nightly features! |
I guess in this case here it won't, if the feature is removed that should still just be a lint. But if this wasn't a lint but something that could change, then relying on it will break nightly builds if it does change, as we've recently seen with
You're looking in the wrong place, this is just a building-rustc-itself-internal-only binary. Build scripts are a cargo thing, not a rustc thing. As a rule of thumb, one should never look whether Thank you for the quick response! |
Yes, it's unlikely to be useful but this is where I saw the failure https://github.com/FerrisCraft/fc5-tool/actions/runs/6911230820/job/18805482969
There is still one case that could break this: if the lint is abandoned the feature-flag will be removed completely and builds will start failing with
|
Hey @Nemo157, did this test pass for you before 0.6.9? I've corrected the issue with rustdoc_missing_doc_code_examples and it looks like a probe for backtrace (a stable feature now i thought) enables the unstable feature
It appears that the anyhow, thiserror, and proc-macro crates do not support unstable-less nightly. We'd have to send quite a few fixes upstream to support this use case... unless, Maybe I could get around this by altering our compile test? Something like this seems to work.
I'm not confident, but I am concerned that this might not actually work in production though -- it'll satisfy tests, but my guess is our dependencies will still try to use those features if they detect nightly. Would you have the time to put the build through your CI if I sent it out? thanks, p.s. would you be opposed to an opt-out feature flag for unstable features in nightly? |
This change attempts to put unstable features behind an opt-in feature flag as requested by issue eyre-rs#120. Unstable lints and compile_test.rs are both gated by this feature which is added unconditionally to all CI that touches more than just stable. As expressed in issue eyre-rs#120, I have some concerns about *needing* to gate compile_test.rs behind feature = "unstable". I'm not certain that this unstable-less nightly eyre will work in production due to the reason that compile_test.rs fails: three of our dependencies, anyhow, thiserror, and proc-macro, all use a test for a nightly toolchain to gate unstable features. Maybe I'm wrong though and this change is sufficient!
This change attempts to put unstable features behind an opt-in feature flag as requested by issue eyre-rs#120. Unstable lints and compile_test.rs are both gated by this feature which is added unconditionally to all CI that touches more than just stable. As expressed in issue eyre-rs#120, I have some concerns about *needing* to gate compile_test.rs behind feature = "unstable". I'm not certain that this unstable-less nightly eyre will work in production due to the reason that compile_test.rs fails: three of our dependencies, anyhow, thiserror, and proc-macro, all use a test for a nightly toolchain to gate unstable features. Maybe I'm wrong though and this change is sufficient!
This change attempts to put unstable features behind an opt-in feature flag as requested by issue eyre-rs#120. Unstable lints and compile_test.rs are both gated by this feature which is added unconditionally to all CI that touches more than just stable. As expressed in issue eyre-rs#120, I have some concerns about *needing* to gate compile_test.rs behind feature = "unstable". I'm not certain that this unstable-less nightly eyre will work in production due to the reason that compile_test.rs fails: three of our dependencies, anyhow, thiserror, and proc-macro, all use a test for a nightly toolchain to gate unstable features. Maybe I'm wrong though and this change is sufficient!
Yes, the test passed previously. |
Ok, there seems to be a bug in the build scripts rerun detection. They don't explicitly tell Cargo that they're dependent on |
My branch passes for me, I didn't know about the rerun thing! The important thing I was pointing out is, if you take the 'not(unstable), ignore' gate off of |
-#[cfg_attr(any(not(nightly), not(feature = "unstable")), ignore)]
+#[cfg_attr(not(nightly), ignore)] works for me too, after cleaning to force a rebuild |
wow, it passes for me after cargo clean too : O that's so strange, I'll have to really think about how to file this. |
I've asked about it on zulip https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Build.20script.20rerun.20on.20environment.20change, I'm still not certain if it's a bug in cargo or the build scripts somehow |
Update: it is a bug in cargo rust-lang/cargo#13003 |
When testing with
RUSTFLAGS=-Zallow-features= cargo +nightly test
to emulate the upcoming stable compilereyre
0.6.9 attempts to use an unstable feature anyway and fails to buildThe text was updated successfully, but these errors were encountered: