ScalaBuildTarget: split `jars` into `scalacJars` and `scaladocExtraJars`
See original GitHub issueIn Scala 2 jars
contains compiler jars which can also be used to generate scaladoc (because it’s built-in into scala-compiler.jar).
In Scala 3 the set of jars required for ScalaDoc includes 42 jars.
Only 13 of those jars are required to create a scala compiler instance.
Currently ScalaBuildTarget.jars
returns all 42 jars for Scala 3.
This leads to compiler classpath pollution.
see related: IntellIJ: sbt projects: Scala3 SDK compiler classpath contains redundant jar files Add ScalaInstance.loaderCompilerOnly
I already have a local fix for sbt projects (https://youtrack.jetbrains.com/issue/SCL-19086) via patching sbt-structure-extractor plugin
We could replace ScalaBuildTarget.jars
field with scalacJars
(13 jars) and scaladocExtraJars
(29 jars).
add methods getScalacJars, getScaladocExtraJars, getScaladocJars = getScaladocJars ++ getScaladocExtraJars
deprecate methods getJars
, setJars
getJars would by default return getScaladocJars
setJars would set scalacJars, but probably would set scaladocExtraJars to an empty list
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:12 (6 by maintainers)
Top GitHub Comments
This is a good observation. How about adding
scaladocJars
and keepingjars
unchanged? We should try to avoid breaking changes at all cost. It would have no effect in Scala 2. I assume most BSP clients will only use the compiler jars anyways.It’s pretty much just those two right now, yes.
Yes