Skip to content

Commit

Permalink
add -sourceroot flag when generating semanticdb with scala 3 (#3595)
Browse files Browse the repository at this point in the history
while developing Scala 3 port, when using metals as the BSP server then
semanticdb files are generated in the same folder as the source file.

With this change, and setting the bootstrapped mill version for BSP
server, metals no longer puts semanticdb in the same directory, but
instead in `out/../semanticdbData.dest/classes/META-INF/semanticdb/...`
  • Loading branch information
bishabosha authored Sep 24, 2024
1 parent df9a767 commit 89bce51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scalalib/src/mill/scalalib/ScalaModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ trait ScalaModule extends JavaModule with TestModule.ScalaModuleBase { outer =>
allScalacOptions() ++
semanticDbEnablePluginScalacOptions() ++ {
if (ZincWorkerUtil.isScala3(sv)) {
Seq("-Xsemanticdb")
Seq("-Xsemanticdb", s"-sourceroot:${T.workspace}")
} else {
Seq(
"-Yrangepos",
Expand Down

0 comments on commit 89bce51

Please sign in to comment.