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

openjdk11: add src.zip for IDEs #95081

Merged
merged 3 commits into from Sep 29, 2020
Merged

Conversation

@svalaskevicius
Copy link
Contributor

@svalaskevicius svalaskevicius commented Aug 10, 2020

Motivation for this change

IDEs use the provided src.zip to navigate the java codebase.

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 nixpkgs-review --run "nixpkgs-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.
@svalaskevicius
Copy link
Contributor Author

@svalaskevicius svalaskevicius commented Aug 10, 2020

the resulting jdk is bigger... by 64M but more usable now for development... it was part of jdk8 but not for 11

@gebner
Copy link
Member

@gebner gebner commented Sep 19, 2020

It's already there in the lib/openjdk/lib directory:

-r--r--r-- 2 root root 62M Jan  1  1970 /nix/store/0g6r8xlf5fshi23f64mrzabx3s042xaz-openjdk-11.0.8+10/lib/openjdk/lib/src.zip

We could add an extra symlink (without size increase). But I believe you can also set intellij to use ../lib/openjdk as java home.

@svalaskevicius
Copy link
Contributor Author

@svalaskevicius svalaskevicius commented Sep 19, 2020

Hi, I'm not using Intellij :) plus it's nice when things are in places where the tools look for them (in this case I'm using scala metals)

A symlink could work too, I didnt see it in another directory.. although I need to check again to be sure..

@svalaskevicius
Copy link
Contributor Author

@svalaskevicius svalaskevicius commented Sep 29, 2020

@gebner I've updated to use a symlink, thanks :)

@gebner
Copy link
Member

@gebner gebner commented Sep 29, 2020

Does metals work out-of-the-box now?

Could you also add the symlink to openjdk14, please?

@svalaskevicius
Copy link
Contributor Author

@svalaskevicius svalaskevicius commented Sep 29, 2020

@gebner yes, it does seem to work fine :)

also added to openjdk14, but unable to test if metals works with it as it is limited to java 11 atm. I did check the symlink though and it was resolving.

@gebner gebner merged commit c769884 into NixOS:master Sep 29, 2020
19 checks passed
@svalaskevicius svalaskevicius deleted the openjdk11-add-src branch Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants