-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Forbid setting RUSTC_BOOTSTRAP
from a build script
#7088
Comments
I think one should go even further and let cargo clear any This doesn't prevent Firefox from using nightly features, they can just use a rustc wrapper using Of course this can still be circumvented by I guess a permanent and more restricting solution is to lock down |
@est31 I would not go as far as that. Activating |
@skade the user action is not fine because Firefox devs have their reasons to use |
I find it disappointing that people react to the Having the hack in So there isn't really an acute crates.io problem in need of solving. (Debian independently discovered this now, because they still had a copy of the code from January.)
As far as subversion goes, it seems to me that filing a new issue subverts the issue closure. (I can see the temptation, though. It irks me that I can't reply on those issues.) Before proposing changes (including possibly forbidding something), I invite people to re-read the original description of #6627 as well as my other comments there, especially this one. |
@hsivonen as I've pointed out above, one has already now fine grained control from the top level about which crate to give RUST_BOOTSTRAP and which not, which is precisely what you requested in #6627 (modulo how it's exposed to users). In fact, making the build.rs hack impossible would give more control to the top level crates (as enabling RUSTC_BOOSTRAP without blessing from the top level becomes harder) which seems to be what you want as well. |
I suggest that we don't argue about "what stability policy Rust should have" in this, or any other issue. This is definitely an RFC-worthy material. #6627 in particular contains a treasure trove of useful information about real-world use-cases, and is already written in the form of an RFC, but is filed in the wrong venue. It seems to be a process failure that we haven't redirected this important discussion to a more appropriate venue in five months, despite the fact that a lot of prominent members participated in it! I also would like to emphasize that we have an existing agreed upon stability policy, articulated in https://blog.rust-lang.org/2014/10/30/Stability.html, and this issue is about fixing a bug that allows to subvert that existing policy. In particular,
|
It would be good to fix things in the right order. Specifically, to introduce the replacement solution before forbidding the current one.
Dreading that a Rust upgrade breaks the build for enforcement purposes isn't that great, either.
I'm not a Firefox build system developer. CC @glandium to evaluate your suggestion. (AFAICT, we already optionally use
Once a top-level thing is actually in place and working, I agree. |
The replacement solution has always existed: use nightly. You and others forcing the use of
Well, we have been telling you since the very beginning that you shouldn't be using
It is already in place, it's called a nightly compiler. |
I think a couple of problems need to be appreciated:
I don't agree with the path taken (strongly), but I do agree with @hsivonen that our story there is not straight-forward and should be better thought out. |
Those 3 points would be fixed doing what @eddyb has been suggesting for years: two separate executables and no more |
@nox I think I described it better in the previous issue on this repo: #6627 (comment) |
Couldn't find that comment anymore, thanks for linking it. |
Following up on this with a concrete plan:
|
@joshtriplett I guess your last point is made to facilitate a transition plan for projects with MSRV requirements like Firefox? |
@est31 It's to ensure that people (including downstream builders of Firefox and other projects, such as distros) don't have to immediately drop everything and fix any crates that do this in order to keep building; they just have to set |
Now that rust-lang/rust#77802 is implemented, cargo can both deny setting |
There is, ISTM, exactly one person in the rust-lang community who understands the problem: rust-lang/cargo#7088 (comment)
Currently, crates can set environmental variables, including
RUSTC_BOOTSTRAP
, from abuild.rs
file, thus subverting current stability guarantees. Cargo and, if that's feasible, crates.io additionally should forbid doing so.This was originally discussed in #6608 and #6627, both of which are closed, so I thought it would be helpful to create this issue!
The text was updated successfully, but these errors were encountered: