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

Commit 22dac31

Browse files
committed
Temporarily insource Scalacheck 1.11.6
This is a temporary measure until we release Scala 2.12.0. It means we are able to release milestones, and RCs of Scala without needing a public release of Scalacheck. While we've never had to wait very long for these in the past (Thanks, Rickard!) we'd like to spare the maintainer some work betwen now and 2.12.0. After we release Scala 2.12.0, we'll revert to a binary dependency on the standard Scalacheck. I have replaced the scala-parser-combinator based command line option parsing with a quick and dirty version. I've had to remove scalacheck as a SBT test framework in our build. We don't use it directly as such (instead, it is used indirectly through `partest --scalacheck`), and it's test discovery (which we expect to return nothing) fails after re-STARR-ing due to an unsolved problem with SBT's testLoader including either STARR or sbt-launch.jar on the classpath used to discover and spawn tests. For the record, I tried the following to no avail: ``` // Two modifications are needed from the stock SBT configuration in order to exclude STARR // from the classloader that performs test discovery. // - We make `isManagedVersion` hold by providing an explicit Scala version, in order to go into the desired // branch in `createTestLoader` // - We remove STARR from the classloader of the scala instance def fixTestLoader = testLoader := { val s = scalaInstance.value val scalaInstance1 = new ScalaInstance(s.version, appConfiguration.value.provider.scalaProvider.loader(), s.libraryJar, s.compilerJar, s.extraJars, Some(s.actualVersion)) assert(scalaInstance1.isManagedVersion) TestFramework.createTestLoader(Attributed.data(fullClasspath.value), scalaInstance1, IO.createUniqueDirectory(taskTemporaryDirectory.value)) } ``` f
1 parent 4e95083 commit 22dac31

19 files changed

+3653
-23
lines changed

build.sbt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ val scalaParserCombinatorsDep = scalaDep("org.scala-lang.modules", "scala-par
6060
val scalaSwingDep = scalaDep("org.scala-lang.modules", "scala-swing")
6161
val scalaXmlDep = scalaDep("org.scala-lang.modules", "scala-xml")
6262
val partestDep = scalaDep("org.scala-lang.modules", "scala-partest", versionProp = "partest")
63-
val scalacheckDep = scalaDep("org.scalacheck", "scalacheck", scope = "it")
6463

6564
// Non-Scala dependencies:
6665
val junitDep = "junit" % "junit" % "4.11"
@@ -562,6 +561,7 @@ lazy val junit = project.in(file("test") / "junit")
562561
fork in Test := true,
563562
libraryDependencies ++= Seq(junitDep, junitInterfaceDep, jolDep),
564563
testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-v"),
564+
testFrameworks -= new TestFramework("org.scalacheck.ScalaCheckFramework"),
565565
unmanagedSourceDirectories in Test := List(baseDirectory.value)
566566
)
567567

@@ -642,7 +642,7 @@ lazy val test = project
642642
.settings(disablePublishing: _*)
643643
.settings(Defaults.itSettings: _*)
644644
.settings(
645-
libraryDependencies ++= Seq(asmDep, partestDep, scalaXmlDep, scalacheckDep),
645+
libraryDependencies ++= Seq(asmDep, partestDep, scalaXmlDep),
646646
libraryDependencies ++= {
647647
// Resolve the JARs for all test/files/lib/*.jar.desired.sha1 files through Ivy
648648
val baseDir = (baseDirectory in ThisBuild).value
@@ -659,6 +659,7 @@ lazy val test = project
659659
fork in IntegrationTest := true,
660660
javaOptions in IntegrationTest += "-Xmx2G",
661661
testFrameworks += new TestFramework("scala.tools.partest.sbt.Framework"),
662+
testFrameworks -= new TestFramework("org.scalacheck.ScalaCheckFramework"),
662663
testOptions in IntegrationTest += Tests.Argument("-Dpartest.java_opts=-Xmx1024M -Xms64M -XX:MaxPermSize=128M"),
663664
testOptions in IntegrationTest += Tests.Argument("-Dpartest.scalac_opts=" + (scalacOptions in Compile).value.mkString(" ")),
664665
testOptions in IntegrationTest += Tests.Setup { () =>

build.xml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,6 @@ TODO:
319319
<prepareCross name="scala-parser-combinators" />
320320
<prepareCross name="scala-swing"/>
321321
<prepareCross name="partest"/>
322-
<prepareCross name="scalacheck"/>
323322

324323
<artifact:dependencies pathId="asm.classpath" filesetId="asm.fileset">
325324
<dependency groupId="org.scala-lang.modules" artifactId="scala-asm" version="${scala-asm.version}"/>
@@ -339,11 +338,6 @@ TODO:
339338
</artifact:dependencies>
340339
<copy-deps project="partest"/>
341340

342-
<artifact:dependencies pathId="scalacheck.classpath" filesetId="scalacheck.fileset" versionsId="scalacheck.versions">
343-
<artifact:remoteRepository refid="extra-repo"/>
344-
<dependency groupId="org.scalacheck" artifactId="scalacheck${scalacheck.cross}" version="${scalacheck.version.number}" />
345-
</artifact:dependencies>
346-
347341
<artifact:dependencies pathId="repl.deps.classpath" filesetId="repl.fileset" versionsId="repl.deps.versions">
348342
<dependency groupId="jline" artifactId="jline" version="${jline.version}"/>
349343
</artifact:dependencies>
@@ -567,7 +561,6 @@ TODO:
567561
<echo message="scala-swing.version.number = ${scala-swing.version.number}"/>
568562
<echo message="jline.version = ${jline.version}"/>
569563
<echo message="partest.version.number = ${partest.version.number}"/>
570-
<echo message="scalacheck.version.number = ${scalacheck.version.number}"/>
571564

572565
<propertyfile file="versions.properties">
573566
<entry key="starr.version" value="${starr.version}"/>
@@ -577,7 +570,6 @@ TODO:
577570
<entry key="scala-swing.version.number" value="${scala-swing.version.number}"/>
578571
<entry key="jline.version" value="${jline.version}"/>
579572
<entry key="partest.version.number" value="${partest.version.number}"/>
580-
<entry key="scalacheck.version.number" value="${scalacheck.version.number}"/>
581573
</propertyfile>
582574
</then></if>
583575

@@ -922,7 +914,7 @@ TODO:
922914
(but not scala-library, so we filter that one out...)
923915
so we provide them: scala-[library/reflect/compiler], scalap built here,
924916
scala-xml, scala-parser-combinators via external-modules-nocore,
925-
scalacheck as part of `partest.classpath` -->
917+
as part of `partest.classpath` -->
926918
<restrict>
927919
<path refid="partest.classpath"/>
928920
<rsel:not><rsel:or>
@@ -933,17 +925,6 @@ TODO:
933925
<pathelement location="${scala-parser-combinators}"/>
934926
<!-- <pathelement location="${scala-swing}"/> -->
935927

936-
<restrict>
937-
<path refid="scalacheck.classpath"/>
938-
<rsel:not><rsel:or>
939-
<rsel:name name="scala-library*.jar"/>
940-
<rsel:name name="scala-compiler*.jar"/>
941-
<rsel:name name="scala-reflect*.jar"/>
942-
<rsel:name name="scala-parser-combinators*.jar"/>
943-
<rsel:name name="scala-xml*.jar"/>
944-
</rsel:or></rsel:not>
945-
</restrict>
946-
947928
<!-- partest classes specific to the core compiler build -->
948929
<pathelement location="${partest-extras.jar}"/>
949930
<pathelement location="${partest-javaagent.jar}"/>

doc/LICENSE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ This license is used by the following third-party libraries:
4646
This license is used by the following third-party libraries:
4747

4848
* jline
49+
* scalacheck
4950

5051
### [BSD 3-Clause License](http://opensource.org/licenses/BSD-3-Clause)
5152
This license is used by the following third-party libraries:

doc/licenses/bsd_scalacheck.txt

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
ScalaCheck LICENSE
2+
3+
Copyright (c) 2007-2013, Rickard Nilsson
4+
All rights reserved.
5+
6+
Permission to use, copy, modify, and distribute this software in source
7+
or binary form for any purpose with or without fee is hereby granted,
8+
provided that the following conditions are met:
9+
10+
1. Redistributions of source code must retain the above copyright
11+
notice, this list of conditions and the following disclaimer.
12+
13+
2. Redistributions in binary form must reproduce the above copyright
14+
notice, this list of conditions and the following disclaimer in the
15+
documentation and/or other materials provided with the distribution.
16+
17+
3. Neither the name of the author nor the names of its contributors
18+
may be used to endorse or promote products derived from this
19+
software without specific prior written permission.
20+
21+
22+
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25+
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32+
SUCH DAMAGE.

0 commit comments

Comments
 (0)