scalameta / metals

Scala language server with rich IDE features 🚀
https://scalameta.org/metals/
Apache License 2.0
2.1k stars 334 forks source link

Metals does not update to changes in directives when opening single file #6755

Open lrytz opened 2 months ago

lrytz commented 2 months ago

Describe the bug

Simple A.scala file

//> using scala 2.13
trait A

Opening the file (not the enclosing folder) in metals works as expected, Metals Doctor shows Scala 2.13.14.

Changing the directive to using scala 3.5 is not reflected in Metals, the Doctor still says Scala 2.13.14.

It works when opening the enclosing folder in VS Code instead of the single file.

Expected behavior

No response

Operating system

macOS

Editor/Extension

VS Code

Version of Metals

v1.3.5

Extra context or search terms

No response

tgodzik commented 2 months ago

Thanks for reporting! Looks like it's the same problem as https://github.com/VirtusLab/scala-cli/issues/2638