Skip to content

Commit f3d7a07

Browse files
committed
Bazel-diff should take into account module repositories path format changed in Bazel 8.
1 parent c2777dc commit f3d7a07

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

cli/src/main/kotlin/com/bazel_diff/hash/ExternalRepoResolver.kt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,18 @@ class ExternalRepoResolver(
2222
CacheBuilder.newBuilder()
2323
.build(
2424
CacheLoader.from { repoName: String ->
25-
val externalRepoRoot = externalRoot.resolve(repoName)
26-
if (Files.exists(externalRepoRoot)) {
27-
return@from externalRepoRoot
25+
externalRoot.resolve(repoName).let {
26+
if (Files.exists(it)) {
27+
return@from it
28+
}
2829
}
30+
31+
externalRoot.resolve("$repoName+").let {
32+
if (Files.exists(it)) {
33+
return@from it
34+
}
35+
}
36+
2937
resolveBzlModPath(repoName)
3038
})
3139

0 commit comments

Comments
 (0)