Skip to content

Commit a24e7fa

Browse files
committed
M6 modules, partest depends on scala as provided.
The new partest now marks its scala dependencies as provided. This is much more robust than before, and it breaks ugly cycles. Updated the build for partest-extras to provide the required scala-compiler dependency. Also, upgrade pax-url-aether to 1.6.0. Since our jenkins uses mirrors with passwords, we needed a fix for https://ops4j1.jira.com/browse/PAXURL-217 in order to run osgi.test on jenkins, now that we use maven more. We didn't hit this bug before because we were using a standard location for the maven local repository, but that causes problems with concurrent jenkins jobs accessing it. So, I added the following to `~/.m2/settings`, and then ran into the issue described above. Also removed some non-essential uses of the extra-repo (slows stuff down), and added a comment of how to make the osgi tests look in a certain local m2 repo (for /some/ operations...) ``` <!-- Maven repos are not safe for concurrent access, thus give each job its own. The WORKSPACE env var is set by jenkins to the path of the current job's workspace. This settings file will cause ant/maven to break if WORKSPACE is not set (to a writeable directory). I don't know how to encode a fall back, but I assume it's not needed as this is ~jenkins/.m2/settings.xml --> <localRepository>${WORKSPACE}/m2repo</localRepository> ```
1 parent 7ecfce1 commit a24e7fa

File tree

3 files changed

+24
-37
lines changed

3 files changed

+24
-37
lines changed

build.xml

Lines changed: 15 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -260,12 +260,14 @@ TODO:
260260
<copy-deps project="junit"/>
261261

262262
<!-- Pax runner -->
263-
<property name="pax.exam.version" value="2.5.0"/>
263+
<property name="pax.exam.version" value="2.6.0"/>
264264
<artifact:dependencies pathId="pax.exam.classpath" filesetId="pax.exam.fileset">
265265
<dependency groupId="org.ops4j.pax.exam" artifactId="pax-exam-container-native" version="${pax.exam.version}"/>
266266
<dependency groupId="org.ops4j.pax.exam" artifactId="pax-exam-junit4" version="${pax.exam.version}"/>
267267
<dependency groupId="org.ops4j.pax.exam" artifactId="pax-exam-link-assembly" version="${pax.exam.version}"/>
268-
<dependency groupId="org.ops4j.pax.url" artifactId="pax-url-aether" version="1.4.0"/>
268+
<!-- upgraded to 1.6.0 to get fix for https://ops4j1.jira.com/browse/PAXURL-217
269+
https://ops4j1.jira.com/browse/PAXURL-138 is still unresolved... -->
270+
<dependency groupId="org.ops4j.pax.url" artifactId="pax-url-aether" version="1.6.0"/>
269271
<dependency groupId="org.ops4j.pax.swissbox" artifactId="pax-swissbox-framework" version="1.5.1"/>
270272
<dependency groupId="ch.qos.logback" artifactId="logback-core" version="0.9.20"/>
271273
<dependency groupId="ch.qos.logback" artifactId="logback-classic" version="0.9.20"/>
@@ -282,8 +284,9 @@ TODO:
282284
<!-- so we don't have to wait for artifacts to synch to maven central
283285
(we don't distribute partest with Scala, so the risk of sonatype and maven being out of synch is irrelevant):
284286
-->
285-
<artifact:remoteRepository refid="extra-repo"/>
287+
<!-- <artifact:remoteRepository refid="extra-repo"/> -->
286288
<dependency groupId="org.scala-lang.modules" artifactId="scala-partest_${scala.binary.version}" version="${partest.version.number}" />
289+
<dependency groupId="org.scalacheck" artifactId="scalacheck_${scala.binary.version}" version="${scalacheck.version.number}" />
287290
</artifact:dependencies>
288291
<copy-deps project="partest"/>
289292

@@ -295,7 +298,7 @@ TODO:
295298
<!-- used by the test.osgi target to create osgi bundles for the xml, parser-combinator jars
296299
must specify sourcesFilesetId, javadocFilesetId to download these types of artifacts -->
297300
<artifact:dependencies pathId="external-modules.deps.classpath" sourcesFilesetId="external-modules.sources.fileset" javadocFilesetId="external-modules.javadoc.fileset">
298-
<artifact:remoteRepository refid="extra-repo"/>
301+
<!-- <artifact:remoteRepository refid="extra-repo"/> -->
299302
<dependency groupId="org.scala-lang.modules" artifactId="scala-xml_${scala.binary.version}" version="${scala-xml.version.number}"/>
300303
<dependency groupId="org.scala-lang.modules" artifactId="scala-parser-combinators_${scala.binary.version}" version="${scala-parser-combinators.version.number}"/>
301304
</artifact:dependencies>
@@ -313,25 +316,6 @@ TODO:
313316
</path>
314317
<copy-deps refid="external-modules-nocore" project="scaladoc"/>
315318

316-
<!--
317-
include partest and its run-time dependencies,
318-
but filter out the compiler we just built, as that's what we want to test!
319-
TODO: mark partest's compiler dependencies as provided when publishing to maven,
320-
so that we don't have to filter them out here...
321-
-->
322-
<path id="partest-deps-nocore">
323-
<restrict>
324-
<path refid="partest.classpath"/>
325-
<rsel:not><rsel:or>
326-
<rsel:name name="scala-library*.jar"/>
327-
<rsel:name name="scala-reflect*.jar"/>
328-
<rsel:name name="scala-compiler*.jar"/>
329-
<!-- TODO: remove actors & scalap, move to external modules -->
330-
<rsel:name name="scala-actors*.jar"/>
331-
<rsel:name name="scala-scalap*.jar"/>
332-
</rsel:or></rsel:not>
333-
</restrict>
334-
</path>
335319

336320
<!-- Set property named @{name} to the jar resolved as @{jar}_${scala.binary.version}:jar.
337321
@{jar}_${scala.binary.version} must be a maven dependency. -->
@@ -760,13 +744,13 @@ TODO:
760744
<path id="quick.partest-extras.build.path">
761745
<path refid="asm.classpath"/>
762746
<path refid="partest.classpath"/>
747+
<path refid="quick.compiler.build.path"/>
763748
<pathelement location="${build-quick.dir}/classes/repl"/>
764749
<!-- for the java dependency: Profiler.java -->
765750
<pathelement location="${build-quick.dir}/classes/partest-extras"/>
766751
</path>
767752

768753
<path id="quick.partest-javaagent.build.path">
769-
<path refid="partest.classpath"/>
770754
<path refid="asm.classpath"/>
771755
</path>
772756

@@ -905,18 +889,16 @@ TODO:
905889
<pathelement location="${reflect.jar}"/>
906890
<pathelement location="${compiler.jar}"/>
907891

908-
<!-- to test a quick build without packing, replace the above pathelements with: (may need a little tweaking)
909-
<path refid="quick.bin.tool.path">
910-
<path refid="quick.interactive.build.path">
911-
-->
912-
913892
<!-- TODO: move scalap & actors out of repo -->
914893
<pathelement location="${scalap.jar}"/>
915894
<pathelement location="${actors.jar}"/>
916895

917-
<!-- partest dependencies, without the jars we built locally
918-
TODO: figure out why scalap tests fail if we move this up-->
919-
<path refid="partest-deps-nocore"/>
896+
<!-- partest's dependencies, which marks most of its dependencies as provided,
897+
so we provide them: scala-[library/reflect/compiler], scalap built here,
898+
scala-xml, scala-parser-combinators via external-modules-nocore,
899+
scalacheck as part of `partest.classpath` -->
900+
<path refid="partest.classpath"/>
901+
<path refid="external-modules-nocore"/> <!-- xml, parsers -->
920902

921903
<!-- partest classes specific to the core compiler build -->
922904
<pathelement location="${partest-extras.jar}"/>
@@ -1807,6 +1789,7 @@ TODO:
18071789
<target name="test.suite.init" depends="partest.task">
18081790
<!-- read by test/partest to determine classpath used to run partest -->
18091791
<propertyfile file = "build/pack/partest.properties">
1792+
<!-- TODO: change "partest.classpath" to "partest.runtime.classpath" or something -->
18101793
<entry key = "partest.classpath" value="${toString:partest.compilation.path}"/>
18111794
</propertyfile>
18121795
</target>

test/osgi/src/ScalaOsgiHelper.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ trait ScalaOsgiHelper {
2121
def standardOptions: Array[exam.Option] = {
2222
val bundles = (allBundleFiles map makeBundle)
2323
bundles ++ Array[exam.Option](felix(), equinox(), junitBundles())
24+
// to change the local repo used (for some operations, but not all -- which is why I didn't bother):
25+
// systemProperty("org.ops4j.pax.url.mvn.localRepository").value(sys.props("maven.repo.local")))
2426
}
2527

2628
def justReflectionOptions: Array[exam.Option] = {

versions.properties

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
starr.version=2.11.0-M5
1+
starr.version=2.11.0-M6
2+
starr.use.released=1
23

34
# the below is used for depending on dependencies like partest
4-
scala.binary.version=2.11.0-M5
5-
partest.version.number=1.0-RC5
6-
scala-xml.version.number=1.0-RC4
7-
scala-parser-combinators.version.number=1.0-RC2
5+
scala.binary.version=2.11.0-M6
6+
partest.version.number=1.0.0-RC7
7+
scala-xml.version.number=1.0.0-RC6
8+
scala-parser-combinators.version.number=1.0.0-RC4
9+
scalacheck.version.number=1.10.1

0 commit comments

Comments
 (0)