Bazel: Add lfs_archives function - #22483
Merged
Merged
Conversation
This pulls out some generic stuff from the Swift static runtime into a generic location. Internal clean-up PR will follow once this is in.
jketema
commented
Sep 1, 2026
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Duplicate archive basenames can collide in the shared staging location and cause incorrect extraction.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
misc/bazel/lfs.bzl — Different source labels can have the same basename, but lfs_smudge stages every input at… |
What changed in this PR
Adds reusable support for overlaying multiple Git LFS archives in one Bazel repository.
Changes:
- Fixes multi-source download/extraction sequencing.
- Adds the public
lfs_archivesrepository rule.
| File | Description |
|---|---|
misc/bazel/lfs.bzl |
Adds ordered multi-archive LFS extraction support. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| def _download_and_extract_lfs_archives(repository_ctx): | ||
| lfs_smudge( | ||
| repository_ctx, | ||
| [repository_ctx.path(src) for src in repository_ctx.attr.srcs], |
redsun82
reviewed
Sep 2, 2026
redsun82
left a comment
Contributor
There was a problem hiding this comment.
thanks a lot, only a minor nit on my side
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.

This pulls out some generic stuff from the Swift static runtime into a generic location.
Internal clean-up PR will follow once this is in.