Skip to content

Commit d4869a2

Browse files
committed
scala-xml dependency should be provided
Nothing should transitively depend on the scala-xml module except for scaladoc and library-all. Compiler needs scala-xml as a build dependency, but not at runtime. The user is supposed to provide scala-xml as a dependency at runtime. This fixes an issue where the classpath in SBT shadows the scala-xml module, see scala/scala-module-dependency-sample#14. The only consequence of dropping the dependency at runtime is that scala-xml always needs to be binary compatible. That's the point of MiMa and dbuild, no?
1 parent 23548c4 commit d4869a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ lazy val compiler = configureAsSubproject(project)
423423
description := "Scala Compiler",
424424
libraryDependencies ++= Seq(antDep, asmDep),
425425
// These are only needed for the POM:
426-
libraryDependencies ++= Seq(scalaXmlDep, scalaParserCombinatorsDep, jlineDep % "optional"),
426+
libraryDependencies ++= Seq(scalaXmlDep % "provided", scalaParserCombinatorsDep, jlineDep % "optional"),
427427
// this a way to make sure that classes from interactive and scaladoc projects
428428
// end up in compiler jar (that's what Ant build does)
429429
// we need to use LocalProject references (with strings) to deal with mutual recursion

0 commit comments

Comments
 (0)