Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scala-xml dependency should be provided #5689

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 5 additions & 9 deletions build.sbt
Expand Up @@ -395,17 +395,16 @@ lazy val compiler = configureAsSubproject(project)
description := "Scala Compiler",
libraryDependencies ++= Seq(antDep, asmDep),
// These are only needed for the POM:
libraryDependencies ++= Seq(scalaXmlDep, jlineDep % "optional"),
libraryDependencies ++= Seq(jlineDep % "optional"),
buildCharacterPropertiesFile := (resourceManaged in Compile).value / "scala-buildcharacter.properties",
resourceGenerators in Compile += generateBuildCharacterPropertiesFile.map(file => Seq(file)).taskValue,
// this a way to make sure that classes from interactive and scaladoc projects
// this a way to make sure that classes from interactive and repl projects
// end up in compiler jar. note that we need to use LocalProject references
// (with strings) to deal with mutual recursion
products in Compile in packageBin :=
(products in Compile in packageBin).value ++
Seq((dependencyClasspath in Compile).value.find(_.get(moduleID.key) == Some(asmDep)).get.data) ++
(products in Compile in packageBin in LocalProject("interactive")).value ++
(products in Compile in packageBin in LocalProject("scaladoc")).value ++
(products in Compile in packageBin in LocalProject("repl")).value ++
(products in Compile in packageBin in LocalProject("repl-jline")).value ++
(products in Compile in packageBin in LocalProject("repl-jline-embedded")).value,
Expand All @@ -416,15 +415,13 @@ lazy val compiler = configureAsSubproject(project)
mappings in Compile in packageSrc ++= {
val base = (unmanagedResourceDirectories in Compile).value ++
(unmanagedResourceDirectories in Compile in LocalProject("interactive")).value ++
(unmanagedResourceDirectories in Compile in LocalProject("scaladoc")).value ++
(unmanagedResourceDirectories in Compile in LocalProject("repl")).value
base ** ((includeFilter in unmanagedResources in Compile).value || "*.scala" || "*.psd" || "*.ai" || "*.java") pair relativeTo(base)
},
// Include the additional projects in the scaladoc JAR:
// Include the additional projects in the compiler JAR:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was correct the way it was btw, it means the jar of scaladocs of the compiler

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I see, now. You're right. I had misunderstood. Thanks for reviewing that.

sources in Compile in doc ++= {
val base =
(unmanagedSourceDirectories in Compile in LocalProject("interactive")).value ++
(unmanagedSourceDirectories in Compile in LocalProject("scaladoc")).value ++
(unmanagedSourceDirectories in Compile in LocalProject("repl")).value
((base ** ("*.scala" || "*.java"))
--- (base ** "Scaladoc*ModelTest.scala") // exclude test classes that depend on partest
Expand All @@ -436,7 +433,6 @@ lazy val compiler = configureAsSubproject(project)
Osgi.headers ++= Seq(
"Import-Package" -> ("jline.*;resolution:=optional," +
"org.apache.tools.ant.*;resolution:=optional," +
"scala.xml.*;version=\"${range;[====,====];"+versionNumber("scala-xml")+"}\";resolution:=optional," +
"scala.*;version=\"${range;[==,=+);${ver}}\"," +
"*"),
"Class-Path" -> "scala-reflect.jar scala-library.jar"
Expand Down Expand Up @@ -522,11 +518,11 @@ lazy val replJlineEmbedded = Project("repl-jline-embedded", file(".") / "target"

lazy val scaladoc = configureAsSubproject(project)
.settings(disableDocs)
.settings(disablePublishing)
.settings(commonSettings)
.settings(
name := "scala-compiler-doc",
description := "Scala Documentation Generator",
libraryDependencies ++= Seq(scalaXmlDep, partestDep),
libraryDependencies ++= Seq(scalaXmlDep, partestDep), // Good here
includeFilter in unmanagedResources in Compile := "*.html" | "*.css" | "*.gif" | "*.png" | "*.js" | "*.txt" | "*.svg" | "*.eot" | "*.woff" | "*.ttf"
)
.dependsOn(compiler)
Expand Down