Closed logc closed 3 months ago
Sorry, somehow missed this MR. Does it make sense to use automatic
instead?
I didn't know that automatic
is a valid value for that defcustom
variable. If that is the case, why isn't that the default for the fallback version, anyway?
I am not adamant about any particular version. An automatically picked version would be better for me. :smile:
The default is "unset/None", but (from the comments in Metals, https://github.com/scalameta/metals/blob/de38d6b99d208be73b1c6ee6e03cdca4961200d3/metals/src/main/scala/scala/meta/internal/metals/UserConfiguration.scala#L611) VS Code needed a different way to express "use the default".
Not sure if nil
would work here, otherwise "automatic" is a good choice. Better than using a fixed value as the default here in lsp-metals, as it overrides Metals' default, and (as we've seen) can break over time as Metals deprecates support for old Scala versions.
If there is a better way, by removing the variable altogether, feel free to close my pull request.
Changed to automatic in 0dc938be1190d147e7013e3dce08ac8bff5d1662
Using metals version 1.3.1, there is a deprecation message that suggests to update from Scala 3.2.0 to 3.3.3 as fallback version.
Since the 3.3.x series is LTS, I thought it would make sense to have that as a default value in the upstream package, instead of just solving it locally for my projects, or picking 3.2.2 as the closest supported version.
The entire message reads:
LSP :: You are using fallback Scala version 3.2.0, which is not supported in this version of Metals. Please upgrade to Scala version 3.3.3.
My
metals
server, installed with Coursier, outputs these supported versions: