Skip to content

Commit d3d92bd

Browse files
authored
Merge pull request #101 from lucidsoftware/jpeterson-fixes-the-semanticdb-phase
Don't provide -sourceroot twice
2 parents 7097e39 + f598e9c commit d3d92bd

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

rules/private/phases/phase_semanticdb.bzl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ def phase_semanticdb(ctx, g):
6666
map_each = _semanticdb_directory_from_output_jar,
6767
)
6868

69-
arguments.add("--compiler_option_referencing_path=-sourceroot:${workDir}")
69+
# We don't need to change `-sourceroot` in the Scala 3 case because `ZincRunner` already takes care of
70+
# setting it to the work directory (so the generated TASTy files are deterministic)
7071
arguments.add("--compiler_option=-Ysemanticdb")
7172

7273
g.out.providers.append(

tests/plugins/semanticdb/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ register_zinc_toolchain(
1414
"@annex_test//:org_scala_lang_scala_library",
1515
],
1616
global_plugins = ["@annex_test//:org_scalameta_semanticdb_scalac_2_13_14"],
17+
global_scalacopts = ["-Wconf:any:error"],
1718
runtime_classpath = ["@annex_test//:org_scala_lang_scala_library"],
1819
semanticdb_bundle = False,
1920
version = scala_2_13_version,
@@ -26,6 +27,7 @@ register_zinc_toolchain(
2627
"@annex_test//:org_scala_lang_scala3_compiler_3",
2728
"@annex_test//:org_scala_lang_scala3_library_3",
2829
],
30+
global_scalacopts = ["-Wconf:any:error"],
2931
runtime_classpath = [
3032
"@annex_test//:org_scala_lang_scala3_library_3",
3133
"@annex_test//:org_scala_lang_scala3_interfaces",

0 commit comments

Comments
 (0)