fix(oss-build): allow nightly features on stable via RUSTC_BOOTSTRAP#1365
Open
vegerot wants to merge 1 commit into
Open
fix(oss-build): allow nightly features on stable via RUSTC_BOOTSTRAP#1365vegerot wants to merge 1 commit into
vegerot wants to merge 1 commit into
Conversation
make oss failed on stable Rust 1.97.1 with:
error[E0554]: #![feature] may not be used on stable
--> smallvec-1.15.2/src/lib.rs:95: specialization
and 8 crates using #![feature(once_cell_try)]
Buck builds use a nightly toolchain internally and handle this,
but cargo oss builds use stable rustc by default.
Cargo.toml files are @generated by autocargo from BUCK files,
so we should not hand-edit them to remove the features.
Setting RUSTC_BOOTSTRAP=1 in build.py's cargo_env allows stable
cargo/rustc to accept these nightly features without requiring
users to install a nightly toolchain or override.
Fixes: cd eden/scm && make -j oss
There was a problem hiding this comment.
Pull request overview
This PR adjusts Sapling’s OSS cargo build environment so stable Rust can compile dependencies that use nightly-only #![feature] gates, avoiding requiring a nightly toolchain for make oss.
Changes:
- Set
RUSTC_BOOTSTRAP=1(if not already set) incargo_env()to allow compiling crates that require nightly features during OSS cargo builds.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
This pull request has been imported. If you are a Meta employee, you can view this in D113135919. (Because this pull request was imported automatically, there will not be any future comments.) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
make oss failed on stable Rust 1.97.1 with:
error[E0554]: #![feature] may not be used on stable
--> smallvec-1.15.2/src/lib.rs:95: specialization
and 8 crates using #![feature(once_cell_try)]
Buck builds use a nightly toolchain internally and handle this,
but cargo oss builds use stable rustc by default.
Cargo.toml files are @generated by autocargo from BUCK files,
so we should not hand-edit them to remove the features.
Setting RUSTC_BOOTSTRAP=1 in build.py's cargo_env allows stable
cargo/rustc to accept these nightly features without requiring
users to install a nightly toolchain or override.
Fixes: cd eden/scm && make -j oss