Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Use BuildInfo.scalaCompilerVersion over Properties.versionNumberString #876
Previously, we used
Now, we use a
Previously, we used `scala.util.Properties.versionNumberString` to find the current Scala version of the running classloader. This approach had the problem where we would pick up a more recent Scala version than expected. For example, the Metals server depended on an `mtags_2.12.8.jar` and `scala-library_2.12.jar` (compiled by 2.12.9) causing `Properties.versionNumberString` to return "2.12.9" instead of the expected "2.12.8". Now, we use a `BuildInfo.scalaCompilerVersion` that is generated by the build to ensure we get "2.12.8" even if scala-library.jar on the classpath comes from 2.12.9. Fixes #868.