Skip to content

Scala 2.12 support #304

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

Merged
merged 18 commits into from
Oct 14, 2017
Merged

Conversation

gkk-stripe
Copy link
Contributor

@gkk-stripe gkk-stripe commented Oct 12, 2017

(follow up on #300 from my Stripe account that has cla signed bit on)

Adds support for Scala 2.12.3. In the history, you can see that I tested Scala 2.12.4 nightly builds to verify the issue with the flat classpath caching.

Notes:

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.
Add a missing dependency on Twitter's util_core from scrooge rule
This makes the code to compile again on my laptop.
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.
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.
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.
Not sure why I switched to the main one in the first place.
@bazel-io
Copy link

Can one of the admins verify this patch?

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 the `YdisableFlatCpCaching` compiler option by default as a
workaround to bazel-contrib#305
@gkk-stripe
Copy link
Contributor Author

I tried switching back to bazel mirror for dependencies and I've got some dependency failures. See f903c9d for details.

I always YdisableFlatCpCaching option to scalac as workaround for #305. It's a bit ugly but we'll able to drop this as soon as 2.12.4 is out.
I want to see if this option is the last missing bit for tests to pass on CI. They pass on my machine.

@johnynek
Copy link
Contributor

Kind of worryingly if the bazel jar cache is somehow changing the shas.

@gkossakowski
Copy link

I think the bazel mirror is not resolving the dependency at all. It returns 403.

@gkk-stripe
Copy link
Contributor Author

the travis failure seems to be a transient network problem, can we kick travis build again?

The target is already commented out in BUILD file, but test_run.sh still
tries to run it.
@gkk-stripe
Copy link
Contributor Author

pushed nop change to a commit, let's see then

@johnynek
Copy link
Contributor

I think you meant to make this into 2.12 branch, no?

@johnynek johnynek changed the base branch from master to scala2_12 October 14, 2017 02:03
@johnynek johnynek merged commit 4edcdcb into bazel-contrib:scala2_12 Oct 14, 2017
@johnynek johnynek mentioned this pull request Oct 14, 2017
@gkk-stripe
Copy link
Contributor Author

yes, ty!

@gkk-stripe gkk-stripe deleted the gkk-scala-2.12 branch October 14, 2017 04:06
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
johnynek added a commit that referenced this pull request Apr 24, 2018
Fresh cherry-pick of the Scala 2.12 support (#304)
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.

7 participants