Skip to content

Commit 892c2a7

Browse files
committed
Build fixes; license; groupId = org.scala-lang.modules
The license is a standard 3-clause BSD license. We're publishing modules under org.scala-lang.modules. This signals they are "just another Scala library": - cross-versioned (cross-versioning under org.scala-lang confuses sbt) - backward binary compatible (but not forward like the core) Compile under Optimize/Deprecation/Features/Lint. Fix deprecation errors: Don't call log in ValidatingMarkupHandler, CachedFileStorage anymore, as that generates deprecation messages, and apparently we should use a debugger to debug.
1 parent 268d4d8 commit 892c2a7

File tree

87 files changed

+97
-60
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+97
-60
lines changed

LICENSE.md

Lines changed: 28 additions & 0 deletions

README.md

Lines changed: 3 additions & 3 deletions

build.sbt

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,47 @@
1-
organization := "org.scala-lang"
1+
organization := "org.scala-lang.modules"
22

33
name := "scala-xml"
44

55
version := "1.0-RC2"
66

7-
scalaVersion := "2.11.0-M4"
8-
9-
scalaBinaryVersion := scalaVersion.value
107

8+
// dependencies:
119
libraryDependencies += "org.apache.ant" % "ant" % "1.8.4"
1210

1311
libraryDependencies += "com.googlecode.java-diff-utils" % "diffutils" % "1.3.0"
1412

15-
libraryDependencies += "org.scala-lang" % "scala-xml" % "2.11.0-M4"
16-
1713
libraryDependencies += "org.scala-lang" % "scalap" % "2.11.0-M4"
1814

1915
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.10.1"
2016

2117
libraryDependencies += "org.scala-sbt" % "test-interface" % "1.0"
2218

2319

24-
// xml.properties
20+
// standard stuff follows:
21+
scalaVersion := "2.11.0-M4"
22+
23+
// NOTE: not necessarily equal to scalaVersion
24+
// (e.g., during PR validation, we override scalaVersion to validate,
25+
// but don't rebuild scalacheck, so we don't want to rewire that dependency)
26+
scalaBinaryVersion := "2.11.0-M4"
27+
28+
// don't use for doc scope, scaladoc warnings are not to be reckoned with
29+
scalacOptions in compile ++= Seq("-optimize", "-Xfatal-warnings", "-feature", "-deprecation", "-unchecked", "-Xlint")
30+
31+
32+
// Generate $name.properties to store our version as well as the scala version used to build
2533
resourceGenerators in Compile <+= Def.task {
2634
val props = new java.util.Properties
2735
props.put("version.number", version.value)
2836
props.put("scala.version.number", scalaVersion.value)
29-
val file = (resourceManaged in Compile).value / "xml.properties"
37+
props.put("scala.binary.version.number", scalaBinaryVersion.value)
38+
val file = (resourceManaged in Compile).value / s"${name.value}.properties"
3039
IO.write(props, null, file)
3140
Seq(file)
3241
}
3342

3443
mappings in (Compile, packageBin) += {
35-
(baseDirectory.value / "xml.properties") -> "xml.properties"
44+
(baseDirectory.value / s"${name.value}.properties") -> s"${name.value}.properties"
3645
}
3746

3847

@@ -56,24 +65,23 @@ pomExtra := (
5665
<inceptionYear>2002</inceptionYear>
5766
<licenses>
5867
<license>
59-
<name>BSD-like</name>
60-
<url>http://www.scala-lang.org/downloads/license.html
61-
</url>
62-
<distribution>repo</distribution>
68+
<distribution>repo</distribution>
69+
<name>BSD 3-Clause</name>
70+
<url>https://github.com/scala/{name.value}/blob/master/LICENSE.md</url>
6371
</license>
64-
</licenses>
72+
</licenses>
6573
<scm>
66-
<connection>scm:git:git://github.com/scala/scala-xml.git</connection>
67-
<url>https://github.com/scala/scala-xml</url>
74+
<connection>scm:git:git://github.com/scala/{name.value}.git</connection>
75+
<url>https://github.com/scala/{name.value}</url>
6876
</scm>
6977
<issueManagement>
7078
<system>JIRA</system>
7179
<url>https://issues.scala-lang.org/</url>
7280
</issueManagement>
7381
<developers>
7482
<developer>
75-
<id>lamp</id>
76-
<name>EPFL LAMP</name>
83+
<id>epfl</id>
84+
<name>EPFL</name>
7785
</developer>
7886
<developer>
7987
<id>Typesafe</id>
@@ -83,11 +91,11 @@ pomExtra := (
8391
)
8492

8593
// for testing with partest
86-
libraryDependencies += "org.scala-lang" %% "scala-partest-interface" % "0.1" % "test"
94+
libraryDependencies += "org.scala-lang.modules" %% "scala-partest-interface" % "0.2" % "test"
8795

8896
// the actual partest the interface calls into -- must be binary version close enough to ours
8997
// so that it can link to the compiler/lib we're using (testing)
90-
libraryDependencies += "org.scala-lang" %% "scala-partest" % "1.0-RC1" % "test"
98+
libraryDependencies += "org.scala-lang.modules" %% "scala-partest" % "1.0-RC2" % "test"
9199

92100
fork in Test := true
93101

@@ -110,4 +118,4 @@ definedTests in Test += (
110118
// TODO: mima
111119
// import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings
112120
// import com.typesafe.tools.mima.plugin.MimaKeys.previousArtifact
113-
// previousArtifact := Some("org.scala-lang" % "partest_2.11.0-M4" % "1.0")
121+
// previousArtifact := Some(organization.value %% name.value % binaryReferenceVersion.value)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/main/scala/xml/Elem.scala renamed to src/main/scala/scala/xml/Elem.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ object Elem {
3939
}
4040

4141
import scala.sys.process._
42+
import scala.language.implicitConversions
43+
4244
/**
4345
* Implicitly convert a [[scala.xml.Elem]] into a
4446
* [[scala.sys.process.ProcessBuilder]]. This is done by obtaining the text
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)