-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add a sysroot
crate to represent the standard library crates
#108865
Conversation
r? @m-ou-se (rustbot has picked a reviewer for you, use r? to override) |
These commits modify the If this was intentional then you can ignore this comment. Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
I don't understand why this change is necessary. Why not just run |
a606783
to
bd1a39c
Compare
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
These commits modify the If this was intentional then you can ignore this comment. |
I don't think cargo supports specifying features per crate. There may be some other reason I don't know about also. |
I don't think that's true, but even if so, the features are additive between test and proc_macro, it shouldn't hurt anything. |
Maybe name it |
I don't think that's what's going on in that PR. Here's the error message:
|
e213891
to
5fada71
Compare
library
crate to represent the standard library cratessysroot
crate to represent the standard library crates
5fada71
to
fd4c81f
Compare
Given that is is more of a bootstrap change, r? @jyn514 |
@bors r+ See #108871 (comment) for why we ended up not taking that approach. |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#108865 (Add a `sysroot` crate to represent the standard library crates) - rust-lang#110651 (libtest: include test output in junit xml reports) - rust-lang#110826 (Make PlaceMention a non-mutating use.) - rust-lang#110982 (Do not recurse into const generic args when resolving self lifetime elision.) - rust-lang#111009 (Add `ascii::Char` (ACP#179)) - rust-lang#111100 (check array type of repeat exprs is wf) - rust-lang#111186 (Add `is_positive` method for signed non-zero integers.) - rust-lang#111201 (bootstrap: add .gitmodules to the sources) Failed merges: - rust-lang#110954 (Reject borrows of projections in ConstProp.) r? `@ghost` `@rustbot` modify labels: rollup
This is going to cause a lot of breakage (build-std, cargo, miri, anyone who builds std manually, etc.). I kindly ask that in the future if there is a major change like this that you let people know ahead of time so that they can prepare, or perhaps provide suggestions to maintain compatibility to prevent this kind of situation. I'm going to mark this with relnotes for a suggestion to add it to the compatibility section. |
I did fail to release that this would break |
fix: hack around `libsysroot` instead of `libtest` ### What does this PR try to resolve? This is a fix in response to rust-lang/rust#108865. Cargo `-Zbuild-std` now use `sysroot` crate to resolve cargo features instead of the old hack around `libtest`. `sysroot` is just a dummy crate depending on other standard library crates.
Cargo's nightly features are not tested in the rust-lang/rust CI because of the cyclical nature of trying to change unstable interfaces. |
Make `profiler_builtins` an optional dependency of sysroot, not std This avoids unnecessary rebuilds of std (and the compiler) when `build.profiler` is toggled off or on. Fixes rust-lang#131812. --- Background: The `profiler_builtins` crate has been an optional dependency of std (behind a cargo feature) ever since it was added back in rust-lang#42433. But as far as I can tell that has only ever been a convenient way to force the crate to be built, not a genuine dependency. The side-effect of this false dependency is that toggling `build.profiler` causes a rebuild of std and the compiler, which shouldn't be necessary. This PR therefore makes `profiler_builtins` an optional dependency of the dummy sysroot crate (rust-lang#108865), rather than a dependency of std. What makes this change so small is that all of the necessary infrastructure already exists. Previously, bootstrap would enable the `profiler` feature on the sysroot crate, which would forward that feature to std. Now, enabling that feature directly enables sysroot's `profiler_builtins` dependency instead. --- I believe this is more of a bootstrap change than a libs change, so tentatively: r? bootstrap
Make `profiler_builtins` an optional dependency of sysroot, not std This avoids unnecessary rebuilds of std (and the compiler) when `build.profiler` is toggled off or on. Fixes rust-lang#131812. --- Background: The `profiler_builtins` crate has been an optional dependency of std (behind a cargo feature) ever since it was added back in rust-lang#42433. But as far as I can tell that has only ever been a convenient way to force the crate to be built, not a genuine dependency. The side-effect of this false dependency is that toggling `build.profiler` causes a rebuild of std and the compiler, which shouldn't be necessary. This PR therefore makes `profiler_builtins` an optional dependency of the dummy sysroot crate (rust-lang#108865), rather than a dependency of std. What makes this change so small is that all of the necessary infrastructure already exists. Previously, bootstrap would enable the `profiler` feature on the sysroot crate, which would forward that feature to std. Now, enabling that feature directly enables sysroot's `profiler_builtins` dependency instead. --- I believe this is more of a bootstrap change than a libs change, so tentatively: r? bootstrap
This adds a dummy crate named
sysroot
to represent the standard library target instead of using thetest
crate. This allows the removal ofproc_macro
as a dependency oftest
allowing these 2 crates to build in parallel saving around 9 seconds locally.