Skip to content

[discussion] Scala 2.12 support #251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 14 commits into from

Conversation

gkossakowski
Copy link

This PR bumps dependencies to Scala 2.12 versions.

The output of running tests is:

[gkk@mbp ~/stripe/rules_scala (gkk-scala-2.12)]$ bazel test //test/...
INFO: Found 361 targets and 31 test targets...
ERROR: /Users/gkk/stripe/rules_scala/test/jmh/BUILD:23:1: Generating benchmark code for //test/jmh:test_benchmark_codegen failed: Process exited with status 1 [sandboxed].
Exception in thread "main" java.lang.RuntimeException
	at org.objectweb.asm.MethodVisitor.visitParameter(Unknown Source)
	at org.objectweb.asm.ClassReader.b(Unknown Source)
	at org.objectweb.asm.ClassReader.accept(Unknown Source)
	at org.objectweb.asm.ClassReader.accept(Unknown Source)
	at org.openjdk.jmh.generators.asm.ASMGeneratorSource.processClass(ASMGeneratorSource.java:60)
	at io.bazel.rules_scala.jmh_support.BenchmarkGenerator$.$anonfun$generateJmhBenchmark$3(BenchmarkGenerator.scala:140)
	at io.bazel.rules_scala.jmh_support.BenchmarkGenerator$.$anonfun$generateJmhBenchmark$3$adapted(BenchmarkGenerator.scala:139)
	at scala.collection.immutable.List.foreach(List.scala:389)
	at io.bazel.rules_scala.jmh_support.BenchmarkGenerator$.$anonfun$generateJmhBenchmark$2(BenchmarkGenerator.scala:139)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
	at io.bazel.rules_scala.jmh_support.BenchmarkGenerator$.withClassLoader(BenchmarkGenerator.scala:97)
	at io.bazel.rules_scala.jmh_support.BenchmarkGenerator$.$anonfun$generateJmhBenchmark$1(BenchmarkGenerator.scala:134)
	at io.bazel.rules_scala.jmh_support.BenchmarkGenerator$.$anonfun$generateJmhBenchmark$1$adapted(BenchmarkGenerator.scala:127)
	at io.bazel.rules_scala.jmh_support.BenchmarkGenerator$.withTempDirectory(BenchmarkGenerator.scala:107)
	at io.bazel.rules_scala.jmh_support.BenchmarkGenerator$.generateJmhBenchmark(BenchmarkGenerator.scala:127)
	at io.bazel.rules_scala.jmh_support.BenchmarkGenerator$.main(BenchmarkGenerator.scala:43)
	at io.bazel.rules_scala.jmh_support.BenchmarkGenerator.main(BenchmarkGenerator.scala)
Use --strategy=Generating=standalone to disable sandboxing for the failing actions.
FAIL: //test/aspect:scala_test (see /private/var/tmp/_bazel_gkk/bdf28b460d8a4ef6c8e29d02646a3035/execroot/io_bazel_rules_scala/bazel-out/darwin_x86_64-fastbuild/testlogs/test/aspect/scala_test/test.log).
INFO: Elapsed time: 2.312s, Critical Path: 1.30s
//test:HelloLibTest                                             (cached) PASSED in 7.0s
//test:HelloLibTestSuite_test_suite_HelloLibTest.scala          (cached) PASSED in 7.0s
//test:HelloLibTestSuite_test_suite_HelloLibTest2.scala         (cached) PASSED in 6.9s
//test:JunitFilterTest                                          (cached) PASSED in 1.4s
//test:JunitFiltersAbstractClassesAndInterfaces                 (cached) PASSED in 1.3s
//test:JunitFiltersClassesWithoutTests                          (cached) PASSED in 1.3s
//test:JunitFiltersInnerClasses                                 (cached) PASSED in 1.9s
//test:JunitIncludesClassesWithRunWith                          (cached) PASSED in 1.4s
//test:JunitIncludesClassesWithTestsFromParent                  (cached) PASSED in 1.4s
//test:JunitMultiplePrefixes                                    (cached) PASSED in 1.2s
//test:JunitMultipleSuffixes                                    (cached) PASSED in 1.3s
//test:JunitPrefixesAndSuffixes                                 (cached) PASSED in 1.3s
//test:JunitTestWithDeps                                        (cached) PASSED in 1.3s
//test:RunJavaBinary                                            (cached) PASSED in 0.9s
//test:RunJavaBinary2                                           (cached) PASSED in 1.0s
//test:RunJavaOnlySources                                       (cached) PASSED in 0.5s
//test:RunMixJavaScalaLibBinary                                 (cached) PASSED in 1.4s
//test:RunResourcesStripScalaBinary                             (cached) PASSED in 0.9s
//test:RunScalaBinary                                           (cached) PASSED in 0.9s
//test:RunScalaLibBinary                                        (cached) PASSED in 1.0s
//test:Specs2Tests                                              (cached) PASSED in 3.7s
//test:TestFilterTests                                          (cached) PASSED in 7.4s
//test:TestScalaBinaryInGenrule                                 (cached) PASSED in 0.1s
//test/aspect:aspect_test                                       (cached) PASSED in 0.1s
//test/aspect:scala_junit_test                                  (cached) PASSED in 2.7s
//test/aspect:scala_specs2_junit_test                           (cached) PASSED in 3.2s
//test:data_location_expansion                                  (cached) PASSED in 3.7s
//test:no_sig                                                   (cached) PASSED in 0.8s
//test/src/main/scala/scala/test/resource_jars:resource_jars    (cached) PASSED in 7.7s
//test/src/main/scala/scala/test/resources/strip:resouceStripPrefixTest (cached) PASSED in 4.7s
//test/aspect:scala_test                                                 FAILED in 1.3s
  /private/var/tmp/_bazel_gkk/bdf28b460d8a4ef6c8e29d02646a3035/execroot/io_bazel_rules_scala/bazel-out/darwin_x86_64-fastbuild/testlogs/test/aspect/scala_test/test.log

Executed 1 out of 31 tests: 30 tests pass and 1 fails locally.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.
[gkk@mbp ~/stripe/rules_scala (gkk-scala-2.12)]$

@bazel-io
Copy link

Can one of the admins verify this patch?

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

@@ -0,0 +1 @@
java_library(name = "transitive_scalatest", exports = ["@scalatest//jar", "@scalactic//jar"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this still needed?

Copy link
Author

@gkossakowski gkossakowski Jul 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so. That's what actually creates a target that depends on scalatest and scalactic.

This was referenced Jul 13, 2017
@oscar-stripe
Copy link
Contributor

@ittaiz you might want to take a look.

@oscar-stripe
Copy link
Contributor

@jeremydhoon any ideas about the jmh failure when we bump to 2.12?

Copy link
Contributor

@ittaiz ittaiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gkossakowski!
2.12 support is definitely something we want to get to.
I think the biggest obstacle before this PR is the need to support cross building #80 which is also something we really want (I guess Wix will need it in a few months as well).
WDYT?

@@ -732,7 +732,7 @@ scala_repl = rule(

def scala_version():
"""return the scala version for use in maven coordinates"""
return "2.11"
return "2.12"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't this be a problem? Don't we need to solve #80 (cross building) before merging this PR?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably go with the 2.12-specific branch for now and consolidate both when #80 is solved.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Main issue to consider is that we're in a few months of adding a host of new features to master so you'll need to catch up if we ever want to merge it in.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A branch is okay, but I share ittaiz anxiety about a long lived branch. I hope we can very quickly get the version configurable.

sha256 = "353f7c2bdde22c4286ee6a3ae0e425a9463b102f4c4cf76055a24f4666996762",
)

# scalatest has macros, note http_jar is invoking ijar
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand how the comment and the code fit together. Doesn't the ijar mess things up? I hope to send late next week a PR to add scala_import which will disable ijar (maybe with an option to turn it on)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code predates me and I don't understand how all pieces fit together, either.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ijar destroys macros because it removes all code attributes from the jars. So if a dependency has macros it cannot filter through ijar.

One approach to solve this, is as ittaiz said, just build a scala_import that always (or by default) doesn't use ijar.

I don't know how what you have here can actually be working since it seems like you are stripping the macros, but maybe it isn't working yet.

@@ -9,7 +9,7 @@ load("//scala:scala.bzl",
def twitter_scrooge():
native.maven_server(
name = "twitter_scrooge_maven_server",
url = "http://mirror.bazel.build/repo1.maven.org/maven2/",
url = "http://repo1.maven.org/maven2/",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove the mirror?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wasn't intentional, I think. Probably a hasty copy&paste.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if you could factor this currently into a second function: def twitter_scrooge_2_12() or something. Then we could actually merge changes like this into the mainline and just switch which repositories we set up.

@jbalogh-stripe
Copy link

Using this branch combined with --strategy=Scalac=worker, I have to bazel clean whenever the public interface in a file changes. For example, if object Foo {} in One.scala gets a new method bar, Two.scala cannot see Foo.bar until I bazel clean. It's a similar situation if the type signature changes.

@softprops
Copy link
Contributor

Would it be possible to make 2.12 a configurable option or kept on a separate branch/tag until that's possible? I ask because the upgrade path for scala is kind of painful when it comes to 3rd party scala library dependecies for even minor version bumps in the language. I indend to pull in these bazel rules in more often that I upgrade scala versions and i dont have plans to upgrade to 2.12 soon. That may be just me though. I can see the inverse side of this with these rules locked into 2.11 being a blocker for those looking forward to to 2.12 upgrade ( and all of the fun 3rd party lib upgrades that come along with that :) )

@johnynek
Copy link
Contributor

johnynek commented Sep 8, 2017 via email

@ittaiz
Copy link
Contributor

ittaiz commented Sep 8, 2017

+1 to what @johnynek said
@jbalogh-stripe any chance you want to take a crack at seeing what happened to ijar with 2.12?
I'm guessing 2.12 will be a major deal for us in a few months but we're tied up in other matters
@softprops if you think you can find the time to help with #170 (scala toolchain) that could really advance us

@softprops
Copy link
Contributor

the bazel-deps tool I wrote made it pretty easy for us to try this
internally.

The problem isn't necessarily bumping artifact identifiers, it's doing the work to find out if library authors have actually republished the same version for the newer scala version, and if they did making sure than that didn't accidentally come along with a new library version changes :). And if library authors haven't republished a library version for a newer version of scala, it's a problem being blocked until they do.

@johnynek
Copy link
Contributor

johnynek commented Sep 8, 2017

@jbalogh-stripe to be clear: is this only with workers enabled?

@jbalogh-stripe
Copy link

@jbalogh-stripe to be clear: is this only with workers enabled?

Right. Without Scalac=worker the code builds correctly when interfaces change.

@gkossakowski
Copy link
Author

gkossakowski commented Sep 8, 2017

Hi, sorry for dropping the ball on this. I was busy with other plots at Stripe. The 2.12 migration is back on my list of active threads now.

I think we should have a 2.12-specific branch where people interested in finding and fixing 2.12 upgrade issues can work together.
Independently, I agree #170 would be great to have and would help us folding 2.12-specific branch back to master.

@gkossakowski
Copy link
Author

Regarding interface changes, is ijar called only when scalac worker is involved?

Bump dependencies to versions that support Scala 2.12.
They swapped the logger interface and now there's a different went to
silence the logging.
Newer versions of scalatest have scalactic as a dependency. Let bazel
know about it and add its a transitive dep.
@ittaiz
Copy link
Contributor

ittaiz commented Sep 8, 2017

If I'm not mistaken the major difference between worker and not is how we pass it the arguments and possibly if we're somehow leaking state in the worker. The logical code, amongst it the calling for ijar, is the same. @johnynek please correct me if I'm mistaken.

Re ijar I want to move us from manual calling to ijar to moving to java_common.build_ijar which is a new method exposed for our scala efforts (a plan towards resolving #118 ). Maybe moving to it can also resolve this but it will take me a few days as I'm hashing out a few bugs in the strict deps support

Copy link
Contributor

@johnynek johnynek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems like most, or all of these changes could be made to mainline by making separate repository loading functions suffixed by 2_12, which would make it possible to set a version by the user, but maybe not the standard bazel toolchain way.

sha256 = "353f7c2bdde22c4286ee6a3ae0e425a9463b102f4c4cf76055a24f4666996762",
)

# scalatest has macros, note http_jar is invoking ijar
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ijar destroys macros because it removes all code attributes from the jars. So if a dependency has macros it cannot filter through ijar.

One approach to solve this, is as ittaiz said, just build a scala_import that always (or by default) doesn't use ijar.

I don't know how what you have here can actually be working since it seems like you are stripping the macros, but maybe it isn't working yet.

@@ -732,7 +732,7 @@ scala_repl = rule(

def scala_version():
"""return the scala version for use in maven coordinates"""
return "2.11"
return "2.12"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A branch is okay, but I share ittaiz anxiety about a long lived branch. I hope we can very quickly get the version configurable.

@@ -9,7 +9,7 @@ load("//scala:scala.bzl",
def twitter_scrooge():
native.maven_server(
name = "twitter_scrooge_maven_server",
url = "http://mirror.bazel.build/repo1.maven.org/maven2/",
url = "http://repo1.maven.org/maven2/",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if you could factor this currently into a second function: def twitter_scrooge_2_12() or something. Then we could actually merge changes like this into the mainline and just switch which repositories we set up.

artifact = "org.tpolecat:tut-core_2.11:0.4.8",
sha1 = "fc723eb822494580cc05d6b3b3a6039d2280a5a0",
artifact = "org.tpolecat:tut-core_2.12:0.4.8",
sha1 = "b68b5a52474bf249d1156f5002033498054b813c",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar comment about a def tut_repositories_2_12() as below.

Add a missing dependency on Twitter's util_core from scrooge rule
This makes the code to compile again on my laptop.
@gkossakowski
Copy link
Author

I pushed a branch rebased on latest master. Still all tests except jmh one pass:

ERROR: /Users/gkk/stripe/rules_scala/test/jmh/BUILD:23:1: Couldn't build file test/jmh/test_benchmark_codegen.srcjar: Generating benchmark code for //test/jmh:test_benchmark_codegen failed (Exit 1).
Exception in thread "main" java.lang.RuntimeException
	at org.objectweb.asm.MethodVisitor.visitParameter(Unknown Source)
	at org.objectweb.asm.ClassReader.b(Unknown Source)
	at org.objectweb.asm.ClassReader.accept(Unknown Source)
	at org.objectweb.asm.ClassReader.accept(Unknown Source)
	at org.openjdk.jmh.generators.asm.ASMGeneratorSource.processClass(ASMGeneratorSource.java:60)
	at io.bazel.rules_scala.jmh_support.BenchmarkGenerator$.$anonfun$generateJmhBenchmark$3(BenchmarkGenerator.scala:140)
	at io.bazel.rules_scala.jmh_support.BenchmarkGenerator$.$anonfun$generateJmhBenchmark$3$adapted(BenchmarkGenerator.scala:139)
	at scala.collection.immutable.List.foreach(List.scala:389)
	at io.bazel.rules_scala.jmh_support.BenchmarkGenerator$.$anonfun$generateJmhBenchmark$2(BenchmarkGenerator.scala:139)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
	at io.bazel.rules_scala.jmh_support.BenchmarkGenerator$.withClassLoader(BenchmarkGenerator.scala:97)
	at io.bazel.rules_scala.jmh_support.BenchmarkGenerator$.$anonfun$generateJmhBenchmark$1(BenchmarkGenerator.scala:134)
	at io.bazel.rules_scala.jmh_support.BenchmarkGenerator$.$anonfun$generateJmhBenchmark$1$adapted(BenchmarkGenerator.scala:127)
	at io.bazel.rules_scala.jmh_support.BenchmarkGenerator$.withTempDirectory(BenchmarkGenerator.scala:107)
	at io.bazel.rules_scala.jmh_support.BenchmarkGenerator$.generateJmhBenchmark(BenchmarkGenerator.scala:127)
	at io.bazel.rules_scala.jmh_support.BenchmarkGenerator$.main(BenchmarkGenerator.scala:43)
	at io.bazel.rules_scala.jmh_support.BenchmarkGenerator.main(BenchmarkGenerator.scala)
INFO: Elapsed time: 11.899s, Critical Path: 0.88s
//test:HelloLibTest                                             (cached) PASSED in 8.0s
//test:HelloLibTestSuite_test_suite_HelloLibTest.scala          (cached) PASSED in 7.2s
//test:HelloLibTestSuite_test_suite_HelloLibTest2.scala         (cached) PASSED in 7.5s
//test:JunitFilterTest                                          (cached) PASSED in 2.8s
//test:JunitFiltersAbstractClassesAndInterfaces                 (cached) PASSED in 2.6s
//test:JunitFiltersClassesWithoutTests                          (cached) PASSED in 2.4s
//test:JunitFiltersInnerClasses                                 (cached) PASSED in 2.5s
//test:JunitIncludesClassesWithRunWith                          (cached) PASSED in 2.4s
//test:JunitIncludesClassesWithTestsFromParent                  (cached) PASSED in 3.3s
//test:JunitJavaTest                                            (cached) PASSED in 2.7s
//test:JunitMultiplePrefixes                                    (cached) PASSED in 2.5s
//test:JunitMultipleSuffixes                                    (cached) PASSED in 1.0s
//test:JunitPrefixesAndSuffixes                                 (cached) PASSED in 2.6s
//test:JunitTestWithDeps                                        (cached) PASSED in 2.7s
//test:RunJavaBinary                                            (cached) PASSED in 0.6s
//test:RunJavaBinary2                                           (cached) PASSED in 3.1s
//test:RunJavaOnlySources                                       (cached) PASSED in 0.6s
//test:RunMixJavaScalaLibBinary                                 (cached) PASSED in 2.0s
//test:RunResourcesStripScalaBinary                             (cached) PASSED in 1.9s
//test:RunScalaBinary                                           (cached) PASSED in 1.8s
//test:RunScalaLibBinary                                        (cached) PASSED in 3.3s
//test:Specs2Tests                                              (cached) PASSED in 6.1s
//test:TestFilterTests                                          (cached) PASSED in 7.6s
//test:TestScalaBinaryInGenrule                                 (cached) PASSED in 0.2s
//test/aspect:aspect_test                                       (cached) PASSED in 0.1s
//test/aspect:scala_junit_test                                  (cached) PASSED in 1.4s
//test/aspect:scala_specs2_junit_test                           (cached) PASSED in 1.3s
//test/aspect:scala_test                                        (cached) PASSED in 7.1s
//test:data_location_expansion                                  (cached) PASSED in 3.6s
//test:no_sig                                                   (cached) PASSED in 1.0s
//test/src/main/scala/scala/test/resource_jars:resource_jars    (cached) PASSED in 6.5s
//test/src/main/scala/scala/test/resources/strip:resouceStripPrefixTest (cached) PASSED in 3.3s

Executed 0 out of 32 tests: 32 tests pass.

@gkossakowski
Copy link
Author

it seems like most, or all of these changes could be made to mainline by making separate repository loading functions suffixed by 2_12, which would make it possible to set a version by the user, but maybe not the standard bazel toolchain way.

on the surface, I agree. Would making def scala_repositories()[0] parametric and take the Scala version as an input work in bazel? Or is that exactly what you have in mind?

[0] https://github.com/bazelbuild/rules_scala/blob/master/scala/scala.bzl#L1001

@johnynek
Copy link
Contributor

johnynek commented Sep 8, 2017

nice that you are getting closer. I think you have an asm mismatch. I wonder if scalac embeds a version of asm or if a transitive dependency does.

As far as making the functions take parameters, that could work too, but it is just going to be a giant if/else so I was suggesting just naming them: scala_repositories_2_12 ....

but either way if you like (not like we have compile safety in the rules).

@@ -20,15 +20,15 @@ specs2_junit_repositories()
# test adding a scala jar:
maven_jar(
name = "com_twitter__scalding_date",
artifact = scala_mvn_artifact("com.twitter:scalding-date:0.16.0-RC4"),
sha1 = "659eb2d42945dea37b310d96af4e12bf83f54d14"
artifact = scala_mvn_artifact("com.twitter:scalding-date:0.17.0"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can upgrade this one and the one below in mainline as well right? guessing they have a 2.11 version

@gkossakowski
Copy link
Author

gkossakowski commented Sep 29, 2017

I just verified that latest Scala 2.12 nightly build has classpath caching that works in bazel.

@johnynek
Copy link
Contributor

johnynek commented Sep 29, 2017 via email

@johnynek
Copy link
Contributor

johnynek commented Sep 30, 2017 via email

@ittaiz
Copy link
Contributor

ittaiz commented Sep 30, 2017

My proposal is to create a 2.12-specific branch where people who care about 2.12 migration can work together and shake out the bugs like the one with incremental compilation.

Sounds good. I estimate this will be a high priority for us in a month or two.

@gkossakowski
Copy link
Author

gkossakowski commented Oct 5, 2017 via email

Switch to a recent nightly build that has a fix for the flat classpath
caching bug that is breaking bazel's incremental compilation when worker
is enabled.

See bazel-contrib#251 (comment)
for the details of the bug.
@johnynek
Copy link
Contributor

johnynek commented Oct 5, 2017

Fix version numbers of ScalaPB dependencies to be Scala 2.12-specific.

# Conflicts:
#	scala/scala.bzl
Link to an issue explaining the jmh failure is related to Java 8 and not
directly caused by the Scala 2.12.
For mysterious reasons, the hash has changed for a build that should be
unique. A sign that relying on nightly builds is risky. Yolo for now,
though.
This reverts commit 55fd807.

Switch back to 2.12.3 until 2.12.4 is released. This will make the testing
easier for projects that rely on compiler plugins.
See bazel-contrib#295 for why it's
failing.
@gkossakowski gkossakowski mentioned this pull request Oct 11, 2017
johnynek pushed a commit that referenced this pull request Oct 14, 2017
* Scala 2.12 updates

Bump dependencies to versions that support Scala 2.12.

* Fix incompatible scrooge api change.

They swapped the logger interface and now there's a different went to
silence the logging.

* Add scalactic as a transitive dep of scalatest

Newer versions of scalatest have scalactic as a dependency. Let bazel
know about it and add its a transitive dep.

* Add a missing dependency on util_core from scrooge rule

Add a missing dependency on Twitter's util_core from scrooge rule

* Set -source 1.8 and -target 1.8 javac options

This makes the code to compile again on my laptop.

* Remove dropped args when calling java_common.create_provider

The 031e73c restructured
java_commmon rule and dropped both `transitive_compile_time_jars`
and `transitive_runtime_jars` from that rule. Let's sync scala.bzl
with that change.

* Upgrade to Scala 2.12.3

* Switch to Scala nightly build with classpath caching fix

Switch to a recent nightly build that has a fix for the flat classpath
caching bug that is breaking bazel's incremental compilation when worker
is enabled.

See #251 (comment)
for the details of the bug.

* Crash jmh with an explanation why it doesn't work

Link to an issue explaining the jmh failure is related to Java 8 and not
directly caused by the Scala 2.12.

* Upgrade the hash of the nightly build

For mysterious reasons, the hash has changed for a build that should be
unique. A sign that relying on nightly builds is risky. Yolo for now,
though.

* Revert "Switch to Scala nightly build with classpath caching fix"

This reverts commit 55fd807.

Switch back to 2.12.3 until 2.12.4 is released. This will make the testing
easier for projects that rely on compiler plugins.

* Disable jmh test

See #295 for why it's
failing.

* Switch back to bazel maven mirror

Not sure why I switched to the main one in the first place.

* Revert "Switch back to bazel maven mirror"

This reverts commit 4e266fc.

It turns out, the bazel mirror is not great for us because
it misses some artifacts:

ERROR: /Users/gkk/stripe/rules_scala/twitter_scrooge/twitter_scrooge.bzl:46:3: no such package '@util_core//jar': Failed to fetch Maven dependency: Could not transfer artifact com.twitter:util-core_2.12:jar:6.45.0 from/to util_core (http://mirror.bazel.build/repo1.maven.org/maven2/): Forbidden (403) and referenced by '//external:io_bazel_rules_scala/dependency/thrift/util_core'.

* Append YdisableFlatCpCaching to scalacopts by default

Append the `YdisableFlatCpCaching` compiler option by default as a
workaround to #305

* Disable the jmh test in test_run.sh

The target is already commented out in BUILD file, but test_run.sh still
tries to run it.
gkossakowski pushed a commit to gkossakowski/rules_scala that referenced this pull request Oct 17, 2017
Switch to a recent nightly build that has a fix for the flat classpath
caching bug that is breaking bazel's incremental compilation when worker
is enabled.

See bazel-contrib#251 (comment)
for the details of the bug.
gkossakowski pushed a commit to gkossakowski/rules_scala that referenced this pull request Oct 17, 2017
Switch to a recent nightly build that has a fix for the flat classpath
caching bug that is breaking bazel's incremental compilation when worker
is enabled.

See bazel-contrib#251 (comment)
for the details of the bug.
gkossakowski pushed a commit to gkossakowski/rules_scala that referenced this pull request Oct 17, 2017
Switch to a recent nightly build that has a fix for the flat classpath
caching bug that is breaking bazel's incremental compilation when worker
is enabled.

See bazel-contrib#251 (comment)
for the details of the bug.
nmurthy pushed a commit to zenreach/rules_scala that referenced this pull request Dec 18, 2017
* Scala 2.12 updates

Bump dependencies to versions that support Scala 2.12.

* Fix incompatible scrooge api change.

They swapped the logger interface and now there's a different went to
silence the logging.

* Add scalactic as a transitive dep of scalatest

Newer versions of scalatest have scalactic as a dependency. Let bazel
know about it and add its a transitive dep.

* Add a missing dependency on util_core from scrooge rule

Add a missing dependency on Twitter's util_core from scrooge rule

* Set -source 1.8 and -target 1.8 javac options

This makes the code to compile again on my laptop.

* Remove dropped args when calling java_common.create_provider

The 031e73c restructured
java_commmon rule and dropped both `transitive_compile_time_jars`
and `transitive_runtime_jars` from that rule. Let's sync scala.bzl
with that change.

* Upgrade to Scala 2.12.3

* Switch to Scala nightly build with classpath caching fix

Switch to a recent nightly build that has a fix for the flat classpath
caching bug that is breaking bazel's incremental compilation when worker
is enabled.

See bazel-contrib#251 (comment)
for the details of the bug.

* Crash jmh with an explanation why it doesn't work

Link to an issue explaining the jmh failure is related to Java 8 and not
directly caused by the Scala 2.12.

* Upgrade the hash of the nightly build

For mysterious reasons, the hash has changed for a build that should be
unique. A sign that relying on nightly builds is risky. Yolo for now,
though.

* Revert "Switch to Scala nightly build with classpath caching fix"

This reverts commit 55fd807.

Switch back to 2.12.3 until 2.12.4 is released. This will make the testing
easier for projects that rely on compiler plugins.

* Disable jmh test

See bazel-contrib#295 for why it's
failing.

* Switch back to bazel maven mirror

Not sure why I switched to the main one in the first place.

* Revert "Switch back to bazel maven mirror"

This reverts commit 4e266fc.

It turns out, the bazel mirror is not great for us because
it misses some artifacts:

ERROR: /Users/gkk/stripe/rules_scala/twitter_scrooge/twitter_scrooge.bzl:46:3: no such package '@util_core//jar': Failed to fetch Maven dependency: Could not transfer artifact com.twitter:util-core_2.12:jar:6.45.0 from/to util_core (http://mirror.bazel.build/repo1.maven.org/maven2/): Forbidden (403) and referenced by '//external:io_bazel_rules_scala/dependency/thrift/util_core'.

* Append YdisableFlatCpCaching to scalacopts by default

Append the `YdisableFlatCpCaching` compiler option by default as a
workaround to bazel-contrib#305

* Disable the jmh test in test_run.sh

The target is already commented out in BUILD file, but test_run.sh still
tries to run it.
hmemcpy pushed a commit to wix-incubator/rules_scala that referenced this pull request Jan 28, 2018
* Scala 2.12 updates

Bump dependencies to versions that support Scala 2.12.

* Fix incompatible scrooge api change.

They swapped the logger interface and now there's a different went to
silence the logging.

* Add scalactic as a transitive dep of scalatest

Newer versions of scalatest have scalactic as a dependency. Let bazel
know about it and add its a transitive dep.

* Add a missing dependency on util_core from scrooge rule

Add a missing dependency on Twitter's util_core from scrooge rule

* Set -source 1.8 and -target 1.8 javac options

This makes the code to compile again on my laptop.

* Remove dropped args when calling java_common.create_provider

The 031e73c restructured
java_commmon rule and dropped both `transitive_compile_time_jars`
and `transitive_runtime_jars` from that rule. Let's sync scala.bzl
with that change.

* Upgrade to Scala 2.12.3

* Switch to Scala nightly build with classpath caching fix

Switch to a recent nightly build that has a fix for the flat classpath
caching bug that is breaking bazel's incremental compilation when worker
is enabled.

See bazel-contrib#251 (comment)
for the details of the bug.

* Crash jmh with an explanation why it doesn't work

Link to an issue explaining the jmh failure is related to Java 8 and not
directly caused by the Scala 2.12.

* Upgrade the hash of the nightly build

For mysterious reasons, the hash has changed for a build that should be
unique. A sign that relying on nightly builds is risky. Yolo for now,
though.

* Revert "Switch to Scala nightly build with classpath caching fix"

This reverts commit 55fd807.

Switch back to 2.12.3 until 2.12.4 is released. This will make the testing
easier for projects that rely on compiler plugins.

* Disable jmh test

See bazel-contrib#295 for why it's
failing.

* Switch back to bazel maven mirror

Not sure why I switched to the main one in the first place.

* Revert "Switch back to bazel maven mirror"

This reverts commit 4e266fc.

It turns out, the bazel mirror is not great for us because
it misses some artifacts:

ERROR: /Users/gkk/stripe/rules_scala/twitter_scrooge/twitter_scrooge.bzl:46:3: no such package '@util_core//jar': Failed to fetch Maven dependency: Could not transfer artifact com.twitter:util-core_2.12:jar:6.45.0 from/to util_core (http://mirror.bazel.build/repo1.maven.org/maven2/): Forbidden (403) and referenced by '//external:io_bazel_rules_scala/dependency/thrift/util_core'.

* Append YdisableFlatCpCaching to scalacopts by default

Append the `YdisableFlatCpCaching` compiler option by default as a
workaround to bazel-contrib#305

* Disable the jmh test in test_run.sh

The target is already commented out in BUILD file, but test_run.sh still
tries to run it.
hmemcpy pushed a commit to wix-incubator/rules_scala that referenced this pull request Jan 28, 2018
* Scala 2.12 updates

Bump dependencies to versions that support Scala 2.12.

* Fix incompatible scrooge api change.

They swapped the logger interface and now there's a different went to
silence the logging.

* Add scalactic as a transitive dep of scalatest

Newer versions of scalatest have scalactic as a dependency. Let bazel
know about it and add its a transitive dep.

* Add a missing dependency on util_core from scrooge rule

Add a missing dependency on Twitter's util_core from scrooge rule

* Set -source 1.8 and -target 1.8 javac options

This makes the code to compile again on my laptop.

* Remove dropped args when calling java_common.create_provider

The 031e73c restructured
java_commmon rule and dropped both `transitive_compile_time_jars`
and `transitive_runtime_jars` from that rule. Let's sync scala.bzl
with that change.

* Upgrade to Scala 2.12.3

* Switch to Scala nightly build with classpath caching fix

Switch to a recent nightly build that has a fix for the flat classpath
caching bug that is breaking bazel's incremental compilation when worker
is enabled.

See bazel-contrib#251 (comment)
for the details of the bug.

* Crash jmh with an explanation why it doesn't work

Link to an issue explaining the jmh failure is related to Java 8 and not
directly caused by the Scala 2.12.

* Upgrade the hash of the nightly build

For mysterious reasons, the hash has changed for a build that should be
unique. A sign that relying on nightly builds is risky. Yolo for now,
though.

* Revert "Switch to Scala nightly build with classpath caching fix"

This reverts commit 55fd807.

Switch back to 2.12.3 until 2.12.4 is released. This will make the testing
easier for projects that rely on compiler plugins.

* Disable jmh test

See bazel-contrib#295 for why it's
failing.

* Switch back to bazel maven mirror

Not sure why I switched to the main one in the first place.

* Revert "Switch back to bazel maven mirror"

This reverts commit 4e266fc.

It turns out, the bazel mirror is not great for us because
it misses some artifacts:

ERROR: /Users/gkk/stripe/rules_scala/twitter_scrooge/twitter_scrooge.bzl:46:3: no such package '@util_core//jar': Failed to fetch Maven dependency: Could not transfer artifact com.twitter:util-core_2.12:jar:6.45.0 from/to util_core (http://mirror.bazel.build/repo1.maven.org/maven2/): Forbidden (403) and referenced by '//external:io_bazel_rules_scala/dependency/thrift/util_core'.

* Append YdisableFlatCpCaching to scalacopts by default

Append the `YdisableFlatCpCaching` compiler option by default as a
workaround to bazel-contrib#305

* Disable the jmh test in test_run.sh

The target is already commented out in BUILD file, but test_run.sh still
tries to run it.
gkk-stripe added a commit to gkk-stripe/rules_scala that referenced this pull request Apr 3, 2018
* Scala 2.12 updates

Bump dependencies to versions that support Scala 2.12.

* Fix incompatible scrooge api change.

They swapped the logger interface and now there's a different went to
silence the logging.

* Add scalactic as a transitive dep of scalatest

Newer versions of scalatest have scalactic as a dependency. Let bazel
know about it and add its a transitive dep.

* Add a missing dependency on util_core from scrooge rule

Add a missing dependency on Twitter's util_core from scrooge rule

Switch to a recent nightly build that has a fix for the flat classpath
caching bug that is breaking bazel's incremental compilation when worker
is enabled.

See bazel-contrib#251 (comment)
for the details of the bug.
* Disable jmh test

See bazel-contrib#295 for why it's
failing.

* Append YdisableFlatCpCaching to scalacopts by default

Append the `YdisableFlatCpCaching` compiler option by default as a
workaround to bazel-contrib#305
gkk-stripe added a commit to gkk-stripe/rules_scala that referenced this pull request Apr 3, 2018
* Scala 2.12 updates

Bump dependencies to versions that support Scala 2.12.

* Fix incompatible scrooge api change.

They swapped the logger interface and now there's a different went to
silence the logging.

* Add scalactic as a transitive dep of scalatest

Newer versions of scalatest have scalactic as a dependency. Let bazel
know about it and add its a transitive dep.

* Add a missing dependency on util_core from scrooge rule

Add a missing dependency on Twitter's util_core from scrooge rule

Switch to a recent nightly build that has a fix for the flat classpath
caching bug that is breaking bazel's incremental compilation when worker
is enabled.

See bazel-contrib#251 (comment)
for the details of the bug.
* Disable jmh test

See bazel-contrib#295 for why it's
failing.

* Append YdisableFlatCpCaching to scalacopts by default

Append the `YdisableFlatCpCaching` compiler option by default as a
workaround to bazel-contrib#305
natansil pushed a commit to wix-incubator/rules_scala that referenced this pull request Apr 15, 2018
* Scala 2.12 updates

Bump dependencies to versions that support Scala 2.12.

* Fix incompatible scrooge api change.

They swapped the logger interface and now there's a different went to
silence the logging.

* Add scalactic as a transitive dep of scalatest

Newer versions of scalatest have scalactic as a dependency. Let bazel
know about it and add its a transitive dep.

* Add a missing dependency on util_core from scrooge rule

Add a missing dependency on Twitter's util_core from scrooge rule

Switch to a recent nightly build that has a fix for the flat classpath
caching bug that is breaking bazel's incremental compilation when worker
is enabled.

See bazel-contrib#251 (comment)
for the details of the bug.
* Disable jmh test

See bazel-contrib#295 for why it's
failing.

* Append YdisableFlatCpCaching to scalacopts by default

Append the `YdisableFlatCpCaching` compiler option by default as a
workaround to bazel-contrib#305
gkk-stripe added a commit to gkk-stripe/rules_scala that referenced this pull request Apr 18, 2018
* Scala 2.12 updates

Bump dependencies to versions that support Scala 2.12.

* Fix incompatible scrooge api change.

They swapped the logger interface and now there's a different went to
silence the logging.

* Add scalactic as a transitive dep of scalatest

Newer versions of scalatest have scalactic as a dependency. Let bazel
know about it and add its a transitive dep.

* Add a missing dependency on util_core from scrooge rule

Add a missing dependency on Twitter's util_core from scrooge rule

Switch to a recent nightly build that has a fix for the flat classpath
caching bug that is breaking bazel's incremental compilation when worker
is enabled.

See bazel-contrib#251 (comment)
for the details of the bug.
* Disable jmh test

See bazel-contrib#295 for why it's
failing.

* Append YdisableFlatCpCaching to scalacopts by default

Append the `YdisableFlatCpCaching` compiler option by default as a
workaround to bazel-contrib#305
natansil pushed a commit to wix-incubator/rules_scala that referenced this pull request May 8, 2018
* Scala 2.12 updates

Bump dependencies to versions that support Scala 2.12.

* Fix incompatible scrooge api change.

They swapped the logger interface and now there's a different went to
silence the logging.

* Add scalactic as a transitive dep of scalatest

Newer versions of scalatest have scalactic as a dependency. Let bazel
know about it and add its a transitive dep.

* Add a missing dependency on util_core from scrooge rule

Add a missing dependency on Twitter's util_core from scrooge rule

Switch to a recent nightly build that has a fix for the flat classpath
caching bug that is breaking bazel's incremental compilation when worker
is enabled.

See bazel-contrib#251 (comment)
for the details of the bug.
* Disable jmh test

See bazel-contrib#295 for why it's
failing.

* Append YdisableFlatCpCaching to scalacopts by default

Append the `YdisableFlatCpCaching` compiler option by default as a
workaround to bazel-contrib#305
ittaiz pushed a commit to wix-incubator/rules_scala that referenced this pull request May 20, 2018
* Scala 2.12 updates

Bump dependencies to versions that support Scala 2.12.

* Fix incompatible scrooge api change.

They swapped the logger interface and now there's a different went to
silence the logging.

* Add scalactic as a transitive dep of scalatest

Newer versions of scalatest have scalactic as a dependency. Let bazel
know about it and add its a transitive dep.

* Add a missing dependency on util_core from scrooge rule

Add a missing dependency on Twitter's util_core from scrooge rule

Switch to a recent nightly build that has a fix for the flat classpath
caching bug that is breaking bazel's incremental compilation when worker
is enabled.

See bazel-contrib#251 (comment)
for the details of the bug.
* Disable jmh test

See bazel-contrib#295 for why it's
failing.

* Append YdisableFlatCpCaching to scalacopts by default

Append the `YdisableFlatCpCaching` compiler option by default as a
workaround to bazel-contrib#305
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants