-
Notifications
You must be signed in to change notification settings - Fork 13k
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
bootstrap: handle vendored sources when remapping crate paths #119582
Merged
Conversation
This file contains 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
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
labels
Jan 4, 2024
weihanglo
approved these changes
Jan 4, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that
bootstrap.py
already assumes that./vendor
within the rust repo is the only supported vendoring location.
For the reference:
rust/src/bootstrap/bootstrap.py
Lines 999 to 1000 in 090d5ea
if self.use_vendored_sources: | |
vendor_dir = os.path.join(self.rust_root, 'vendor') |
wesleywiser
approved these changes
Jan 18, 2024
@bors r+ rollup |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Jan 18, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 18, 2024
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#119582 (bootstrap: handle vendored sources when remapping crate paths) - rust-lang#119730 (docs: fix typos) - rust-lang#119828 (Improved collapse_debuginfo attribute, added command-line flag) - rust-lang#119869 (replace `track_errors` usages with bubbling up `ErrorGuaranteed`) - rust-lang#120037 (Remove `next_root_ty_var`) - rust-lang#120094 (tests/ui/asm/inline-syntax: adapt for LLVM 18) - rust-lang#120096 (Set RUSTC_BOOTSTRAP=1 consistently) - rust-lang#120101 (change `.unwrap()` to `?` on write where `fmt::Result` is returned) - rust-lang#120102 (Fix typo in munmap_partial.rs) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 19, 2024
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#119582 (bootstrap: handle vendored sources when remapping crate paths) - rust-lang#119730 (docs: fix typos) - rust-lang#119828 (Improved collapse_debuginfo attribute, added command-line flag) - rust-lang#119869 (replace `track_errors` usages with bubbling up `ErrorGuaranteed`) - rust-lang#120037 (Remove `next_root_ty_var`) - rust-lang#120094 (tests/ui/asm/inline-syntax: adapt for LLVM 18) - rust-lang#120096 (Set RUSTC_BOOTSTRAP=1 consistently) - rust-lang#120101 (change `.unwrap()` to `?` on write where `fmt::Result` is returned) - rust-lang#120102 (Fix typo in munmap_partial.rs) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 19, 2024
Rollup merge of rust-lang#119582 - arlosi:bootstrap-vendor-remap, r=wesleywiser bootstrap: handle vendored sources when remapping crate paths rust-lang#115872 introduced a feature to add path remapping for crate dependencies, but only when they came from Cargo's registry cache, not a vendor directory. This caused builds that used remapped debuginfo and vendor directories to fail with: ``` std::fs::read_dir(registry_src) failed with No such file or directory (os error 2) ``` or (if the `registry/src` directory exists but is empty) ``` error: --remap-path-prefix must contain '=' between FROM and TO ``` Fixes rust-lang#117885 by explicitly supporting the `vendor` directory and adding it to `RUSTC_CARGO_REGISTRY_SRC_TO_REMAP`. Note that `bootstrap.py` already assumes that `./vendor` within the rust repo is the only supported vendoring location. r? `@pietroalbini`
bors-ferrocene bot
added a commit
to ferrocene/ferrocene
that referenced
this pull request
Apr 12, 2024
510: Handle vendored sources when remapping paths r=Hoverbear a=pietroalbini This PR backports rust-lang/rust#119582 to 1.76, allowing to build Ferrocene 24.05 with vendored dependencies. Co-authored-by: Arlo Siemsen <arsiem@microsoft.com>
pothos
added a commit
to flatcar/scripts
that referenced
this pull request
Apr 17, 2024
The patch rust-lang/rust#119582 got merged some releases ago as alternative to the patch rust-lang/rust#119445 we included in the ebuild file. We currently use both because the unneeded patch got changed to apply again but it's not needed and may cause strange behavior. Therefore, drop the alternative patch.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
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.
#115872 introduced a feature to add path remapping for crate dependencies, but only when they came from Cargo's registry cache, not a vendor directory.
This caused builds that used remapped debuginfo and vendor directories to fail with:
or (if the
registry/src
directory exists but is empty)Fixes #117885 by explicitly supporting the
vendor
directory and adding it toRUSTC_CARGO_REGISTRY_SRC_TO_REMAP
.Note that
bootstrap.py
already assumes that./vendor
within the rust repo is the only supported vendoring location.r? @pietroalbini