Skip to content
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

bazel: pass jdk11_headless to --server_javabase #74279

Merged
merged 1 commit into from Nov 26, 2019

Conversation

flokli
Copy link
Contributor

@flokli flokli commented Nov 26, 2019

We only refer to openjdk by passing --server_javabase="${runJdk}" to
the bazel executable.

By passing jdk11_headless instead of jdk11, we cut bazels runtime
closure from 1.6 GiB to 1.1 GiB.

Motivation for this change

#43813

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

We only refer to openjdk by passing `--server_javabase="${runJdk}"` to
the `bazel` executable.

By passing jdk11_headless instead of jdk11, we cut bazels runtime
closure from 1.6 GiB to 1.1 GiB.
@Profpatsch
Copy link
Member

@GrahamcOfBorg test bazel.tests

@Profpatsch
Copy link
Member

Argh

@GrahamcOfBorg build bazel.tests

@kalbasit
Copy link
Member

Testing on Mac locally...

Copy link
Member

@kalbasit kalbasit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's interesting is that this change does not trigger a rebuild on Mac. It does trigger a rebuild on Linux. Unsure why.

Bazel works correctly though!

@kalbasit kalbasit merged commit 201defc into NixOS:master Nov 26, 2019
@uri-canva
Copy link
Contributor

uri-canva commented Nov 26, 2019

That's because jdk11_headless is the same as jdk11 on darwin:

openjdk11_headless =
if stdenv.isDarwin then
openjdk11
else
openjdk11.override { headless = true; };

@flokli flokli deleted the bazel-closure-java branch November 28, 2019 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants