Hi.
I am trying to use a compiler plugin which depends on the scala-xml
module.
With Scala < 2.13, the scala-xml module apparently was auto-magically available on the compiler classpath, but this does no longer work with Scala 2.13:
[error] java.lang.NoClassDefFoundError: scala/xml/MetaData
[error] at com.sksamuel.scapegoat.io.IOUtils$.writeHTMLReport(IOUtils.scala:24)
[error] at com.sksamuel.scapegoat.ScapegoatComponent$$anon$1.run(plugin.scala:174)
[error] at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1510)
[error] at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1494)
[error] at scala.tools.nsc.Global$Run.compileSources(Global.scala:1486)
[error] at scala.tools.nsc.Global$Run.compile(Global.scala:1615)
[error] at xsbt.CachedCompiler0.run(CompilerInterface.scala:130)
[error] at xsbt.CachedCompiler0.run(CompilerInterface.scala:105)
I tried to add the module to libraryDependencies
in build.sbt
in various ways (e.g. with compilerPlugin(...)
) but no dice.
Should compiler plugins simply not depend on other libraries? Are there any known compiler plugins that have workarounds, like shading the module and creating a fatjar?
Thanks!