Skip to content

Commit

Permalink
[7.2.1] Locate BCR module overlay files under the overlay subdirect…
Browse files Browse the repository at this point in the history
…ory (#22823)

This avoids collisions between overlay files and regular BCR files such
as `source.json`.

Overlay support has been released in 7.2.0, but hasn't been used in the
BCR yet.

Closes #22811.

PiperOrigin-RevId: 645071272
Change-Id: Ib05855a728ebb09795bf70afb14457e9e6d23bf0

Commit
36da004

Co-authored-by: Fabian Meumertzheim <[email protected]>
Co-authored-by: keertk <[email protected]>
  • Loading branch information
3 people authored Jun 20, 2024
1 parent 8fb4dce commit ecfe7f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ private RepoSpec createArchiveRepoSpec(
sourceJsonOverlay.entrySet().stream()
.collect(
toImmutableMap(
entry -> entry.getKey(),
Entry::getKey,
entry ->
new ArchiveRepoSpecBuilder.RemoteFile(
entry.getValue(), // integrity
Expand All @@ -432,6 +432,7 @@ private RepoSpec createArchiveRepoSpec(
"modules",
key.getName(),
key.getVersion().toString(),
"overlay",
entry.getKey())))));

return new ArchiveRepoSpecBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ public void testGetArchiveRepoSpec() throws Exception {
new ArchiveRepoSpecBuilder.RemoteFile(
"sha256-bleh-overlay",
// URLs in the registry itself are not mirrored.
ImmutableList.of(server.getUrl() + "/modules/baz/3.0/BUILD.bazel"))))
ImmutableList.of(
server.getUrl() + "/modules/baz/3.0/overlay/BUILD.bazel"))))
.setRemotePatches(ImmutableMap.of())
.setRemotePatchStrip(0)
.build());
Expand Down

0 comments on commit ecfe7f8

Please sign in to comment.