Page MenuHomePhabricator

[Nix] Bump JDK to JDK11
ClosedPublic

Authored by jon on Nov 8 2022, 10:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 2:38 AM
Unknown Object (File)
Tue, Dec 17, 7:05 AM
Unknown Object (File)
Tue, Dec 17, 7:05 AM
Unknown Object (File)
Tue, Dec 17, 7:05 AM
Unknown Object (File)
Tue, Dec 17, 7:02 AM
Unknown Object (File)
Nov 29 2024, 2:37 PM
Unknown Object (File)
Nov 25 2024, 2:49 AM
Unknown Object (File)
Nov 19 2024, 9:00 PM

Details

Reviewers
atul
varun
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rCOMM19cfd9fa5da5: [Nix] Bump JDK to JDK11
Summary

Update JDK version to a more recent release.

https://linear.app/comm/issue/ENG-2164

Test Plan
nix develop

echo $JAVA_HOME
# points to /nix/store/<hash>-zulu11.48.21-ca-jdk-11.0.11 on macOS

cd native/android
./gradlew bundleRelease --no-daemon

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a reviewer: Restricted Owners Package.Nov 8 2022, 10:17 AM
nix/dev-shell.nix
55 ↗(On Diff #18221)

Curious why openjdk11 is here but openjdk8 didn't need to be

Running into the following when I run nix develop:

c43ec9.png (1×4 px, 4 MB)

atul requested changes to this revision.Nov 8 2022, 10:49 AM

Getting the following error:

error: builder for '/nix/store/fgr4mizzn2y712bqlk895lk8wpws27ir-dyld-433.5.tar.gz.drv' failed with exit code 1;
       last 8 log lines:
       >
       > trying http://www.opensource.apple.com/tarballs/dyld/dyld-433.5.tar.gz
       >   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
       >                                  Dload  Upload   Total   Spent    Left  Speed
       > 100   257  100   257    0     0   3953      0 --:--:-- --:--:-- --:--:--  3953
       >   0  4587    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
       > curl: (22) The requested URL returned error: 404
       > error: cannot download dyld-433.5.tar.gz from any mirror
       For full logs, run 'nix log /nix/store/fgr4mizzn2y712bqlk895lk8wpws27ir-dyld-433.5.tar.gz.drv'.
error: 1 dependencies of derivation '/nix/store/7c2sh9fyqz113rrpx5mdnmkk8mdrhb47-dyld-433.5.drv' failed to build
error: 1 dependencies of derivation '/nix/store/amwp71baj8a5d4ap0v93s9yppwyw1sgj-bootstrap-stage3-stdenv-darwin.drv' failed to build
error (ignored): error: cannot unlink '/private/tmp/nix-build-MacOSX-SDK-11.0.0.drv-0/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr': Directory not empty
error: 1 dependencies of derivation '/nix/store/m59m2rvzlazbi6bfvdq3g1lwdqi0y6nk-bootstrap-stage3-stdenv-darwin.drv' failed to build
error: 1 dependencies of derivation '/nix/store/1y4gc5bna5qvm0h2nzask9fkb17xxk6r-bzip2-1.0.8.drv' failed to build
error: 1 dependencies of derivation '/nix/store/p2i3v1b19v5dhzvyn267vz849sfx98gd-coreutils-9.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/pkdjc275x2fzhk8nhb5p3s35c9i7zkv2-openssl-3.0.5.drv' failed to build
error: 1 dependencies of derivation '/nix/store/0pmmbis7126lzz32v3srrl4c2nmirwky-unzip-6.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/y3j9xmqgmy4982p4vr1a3n1szzq6jp92-zulu11.48.21-ca-jdk-11.0.11.drv' failed to build
error: 1 dependencies of derivation '/nix/store/rynqrc4cfnq9cw5vicwi73x89k652kxl-nix-shell-env.drv' failed to build
This revision now requires changes to proceed.Nov 8 2022, 10:49 AM
jon added inline comments.
nix/dev-shell.nix
55 ↗(On Diff #18221)

If the application was looking through JAVA_HOME then this isn't needed. But I thought it would be good to have java and javac on PATH as well.

@atul, very odd, I didn't have this behavior, it always gave the official nixpkgs binary cache as the default. I'll throw up another diff to add the official repository as a default.

@atul https://phab.comm.dev/D5600 should fix cache issue. With nix 2.10+, I can't reproduce the issue, but can't be too sure.

going to request another review, the cache misses should be fixed for nix<2.10 in https://phab.comm.dev/D5600

echo $JAVA_HOME
/nix/store/xwahy5gcm3ld0zdv0s54fp6djfa0wk4l-zulu11.48.21-ca-jdk-11.0.11
./gradlew bundleRelease --no-daemon
...
BUILD SUCCESSFUL in 16m 51s
807 actionable tasks: 802 executed, 5 up-to-date
This revision is now accepted and ready to land.Nov 10 2022, 11:33 AM
This revision was automatically updated to reflect the committed changes.