Skip to content
This repository has been archived by the owner on Dec 13, 2019. It is now read-only.

Commit

Permalink
Upgrade to pants 0.0.44.
Browse files Browse the repository at this point in the history
The release notes are here:
  https://pypi.python.org/pypi/pantsbuild.pants/0.0.44

Of particular interest to twitter/commons is the graduation of the
isolated jvm compile strategy to a viable out-of-the-box solution for
java & scala compiles.  This change includes a switch over to that
strategy which necessitated an upgrade to scala 2.10.

Testing Done:
CI went green here:
  https://travis-ci.org/twitter/commons/builds/77066466

Bugs closed: 410

Reviewed at https://rbcommons.com/s/twitter/r/2691/
  • Loading branch information
jsirois committed Aug 24, 2015
1 parent 146de30 commit d4454f2
Show file tree
Hide file tree
Showing 15 changed files with 67 additions and 27 deletions.
4 changes: 2 additions & 2 deletions 3rdparty/jvm/com/twitter/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
# ==================================================================================================

SCALA_REV = '2.9.2'
SCALA_REV = '2.10'


def make_lib(name, rev, scala_rev=None, excludes=None, deps=None):
Expand Down Expand Up @@ -77,7 +77,7 @@ make_util_lib('util-jvm')
make_lib('jsr166e', '1.0.0')


make_lib('ostrich', '9.1.2')
make_lib('ostrich', '9.1.2', scala_rev=SCALA_REV)


make_lib('twitter-text', '1.5.0')
7 changes: 0 additions & 7 deletions 3rdparty/jvm/com/twitter/common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,3 @@ jar_library(name='metrics-data-sample',
jar(org='com.twitter.common', name='metrics-data-sample', rev='0.0.1'),
]
)

jar_library(name='junit-runner-annotations',
jars=[
jar(org='com.twitter.common', name='junit-runner-annotations', rev='0.0.6'),
]
)

21 changes: 21 additions & 0 deletions 3rdparty/jvm/org/pantsbuild/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# ==================================================================================================
# Copyright 2015 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this work except in compliance with the License.
# You may obtain a copy of the License in the LICENSE file, or at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==================================================================================================

jar_library(name='junit-runner-annotations',
jars=[
jar(org='org.pantsbuild', name='junit-runner-annotations', rev='0.0.4')
]
)
2 changes: 1 addition & 1 deletion 3rdparty/jvm/org/scala-lang/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
# ==================================================================================================

REV = '2.9.3'
REV = '2.10.5'

def make_lib(name):
jar_library(name=name,
Expand Down
6 changes: 2 additions & 4 deletions 3rdparty/jvm/org/scala-tools/testing/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@
# limitations under the License.
# ==================================================================================================

jar_library(name='specs_2.9',
jar_library(name='specs',
jars=[
# This arrangement gets our version of scalatest playing well with specs; without this,
# a scala-library inconsistency - _despite_ matching 2.9.3 monikers at the dep roots - creeps
# in.
jar(org='org.scala-tools.testing', name='specs_2.9.3', rev='1.6.9')
jar(org='org.scala-tools.testing', name='specs_2.10', rev='1.6.9')
.exclude(org='org.scalatest', name='scalatest'),
],
dependencies=[
'3rdparty/jvm/org/scalatest'
]
)

target(name='specs', dependencies=[':specs_2.9'])
2 changes: 1 addition & 1 deletion 3rdparty/jvm/org/scalatest/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@

jar_library(name='scalatest',
jars=[
jar(org='org.scalatest', name='scalatest_2.9.3', rev='1.9.2')
jar(org='org.scalatest', name='scalatest_2.10', rev='1.9.2')
]
)
4 changes: 2 additions & 2 deletions BUILD.tools
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ make_lib('com.google.code.java-allocation-instrumenter', 'java-allocation-instru


# ScalaRepl
make_lib('org.scala-lang', 'scala-compiler', '2.9.3', lib_name='scala-repl',
make_lib('org.scala-lang', 'scala-compiler', '2.10.5', lib_name='scala-repl',
jars=[
jar(org='org.scala-lang', name='jline', rev='2.9.3'),
jar(org='org.scala-lang', name='jline', rev='2.10.5'),
]
)

Expand Down
33 changes: 31 additions & 2 deletions pants.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
; pants_workdir: the scratch space used to for live builds in this repo

[DEFAULT]
pants_version: 0.0.42
pants_version: 0.0.44

plugins: [
'pantsbuild.pants.contrib.scrooge==%(pants_version)s',
Expand Down Expand Up @@ -120,6 +120,13 @@ config: %(buildroot)s/build-support/scalastyle/scalastyle_config.xml
excludes: %(buildroot)s/build-support/scalastyle/excludes.txt


[compile.apt]
strategy: isolated


[compile.java]
use_jmake: False

[compile.zinc]
# We explicitly list no plugins here since the python and pants ini file handling defaults ini
# options from the DEFAULT section. In this case the DEFAULT ini section defines the `plugins`
Expand All @@ -128,6 +135,29 @@ excludes: %(buildroot)s/build-support/scalastyle/excludes.txt
# https://github.com/pantsbuild/pants/issues/1803
plugins: []

strategy: isolated
worker_count: 4
zinc: [':zinc']
jvm_options: [
'-Xmx2g', '-XX:MaxPermSize=256m', '-XX:+UseConcMarkSweepGC', '-XX:ParallelGCThreads=4',
# bigger cache size for our big projects (default is just 5)
'-Dzinc.analysis.cache.limit=10',
]

args: [
'-S-encoding', '-SUTF-8',
'-S-g:vars',
]
warning_args: [
'-S-deprecation',
'-S-unchecked',
# request warnings for http://www.scala-lang.org/api/2.10.4/index.html#scala.language$
'-S-feature',
]
no_warning_args: [
'-S-nowarn',
]


[jvm-platform]
platforms: {
Expand Down Expand Up @@ -164,4 +194,3 @@ interpreter_requirement: CPython>=2.7,<3
[python-repos]
# The custom repo is only needed for antlr-python-runtime.
repos: ['https://raw.github.com/twitter/commons/binaries/pants/third_party/python/index.html']

2 changes: 1 addition & 1 deletion tests/java/com/twitter/common/metrics/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
java_tests(name = 'metrics',
dependencies = [
'3rdparty/jvm/com/google/guava',
'3rdparty/jvm/com/twitter/common:junit-runner-annotations',
'3rdparty/jvm/junit',
'3rdparty/jvm/org/pantsbuild:junit-runner-annotations',
'src/java/com/twitter/common/metrics',
'src/java/com/twitter/common/objectsize',
'src/java/com/twitter/common/stats',
Expand Down
2 changes: 1 addition & 1 deletion tests/java/com/twitter/common/metrics/HistogramTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package com.twitter.common.metrics;

import org.junit.Test;
import org.pantsbuild.junit.annotations.TestParallel;

import com.twitter.common.junit.annotations.TestParallel;
import com.twitter.common.quantity.Amount;
import com.twitter.common.quantity.Data;
import com.twitter.common.quantity.Time;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import com.google.common.collect.ImmutableList;

import org.junit.Test;
import org.pantsbuild.junit.annotations.TestParallel;

import com.twitter.common.junit.annotations.TestParallel;
import com.twitter.common.objectsize.ObjectSizeCalculator;
import com.twitter.common.quantity.Amount;
import com.twitter.common.quantity.Data;
Expand Down
2 changes: 1 addition & 1 deletion tests/java/com/twitter/common/stats/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ java_tests(name = 'stats',
dependencies = [
'3rdparty/jvm/org/easymock',
'3rdparty/jvm/com/google/guava',
'3rdparty/jvm/com/twitter/common:junit-runner-annotations',
'3rdparty/jvm/junit',
'3rdparty/jvm/org/mockito',
'3rdparty/jvm/org/pantsbuild:junit-runner-annotations',
'src/java/com/twitter/common/quantity',
'src/java/com/twitter/common/objectsize',
'src/java/com/twitter/common/stats',
Expand Down
2 changes: 1 addition & 1 deletion tests/java/com/twitter/common/stats/WindowedStatsTest.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.twitter.common.stats;

import org.junit.Test;
import org.pantsbuild.junit.annotations.TestParallel;

import com.twitter.common.junit.annotations.TestParallel;
import com.twitter.common.quantity.Amount;
import com.twitter.common.quantity.Time;
import com.twitter.common.stats.WindowedStatistics;
Expand Down
2 changes: 1 addition & 1 deletion tests/java/com/twitter/common/testing/junit/rules/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ junit_tests(
dependencies=[
'3rdparty/jvm/junit',
'3rdparty/jvm/com/google/code/findbugs:jsr305',
'3rdparty/jvm/com/twitter/common:junit-runner-annotations',
'3rdparty/jvm/org/pantsbuild:junit-runner-annotations',
'src/java/com/twitter/common/testing/junit/rules',
],
sources=globs('*.java')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
import org.junit.rules.MethodRule;
import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.Statement;

import com.twitter.common.junit.annotations.TestSerial;
import org.pantsbuild.junit.annotations.TestSerial;

// SUPPRESS CHECKSTYLE:OFF IllegalThrows
public class RetryTest {
Expand Down

0 comments on commit d4454f2

Please sign in to comment.