Skip to content

Commit

Permalink
Topological sort jars (so that the target jar comes first)
Browse files Browse the repository at this point in the history
fix #1456
  • Loading branch information
tanishiking committed Dec 7, 2022
1 parent 2cc2d56 commit c7add52
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scala/private/phases/phase_compile.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def _phase_compile(
# TODO: simplify the return values and use provider
return struct(
files = depset(out.full_jars),
rjars = depset(out.full_jars, transitive = [rjars]),
rjars = depset(out.full_jars, transitive = [rjars], order = "topological"),
merged_provider = out.merged_provider,
external_providers = {
"JavaInfo": out.merged_provider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ scala_test(
name = "child",
size = "small",
srcs = ["ScalaLibResourcesDuplicatedTest.scala"],
resource_strip_prefix = "test/src/main/scala/scalarules/test/duplicated_resources/child/",
resources = ["resource.txt"],
unused_dependency_checker_mode = "off",
resource_strip_prefix = "test/src/main/scala/scalarules/test/duplicated_resources/child/",
deps = ["//test/src/main/scala/scalarules/test/duplicated_resources/parent"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ load("//scala:scala.bzl", "scala_library")

scala_library(
name = "parent",
resources = ["resource.txt"],
resource_strip_prefix = "test/src/main/scala/scalarules/test/duplicated_resources/parent/",
resources = ["resource.txt"],
visibility = ["//test/src/main/scala/scalarules/test/duplicated_resources/child:__pkg__"],
)

0 comments on commit c7add52

Please sign in to comment.