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
Prioritize build targets with supported Scala versions. #948
Previously, if two build targets in the repo were eligible for a source
This PR introduces a change to the logic where we select a build target
Previously, if two build targets in the repo were eligible for a source file, Metals would sometimes prioritize a target with an unsupported Scala version over a target with a supported Scala version. This resulted in completions/hover/parameterHints not to work while editing cross-built sources. This PR introduces a change to the logic where we select a build target for a given source file. Now we sort the elibible candidates by two criteria: the Scala version and the platform (JVM/JS/Native). This change takes the first step towards scalameta/metals-feature-requests#13, which is about making this logic configurable.