You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by GitBox <gi...@apache.org> on 2018/12/08 05:05:40 UTC

[GitHub] joshfischer1108 closed pull request #3122: Support bazel 0.20.0

joshfischer1108 closed pull request #3122: Support bazel 0.20.0
URL: https://github.com/apache/incubator-heron/pull/3122
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tools/bazel.rc b/.bazelrc
similarity index 97%
rename from tools/bazel.rc
rename to .bazelrc
index b1584c2b64..5745449071 100644
--- a/tools/bazel.rc
+++ b/.bazelrc
@@ -21,6 +21,9 @@ build --ignore_unsupported_sandboxing
 build --python2_path /usr/bin/python2.7
 build --spawn_strategy=standalone
 build --workspace_status_command scripts/release/status.sh
+build --javacopt="-source 8"
+build --javacopt="-target 8"
+
 
 # For centos
 # To use it: bazel build --config=centos
@@ -60,6 +63,9 @@ build:darwin --ignore_unsupported_sandboxing
 build:darwin --python2_path /usr/bin/python2.7
 build:darwin --spawn_strategy=standalone
 build:darwin --workspace_status_command scripts/release/status.sh
+build:darwin --javacopt="-XepDisableAllChecks"
+
+
 
 # For Ubuntu
 # To use it: bazel build --config=ubuntu
diff --git a/.travis.yml b/.travis.yml
index 065aa74929..d3684adc39 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -28,9 +28,9 @@ env:
 
 before_install:
   # download and install bazel
-  - wget -q 'https://github.com/bazelbuild/bazel/releases/download/0.14.1/bazel-0.14.1-installer-linux-x86_64.sh'
-  - chmod +x bazel-0.14.1-installer-linux-x86_64.sh
-  - ./bazel-0.14.1-installer-linux-x86_64.sh --user
+  - wget -q 'https://github.com/bazelbuild/bazel/releases/download/0.20.0/bazel-0.20.0-installer-linux-x86_64.sh'
+  - chmod +x bazel-0.20.0-installer-linux-x86_64.sh
+  - ./bazel-0.20.0-installer-linux-x86_64.sh --user
 
 before_script:
   # install python module for wheel files
diff --git a/WORKSPACE b/WORKSPACE
index ddff16ad9a..0288ade8a7 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -813,6 +813,8 @@ http_file(
     url = SETUPTOOLS_SRC,
 )
 
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+
 new_http_archive(
     name = "virtualenv",
     url = VIRTUALENV_SRC,
@@ -974,15 +976,19 @@ new_http_archive(
 )
 
 # scala integration
-rules_scala_version="5cdae2f034581a05e23c3473613b409de5978833" # update this as needed
+rules_scala_version="a89d44f7ef67d93dedfc9888630f48d7723516f7" # update this as needed
 
 http_archive(
-    name = "io_bazel_rules_scala",
-    url = "https://github.com/bazelbuild/rules_scala/archive/%s.zip" % rules_scala_version,
-    type = "zip",
-    strip_prefix= "rules_scala-%s" % rules_scala_version,
-    sha256 = "bd66b178da5b9b6845f677bdfb2594de8f1050f831a8d69527c6737969376065",
+     name = "io_bazel_rules_scala",
+     url = "https://github.com/bazelbuild/rules_scala/archive/%s.zip"%rules_scala_version,
+     type = "zip",
+     strip_prefix= "rules_scala-%s" % rules_scala_version,
+     sha256 = "e341dc30a397c77e6723a953d4a84539c050b49f163b4c50cf865c698ea598fe"
 )
 
+
 load("@io_bazel_rules_scala//scala:scala.bzl", "scala_repositories")
+load("@io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_toolchains")
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+scala_register_toolchains()
 scala_repositories()
diff --git a/examples/src/scala/BUILD b/examples/src/scala/BUILD
index 786ac2a9ae..5be0c67c93 100644
--- a/examples/src/scala/BUILD
+++ b/examples/src/scala/BUILD
@@ -12,6 +12,7 @@ scala_binary(
         "//heron/api/src/scala:api-scala",
         "//third_party/java:kryo"
     ],
+     scalacopts = ["-target:jvm-1.8"],
     main_class = "org.apache.heron.examples.streamlet.scala.ScalaIntegerProcessingTopology"
 )
 
diff --git a/heron/api/src/scala/BUILD b/heron/api/src/scala/BUILD
index 769cb4c07f..b2d4284c86 100644
--- a/heron/api/src/scala/BUILD
+++ b/heron/api/src/scala/BUILD
@@ -5,6 +5,9 @@ package(default_visibility = ["//visibility:public"])
 scala_library(
     name = "api-scala",
     srcs = glob(["org/apache/heron/streamlet/scala/**/*.scala"]),
+    scalacopts = [
+     "-target:jvm-1.8"
+    ],
     deps = [
             "//heron/api/src/java:api-java-low-level",
             "//heron/api/src/java:api-java"


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services