You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by th...@apache.org on 2022/05/14 13:31:58 UTC

[incubator-heron] branch feature/update-rules-scala created (now e4d4992d0f4)

This is an automated email from the ASF dual-hosted git repository.

thinker0 pushed a change to branch feature/update-rules-scala
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git


      at e4d4992d0f4 Update rules-scala of Scala

This branch includes the following new commits:

     new e4d4992d0f4 Update rules-scala of Scala

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-heron] 01/01: Update rules-scala of Scala

Posted by th...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

thinker0 pushed a commit to branch feature/update-rules-scala
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git

commit e4d4992d0f4b2fef12704fe578d8cb8685487d49
Author: choi se <th...@gmail.com>
AuthorDate: Sat May 14 22:31:51 2022 +0900

    Update rules-scala of Scala
---
 WORKSPACE      | 43 ++++++++++++++++++++++++++++++-------------
 tools/bazel.rc |  2 ++
 2 files changed, 32 insertions(+), 13 deletions(-)

diff --git a/WORKSPACE b/WORKSPACE
index 2da072c91a7..f03dae798a6 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -474,27 +474,44 @@ load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
 rules_pkg_dependencies()
 
 # scala integration
-rules_scala_version = "358ab829626c6c2d34ec27f856485d3121e299c7"  # Jan 15 2020 - update this as needed
-
 http_archive(
     name = "io_bazel_rules_scala",
-    sha256 = "5abd638278de10ccccb0b4d614158f394278b828708ba990461334ecc01529a6",
-    strip_prefix = "rules_scala-%s" % rules_scala_version,
+    sha256 = "77a3b9308a8780fff3f10cdbbe36d55164b85a48123033f5e970fdae262e8eb2",
+    strip_prefix = "rules_scala-20220201",
     type = "zip",
-    url = "https://github.com/bazelbuild/rules_scala/archive/%s.zip" % rules_scala_version,
+    url = "https://github.com/bazelbuild/rules_scala/releases/download/20220201/rules_scala-20220201.zip",
 )
 
+skylib_version = "1.0.3"
+
+http_archive(
+    name = "bazel_skylib",
+    sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
+    type = "tar.gz",
+    url = "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{}/bazel-skylib-{}.tar.gz".format(skylib_version, skylib_version),
+)
+
+load("@io_bazel_rules_scala//:scala_config.bzl", "scala_config")
+
+scala_config(scala_version = "2.12.15")
+
 load("@io_bazel_rules_scala//scala:scala.bzl", "scala_repositories")
 
-scala_repositories((
-    "2.12.8",
-    {
-        "scala_compiler": "f34e9119f45abd41e85b9e121ba19dd9288b3b4af7f7047e86dc70236708d170",
-        "scala_library": "321fb55685635c931eba4bc0d7668349da3f2c09aee2de93a70566066ff25c28",
-        "scala_reflect": "4d6405395c4599ce04cea08ba082339e3e42135de9aae2923c9f5367e957315a",
-    },
-))
+scala_repositories()
+
+load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
+
+rules_proto_dependencies()
+
+rules_proto_toolchains()
 
 load("@io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_toolchains")
 
 scala_register_toolchains()
+
+# optional: setup ScalaTest toolchain and dependencies
+load("@io_bazel_rules_scala//testing:scalatest.bzl", "scalatest_repositories", "scalatest_toolchain")
+
+scalatest_repositories()
+
+scalatest_toolchain()
diff --git a/tools/bazel.rc b/tools/bazel.rc
index b91713fab53..a69357d20e7 100644
--- a/tools/bazel.rc
+++ b/tools/bazel.rc
@@ -21,6 +21,8 @@ build --host_force_python=PY3
 build --ignore_unsupported_sandboxing
 build --spawn_strategy=standalone
 build --workspace_status_command scripts/release/status.sh
+build --strategy=Scalac=worker
+build --worker_sandboxing
 
 # To enable stylecheck
 # To use it: bazel build --config=stylecheck