Uh oh!
There was an error while loading. Please reload this page.
Bazel: Add lfs_archives function - #22483
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.
Uh oh!
There was an error while loading. Please reload this page.
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
left a comment
There was a problem hiding this comment.
thanks a lot, only a minor nit on my side
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.

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.