metals
metals copied to clipboard
Metals does not recognize symbols from imported Ivy configs when spaces are used around the arrow
Describe the bug
Reproduction:
- clone https://github.com/asflierl/metals-import-minimal-repro.git
- open VSCode and import project to Metals (Bloop or SBT as build server show the same symptoms)
- go to /src/test/scala/testing.scala
- place cursor behind Meep in line 6 or Moop in line 7
- press ctrl+space for completion suggestions
- there are no completions
Please note that if you remove the spaces in build.sbt to change "test -> test;compile -> compile"
to "test->test;compile->compile"
and re-import the project, everything works as expected.
Expected behavior
- there are completions for both Meep and Moop
Operating system
macOS
Editor/Extension
VS Code
Version of Metals
v1.2.2
Extra context or search terms
Please note that the project compiles fine with or without the spaces around the arrow - so I guess boss syntax variants are supposed to be valid.
No response
Thanks for reporting! This is quite curious since we might be doing something wrong in Bloop (probably somewhere around https://github.com/scalacenter/bloop/blob/main/integrations/sbt-bloop/src/main/scala/bloop/integrations/sbt/SbtBloop.scala#L554), but on the other hand we don't do anything w sbt BSP, so this should work correctly.
I discovered this while using SBT BSP and then only later confirmed that it also occurred with Bloop.
There is a difference in the scalac
classpath
send by sbt
server. Only when there are no spaces test->test;compile->compile
in .../metals-import-minimal-repro/libMeep/target/scala-3.3.3/classes/
is included on root
s classpath.