File tree 3 files changed +27
-1
lines changed
3 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -17,5 +17,21 @@ libraryDependencies += "junit" % "junit" % "4.11" % "test"
17
17
18
18
libraryDependencies += " com.novocode" % " junit-interface" % " 0.10" % " test"
19
19
20
+ // // testing:
20
21
// used in CompilerErrors test
21
- libraryDependencies += " org.scala-lang" % " scala-compiler" % scalaVersion.value % " test"
22
+ libraryDependencies += (" org.scala-lang" % " scala-compiler" % scalaVersion.value % " test" ).exclude(" org.scala-lang.modules" , s " scala-xml* " )
23
+
24
+ // needed to fix classloader issues (see #20)
25
+ // alternatively, manage the scala instance as shown below (commented)
26
+ fork in Test := true
27
+
28
+ // ALTERNATIVE: manage the Scala instance ourselves to exclude the published scala-xml (scala-compiler depends on it)
29
+ // since this dependency hides the classes we're testing
30
+ // managedScalaInstance := false
31
+ //
32
+ // ivyConfigurations += Configurations.ScalaTool
33
+ //
34
+ // libraryDependencies ++= Seq(
35
+ // "org.scala-lang" % "scala-library" % scalaVersion.value,
36
+ // ("org.scala-lang" % "scala-compiler" % scalaVersion.value % "scala-tool").exclude("org.scala-lang.modules", s"scala-xml_${scalaBinaryVersion.value}")
37
+ // )
Original file line number Diff line number Diff line change @@ -112,3 +112,8 @@ object XML extends XMLLoader[Elem] {
112
112
w.write(Utility .serialize(node, minimizeTags = minimizeTags).toString)
113
113
}
114
114
}
115
+
116
+ object Properties extends scala.util.PropertiesTrait {
117
+ protected def propCategory = " scala-xml"
118
+ protected def pickJarBasedOn = classOf [scala.xml.pull.XMLEventReader ]
119
+ }
Original file line number Diff line number Diff line change @@ -164,6 +164,11 @@ class CompilerErrors extends CompilerTesting {
164
164
165
165
// TODO: factor out somewhere?
166
166
class CompilerTesting {
167
+ // TODO: refine this; for now, just println -- the goal is to ensure we're testing the right version of scala-xml
168
+ // (it should print the same thing as the version in the sbt build)
169
+ // we used to always test the scala-xml jar that the compiler depends on, because it was part of the scala-tool ivy config
170
+ println(s " Testing scala-xml version ${Properties .versionNumberString}. " )
171
+
167
172
def errorMessages (errorSnippet : String , compileOptions : String = " " )(code : String ): List [String ] = {
168
173
import scala .tools .reflect ._
169
174
val m = scala.reflect.runtime.currentMirror
You can’t perform that action at this time.
0 commit comments