Skip to content
This repository was archived by the owner on Sep 8, 2022. It is now read-only.

Commit 5f6fa46

Browse files
committed
Merge pull request #7 from gkossakowski/provided-depdencies
Upgrade to Scala 2.11.0-M6 and mark Scala dependencies as provided.
2 parents 2c50eed + 9d478a4 commit 5f6fa46

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

build.sbt

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name := "scala-partest"
77
version := "1.0.0-SNAPSHOT"
88

99
// TODO: bump to 1.0.0-RC5 as soon as it's out
10-
scalaXmlVersion := "1.0-RC4"
10+
scalaXmlVersion := "1.0.0-RC6"
1111

1212
// so we don't have to wait for sonatype to synch to maven central when deploying a new module
1313
resolvers += Resolver.sonatypeRepo("releases")
@@ -19,29 +19,30 @@ libraryDependencies += "com.googlecode.java-diff-utils" % "diffutils" % "1.
1919

2020
libraryDependencies += "org.scala-sbt" % "test-interface" % "1.0"
2121

22-
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.10.1"
22+
// mark as intransitive because 1.10.1 released against Scala 2.11.0-M6 has wrong dependencies
23+
// once we upgrade to M7 the intransitive bit can be dropped
24+
// however, provided should stay; if one wants to run scalacheck tests it should depend on
25+
// scalacheck explicitly
26+
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.10.1" % "provided" intransitive()
2327

24-
libraryDependencies += "org.scala-lang.modules" %% "scala-xml" % scalaXmlVersion.value
28+
// mark all scala dependencies as provided which means one has to explicitly provide them when depending on partest
29+
// this allows for easy testing of modules (like scala-xml) that provide tested classes themselves and shouldn't
30+
// pull in an older version of itself
31+
libraryDependencies += "org.scala-lang.modules" %% "scala-xml" % scalaXmlVersion.value % "provided" intransitive()
2532

26-
libraryDependencies += "org.scala-lang" % "scalap" % scalaVersion.value
33+
libraryDependencies += "org.scala-lang" % "scalap" % scalaVersion.value % "provided" intransitive()
2734

28-
// scalap depends on scala-compiler, which depends (for the scaladoc part) on scala-xml and scala-parser-combinators
29-
// more precisely, scala-compiler_2.11.0-M5 depends on
30-
// scala-xml_2.11.0-M4 and
31-
// scala-parser-combinators_2.11.0-M4,
32-
// so that we get a binary version incompatibility warning
33-
// To fix this, we'll modularize scaladoc to remove the dependency from scala-compiler-core,
34-
// and use dbuild to replicate the staged build we had originally,
35-
// so that we don't mix cross-versioned artifacts.
36-
conflictWarning ~= { _.copy(failOnConflict = false) }
35+
libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value % "provided" intransitive()
36+
37+
libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value % "provided" intransitive()
3738

3839
// standard stuff follows:
39-
scalaVersion := "2.11.0-M5"
40+
scalaVersion := "2.11.0-M6"
4041

4142
// NOTE: not necessarily equal to scalaVersion
4243
// (e.g., during PR validation, we override scalaVersion to validate,
4344
// but don't rebuild scalacheck, so we don't want to rewire that dependency)
44-
scalaBinaryVersion := "2.11.0-M5"
45+
scalaBinaryVersion := "2.11.0-M6"
4546

4647
// don't use for doc scope, scaladoc warnings are not to be reckoned with
4748
scalacOptions in (Compile, compile) ++= Seq("-optimize", "-Xfatal-warnings", "-feature", "-deprecation", "-unchecked", "-Xlint")

0 commit comments

Comments
 (0)