Skip to content

Commit

Permalink
Update pantsbuild/pants to scala 2.12, and bump the default patch ver…
Browse files Browse the repository at this point in the history
…sion for 2.12 (pantsbuild#7035)

### Problem

Newer versions of zinc are only published for scala 2.12, but pantsbuild/pants is still on 2.11.

### Solution

Bump to 2.12.

### Result

This should have no impact on end users, except that I _think_ that will introduce a requirement that jdk8 is available (if we did not have that requirement already).
  • Loading branch information
Stu Hood authored Jan 8, 2019
1 parent c6e5702 commit 599861e
Show file tree
Hide file tree
Showing 18 changed files with 44 additions and 43 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jar_library(name='protobuf-test-import',

jar_library(name='shapeless',
jars=[
scala_jar(org='com.chuusai', name='shapeless', rev='2.2.5'),
scala_jar(org='com.chuusai', name='shapeless', rev='2.3.2'),
])

jar_library(name='slf4j-api',
Expand Down
4 changes: 2 additions & 2 deletions 3rdparty/jvm/org/scala-sbt/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ jar_library(
jars=[
scala_jar(org='org.scala-sbt', name='zinc', rev='1.1.7',
excludes=[
exclude(org='org.scala-sbt', name='io_2.11'),
exclude(org='org.scala-sbt', name='util-logging_2.11'),
exclude(org='org.scala-sbt', name='io_2.12'),
exclude(org='org.scala-sbt', name='util-logging_2.12'),
]),
],
dependencies=[
Expand Down
4 changes: 2 additions & 2 deletions 3rdparty/jvm/org/specs2/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Licensed under the Apache License, Version 2.0 (see LICENSE).

jar_library(
name='specs2-junit_2.11',
name='specs2-junit',
jars=[
jar(org='org.specs2', name='specs2-junit_2.11', rev='3.8.9'),
scala_jar(org='org.specs2', name='specs2-junit', rev='3.8.9'),
],
)
4 changes: 2 additions & 2 deletions contrib/scalajs/3rdparty/jvm/org/scala-js/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SCALAJS_REV = '0.6.14'
SCALAJS_REV = '0.6.25'

jar_library(name = 'cli',
jars = [
Expand All @@ -8,7 +8,7 @@ jar_library(name = 'cli',

jar_library(name = 'compiler',
jars = [
jar(org='org.scala-js', name='scalajs-compiler_2.11.8', rev=SCALAJS_REV),
jar(org='org.scala-js', name='scalajs-compiler_2.12.8', rev=SCALAJS_REV),
],
)

Expand Down
2 changes: 1 addition & 1 deletion examples/tests/scala/org/pantsbuild/example/specs2/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

junit_tests(
dependencies=[
'3rdparty/jvm/org/specs2:specs2-junit_2.11',
'3rdparty/jvm/org/specs2:specs2-junit',
],
)
2 changes: 1 addition & 1 deletion pants.ini
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ skip: True
skip: True

[scala]
version: 2.11
version: 2.12


[java]
Expand Down
2 changes: 1 addition & 1 deletion src/python/pants/backend/jvm/subsystems/scala_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
scala_build_info = {
'2.10': major_version_info(full_version='2.10.6'),
'2.11': major_version_info(full_version='2.11.12'),
'2.12': major_version_info(full_version='2.12.4'),
'2.12': major_version_info(full_version='2.12.8'),
}


Expand Down
1 change: 1 addition & 0 deletions tests/python/pants_test/backend/jvm/tasks/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ python_tests(
'tests/python/pants_test:int-test',
],
tags = {'integration'},
timeout = 120,
)

python_tests(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,22 @@ def tearDown(self):
safe_rmtree(self.pushdb_root)

def test_scala_publish(self):
unique_artifacts = {'org/pantsbuild/testproject/publish/jvm-example-lib_2.11/0.0.1-SNAPSHOT':
unique_artifacts = {'org/pantsbuild/testproject/publish/jvm-example-lib_2.12/0.0.1-SNAPSHOT':
['ivy-0.0.1-SNAPSHOT.xml',
'jvm-example-lib_2.11-0.0.1-SNAPSHOT.jar',
'jvm-example-lib_2.11-0.0.1-SNAPSHOT.pom',
'jvm-example-lib_2.11-0.0.1-SNAPSHOT-sources.jar'],
'org/pantsbuild/testproject/publish/hello/welcome_2.11/0.0.1-SNAPSHOT':
'jvm-example-lib_2.12-0.0.1-SNAPSHOT.jar',
'jvm-example-lib_2.12-0.0.1-SNAPSHOT.pom',
'jvm-example-lib_2.12-0.0.1-SNAPSHOT-sources.jar'],
'org/pantsbuild/testproject/publish/hello/welcome_2.12/0.0.1-SNAPSHOT':
['ivy-0.0.1-SNAPSHOT.xml',
'welcome_2.11-0.0.1-SNAPSHOT.jar',
'welcome_2.11-0.0.1-SNAPSHOT.pom',
'welcome_2.11-0.0.1-SNAPSHOT-sources.jar']}
'welcome_2.12-0.0.1-SNAPSHOT.jar',
'welcome_2.12-0.0.1-SNAPSHOT.pom',
'welcome_2.12-0.0.1-SNAPSHOT-sources.jar']}
self.publish_test('testprojects/src/scala/org/pantsbuild/testproject/publish'
':jvm-run-example-lib',
dict(list(unique_artifacts.items()) + list(shared_artifacts('0.0.1-SNAPSHOT').items())),
['org.pantsbuild.testproject.publish/hello-greet/publish.properties',
'org.pantsbuild.testproject.publish/jvm-example-lib_2.11/publish.properties',
'org.pantsbuild.testproject.publish.hello/welcome_2.11/publish.properties'],
'org.pantsbuild.testproject.publish/jvm-example-lib_2.12/publish.properties',
'org.pantsbuild.testproject.publish.hello/welcome_2.12/publish.properties'],
extra_options=['--doc-scaladoc-skip'],
assert_publish_config_contents=True)

Expand Down Expand Up @@ -187,8 +187,8 @@ def test_publish_extras_invalid_args(self):
def test_scala_publish_classifiers(self):
self.publish_test('testprojects/src/scala/org/pantsbuild/testproject/publish/classifiers',
dict({
'org/pantsbuild/testproject/publish/classifiers_2.11/0.0.1-SNAPSHOT': [
'classifiers_2.11-0.0.1-SNAPSHOT.pom',
'org/pantsbuild/testproject/publish/classifiers_2.12/0.0.1-SNAPSHOT': [
'classifiers_2.12-0.0.1-SNAPSHOT.pom',
'ivy-0.0.1-SNAPSHOT.xml',
]}),
[],
Expand All @@ -197,20 +197,20 @@ def test_scala_publish_classifiers(self):
def test_override_via_coord(self):
self.publish_test(
target='testprojects/src/scala/org/pantsbuild/testproject/publish/classifiers',
artifacts=dict({'org/pantsbuild/testproject/publish/classifiers_2.11/1.2.3-SNAPSHOT': [
'classifiers_2.11-1.2.3-SNAPSHOT.pom',
artifacts=dict({'org/pantsbuild/testproject/publish/classifiers_2.12/1.2.3-SNAPSHOT': [
'classifiers_2.12-1.2.3-SNAPSHOT.pom',
'ivy-1.2.3-SNAPSHOT.xml',
]}),
pushdb_files=[],
extra_options=['--override=org.pantsbuild.testproject.publish#classifiers_2.11=1.2.3'],
extra_options=['--override=org.pantsbuild.testproject.publish#classifiers_2.12=1.2.3'],
assert_publish_config_contents=True)

def test_override_via_address(self):
target = 'testprojects/src/scala/org/pantsbuild/testproject/publish/classifiers'
self.publish_test(
target=target,
artifacts=dict({'org/pantsbuild/testproject/publish/classifiers_2.11/1.2.3-SNAPSHOT': [
'classifiers_2.11-1.2.3-SNAPSHOT.pom',
artifacts=dict({'org/pantsbuild/testproject/publish/classifiers_2.12/1.2.3-SNAPSHOT': [
'classifiers_2.12-1.2.3-SNAPSHOT.pom',
'ivy-1.2.3-SNAPSHOT.xml',
]}),
pushdb_files=[],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def test_sources_and_javadocs(self):
with self.temporary_workdir() as workdir:
test_target = 'testprojects/src/scala/org/pantsbuild/testproject/unicode/shapeless'
json_data = self.run_export(test_target, workdir, load_libs=True)
shapeless_lib = json_data.get('libraries').get('com.chuusai:shapeless_2.11:2.2.5')
shapeless_lib = json_data.get('libraries').get('com.chuusai:shapeless_2.12:2.3.2')
self.assertIsNotNone(shapeless_lib)
self.assertIsNotNone(shapeless_lib['default'])
self.assertIsNotNone(shapeless_lib['sources'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Licensed under the Apache License, Version 2.0 (see LICENSE).
<!-- generated by pants! -->
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd" xmlns:m="http://ant.apache.org/ivy/maven">

<info organisation="org.pantsbuild.testproject.publish.hello" module="welcome_2.11" revision="0.0.1-SNAPSHOT" status="release" />
<info organisation="org.pantsbuild.testproject.publish.hello" module="welcome_2.12" revision="0.0.1-SNAPSHOT" status="release" />

<publications>
<artifact/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<modelVersion>4.0.0</modelVersion>

<groupId>org.pantsbuild.testproject.publish.hello</groupId>
<artifactId>welcome_2.11</artifactId>
<artifactId>welcome_2.12</artifactId>
<packaging>jar</packaging>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
Expand All @@ -22,7 +22,7 @@
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.11.12</version>
<version>2.12.8</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<modelVersion>4.0.0</modelVersion>

<groupId>org.pantsbuild.testproject.publish</groupId>
<artifactId>classifiers_2.11</artifactId>
<artifactId>classifiers_2.12</artifactId>
<packaging>jar</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>org.pantsbuild.testproject.publish:classifiers_2.11</name>
<name>org.pantsbuild.testproject.publish:classifiers_2.12</name>
<description>This is a test. This is only a test.</description>
<url>http://pantsbuild.github.io/</url>
<licenses>
Expand All @@ -38,7 +38,7 @@
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.11.12</version>
<version>2.12.8</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<modelVersion>4.0.0</modelVersion>

<groupId>org.pantsbuild.testproject.publish</groupId>
<artifactId>classifiers_2.11</artifactId>
<artifactId>classifiers_2.12</artifactId>
<packaging>jar</packaging>
<version>1.2.3-SNAPSHOT</version>
<name>org.pantsbuild.testproject.publish:classifiers_2.11</name>
<name>org.pantsbuild.testproject.publish:classifiers_2.12</name>
<description>This is a test. This is only a test.</description>
<url>http://pantsbuild.github.io/</url>
<licenses>
Expand All @@ -38,7 +38,7 @@
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.11.12</version>
<version>2.12.8</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Licensed under the Apache License, Version 2.0 (see LICENSE).
<!-- generated by pants! -->
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd" xmlns:m="http://ant.apache.org/ivy/maven">

<info organisation="org.pantsbuild.testproject.publish" module="classifiers_2.11" revision="0.0.1-SNAPSHOT" status="release" />
<info organisation="org.pantsbuild.testproject.publish" module="classifiers_2.12" revision="0.0.1-SNAPSHOT" status="release" />

<publications>
<artifact/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Licensed under the Apache License, Version 2.0 (see LICENSE).
<!-- generated by pants! -->
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd" xmlns:m="http://ant.apache.org/ivy/maven">

<info organisation="org.pantsbuild.testproject.publish" module="classifiers_2.11" revision="1.2.3-SNAPSHOT" status="release" />
<info organisation="org.pantsbuild.testproject.publish" module="classifiers_2.12" revision="1.2.3-SNAPSHOT" status="release" />

<publications>
<artifact/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Licensed under the Apache License, Version 2.0 (see LICENSE).
<!-- generated by pants! -->
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd" xmlns:m="http://ant.apache.org/ivy/maven">

<info organisation="org.pantsbuild.testproject.publish" module="jvm-example-lib_2.11" revision="0.0.1-SNAPSHOT" status="release" />
<info organisation="org.pantsbuild.testproject.publish" module="jvm-example-lib_2.12" revision="0.0.1-SNAPSHOT" status="release" />

<publications>
<artifact/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@
<modelVersion>4.0.0</modelVersion>

<groupId>org.pantsbuild.testproject.publish</groupId>
<artifactId>jvm-example-lib_2.11</artifactId>
<artifactId>jvm-example-lib_2.12</artifactId>
<packaging>jar</packaging>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.pantsbuild.testproject.publish.hello</groupId>
<artifactId>welcome_2.11</artifactId>
<artifactId>welcome_2.12</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.11.12</version>
<version>2.12.8</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down

0 comments on commit 599861e

Please sign in to comment.