Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First commit is a patch created by @dtzWill to improve the
substituteAll
stuff.Second commit is my progress of getting 0.21 to run so far. 0.21 removed the bundled openjdk-distribution. Instead, tries to fetch the “right” distribution on-the-fly when building. So we need to provide our own openjdk.
According to bazelbuild/bazel#6865 (comment) we should set
--host_javabase
if we want to do that.We copy the
buildJdk
nix path to a temporary directory, make it look like a bazel repository (init BUILD and WORKSPACE) and point to it vialocal_repository
.As it turns out, exposing the files via
filegroup
is not enough, the bazel build needs it to expose aJavaRuntimeInfo
provider:I am unsure how to achieve that.
This commit also replaces the line-number-based sed invocations with
something more stable.
I actually tried to follow the upstream suggestion first and use
--host_javabase='@local_jdk//:jdk'
, but that did not work at all:@local_jdk
looks like a magic repository, from what I’ve seen it also has special support in bazel source code. Maybe it’s still the way to go.@mboes @uri-canva @guibou, maybe you can find a way to get this to work.