-
Couldn't load subscription status.
- Fork 13.9k
bootstrap: handle vendored sources when remapping crate paths #119582
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
Conversation
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.pyalready assumes that./vendorwithin 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') |
|
@bors r+ rollup |
…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
…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
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`
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>
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.
#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/srcdirectory exists but is empty)Fixes #117885 by explicitly supporting the
vendordirectory and adding it toRUSTC_CARGO_REGISTRY_SRC_TO_REMAP.Note that
bootstrap.pyalready assumes that./vendorwithin the rust repo is the only supported vendoring location.r? @pietroalbini