Skip to content

Commit

Permalink
fix: bazel 7.2.0 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyklim committed Apr 11, 2024
1 parent 1cd573d commit aab3aff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scala/workers/deps/DepsRunner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ object DepsRunner extends WorkerMain[Unit]:
val depLabel = group.label.tail match
case label if label.startsWith("@@//") => label.drop(2)
case label if label.startsWith("@//") => label.drop(1)
case label if label.startsWith("@@") => label.drop(1)
case label => label

depLabelsMap.put(depLabel, group.jars.toSet)
Expand All @@ -118,13 +119,12 @@ object DepsRunner extends WorkerMain[Unit]:
val unusedWhitelist = workArgs.unusedWhitelist.map(_.tail)
usedPaths
.diff(Set.concat(directLabels, unusedWhitelist).flatMap(depLabelToPaths))
.flatMap { path =>
.flatMap: path =>
pathToLabel.get(path) match
case res @ None =>
System.err.println(s"Warning: There is a reference to $path, but no dependency of $label provides it")
res
case res => res
}
else Nil
for depLabel <- add do
println(s"Target '$depLabel' is used but isn't explicitly declared, please add it to the deps.")
Expand Down

0 comments on commit aab3aff

Please sign in to comment.