Skip to content

Commit

Permalink
Sort jars by pre-topological sort to preserve leftmost-first guarantee
Browse files Browse the repository at this point in the history
With topological order, there's no left-to-right order guarantee
https://bazel.build/rules/lib/depset

As a result, `test/shell/test_misc`'s `test_multi_service_manifest`
fails because the order of `exepected_service_manifest.txt` reverses.
  • Loading branch information
tanishiking committed Dec 8, 2022
1 parent c7add52 commit 447dec2
Showing 1 changed file with 1 addition and 1 deletion.
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], order = "topological"),
rjars = depset(out.full_jars, transitive = [rjars], order = "preorder"),
merged_provider = out.merged_provider,
external_providers = {
"JavaInfo": out.merged_provider,
Expand Down

0 comments on commit 447dec2

Please sign in to comment.