apache / incubator-heron

Apache Heron (Incubating) is a realtime, distributed, fault-tolerant stream processing engine from Twitter
https://heron.apache.org/
Apache License 2.0
3.65k stars 599 forks source link

use toolchain in bazel #3045

Open sreev opened 5 years ago

sreev commented 5 years ago

current bazel build depends on java version provided by the operating system. toolchain gives control of this to bazel instead os.

https://docs.bazel.build/versions/master/remote-execution-rules.html#invoking-build-tools-through-toolchain-rules

Refer to mail thread with subject "Hermetic Build Proposal".

sreev commented 5 years ago

On macOS:

$ bazel build --config=darwin heron/...
ERROR: /Users/svaddi/SreeVaddi/source/github/sreev/incubator-heron/heron/api/src/java/BUILD:8:1: every rule of type java_doc implicitly depends upon the target '@local_jdk//:jdk-default', but this target could not be found because of: no such target '@local_jdk//:jdk-default': target 'jdk-default' not declared in package '' (did you mean 'jre-default'?) defined by /private/var/tmp/_bazel_svaddi/ad590ad4eafb86a9912ced0bf3547c8f/external/local_jdk/BUILD.bazel
ERROR: Analysis of target '//heron/api/src/java:heron-api-javadoc' failed; build aborted: Analysis failed
INFO: Elapsed time: 11.656s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (291 packages loaded)
sreev commented 5 years ago

attached the patch:

issue-3045.patch.txt