[7.3.0] Back-port vendor mode for 7.3.0#22794
Merged
meteorcloudy merged 12 commits intobazelbuild:release-7.3.0from Jun 21, 2024
Merged
[7.3.0] Back-port vendor mode for 7.3.0#22794meteorcloudy merged 12 commits intobazelbuild:release-7.3.0from
meteorcloudy merged 12 commits intobazelbuild:release-7.3.0from
Conversation
Use the TargetFetcher used for fetch to fetch targets, while internally runs a build and creates a dependency graph. Then traverse this graph for each target to collect the repos and vendor them. PiperOrigin-RevId: 627047679 Change-Id: I78a33c4258099a45d4d3a345bd075badc8985209
A Starlark config file to allow controlling the vendored repos via:
- ignore('repo_name','repo_name', ....) function -->
Bazel will never vendor the repo or consider this directory while building in vendor mode.
- pin('repo_name','repo_name', ....) function -->
Bazel will pin the contents of this repo, will not update it while vendoring, and will always use it as is when building in vendor mode
Co-authored-by: Yun Peng <pcloudy@google.com>
PiperOrigin-RevId: 639000162
Change-Id: I278359f6e92eab290dac9cc4ef3136aa140cf8ba
RELNOTES: None PiperOrigin-RevId: 639001377 Change-Id: Ib914fa8c62999b334ebea552481be5b7ebf52a2e
PiperOrigin-RevId: 641013801 Change-Id: Ia74b7b79a870d74b9055f32e4a4a77418fd3f555
- Vendor registry files needed for Bazel module resolution to achieve offline build with vendor mode. - Also refactored bazel_vendor_test to avoid vendoring dependencies of bazel_tools, which speeds up the test significantly. Fixes bazelbuild#22554 Closes bazelbuild#22566. PiperOrigin-RevId: 641246903 Change-Id: I01a78612ad7ca454df2c70dc5dcc38ec2fbfb71c
This drastically improves the speed of vendoring external repositories. Related: bazelbuild#19563 Closes bazelbuild#22668. PiperOrigin-RevId: 642338030 Change-Id: Idcba16c491711cf8fa6637d1e9c42cfc65e87599
To make sure symlinks work correctly, Bazel uses the following strategy to rewrite symlinks in the vendored source: - Create a symlink `<vendor_dir>/bazel-external` that points to `$(bazel info output_base)/external`. It is refreshed by every Bazel command automatically. - For the vendored source, rewrite all symlinks that originally point to a path under `$(bazel info output_base)/external` to a relative path under `<vendor_dir>/bazel-external`. Fixes bazelbuild#22303 Closes bazelbuild#22723. PiperOrigin-RevId: 644349481 Change-Id: I853ac0ea5405f0cf58431e988d727e690cbbb013
Member
Author
|
@fmeum @Wyverald I had to apply 91708d2 to fix the build. Looks like Also the |
Currently `pin` and `ignore` show up in the page for MODULE.bazel globals (https://bazel.build/rules/lib/globals/module#pin). They should be in their own page instead. PiperOrigin-RevId: 641816839 Change-Id: I923ec2e800870dd565ea3e2ba36886b5e92ba947
91708d2 to
bf189e6
Compare
PiperOrigin-RevId: 644405623 Change-Id: Ic89e4ba7056fe4927470715babe87a8a617da197
bf189e6 to
4046ec9
Compare
fmeum
approved these changes
Jun 18, 2024
Wyverald
approved these changes
Jun 20, 2024
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.
Commits back-ported:
RELNOTES: Bazel now supports vendoring external dependencies with Bzlmod, see https://bazel.build/external/vendor for details.