com-lihaoyi / mill

Mill is a fast JVM build tool that supports Java and Scala. 2-3x faster than Gradle and 5-10x faster than Maven for common workflows, Mill aims to make your project’s build process performant, maintainable, and flexible
https://mill-build.org/
MIT License
2.04k stars 331 forks source link

GenIdea: Use synthetic scala-SDK entry for compiler setup #3154

Closed lefou closed 4 months ago

lefou commented 4 months ago

Previously, we attached the compiler setup to the scala-library entry. This doen't work well for Scala 3 projects, since there multiple scala-library entries are present, one for Scala 2 and one for Scala 3. If the Scala 2 version comes first, IJ uses the wrong compiler setup.

This change splits the scala-library from the compiler setup. The compiler setup now becomes a dedicated synthetic scala-SDK library entry for each Scala module. The scala-library no longer has any special semantic and is just an ordinary jar. Only one scala-SDK entry is added to each Scala module resulting in a proper setup.

Fix https://github.com/com-lihaoyi/mill/issues/2867