Specify Java version
How do I customize the java version used to build?
The clojure docs imply a
.jdk-version
can be used, but the Java (maven build) docs don't
"Fatal error compiling: error: invalid target release: 19 -> [Help 1]"28 Replies
Project ID:
fba8052e-ad1b-46b2-8a14-33dce1ed3190
fba8052e-ad1b-46b2-8a14-33dce1ed3190
Follow up will be "how do i run with --enable-preview"
not sure what this option does
The clojure docs imply a .jdk-version can be used, but the Java (maven build) docs don'tthis is probalby just a docs issue but let me double check
it lets you use features like switch expressions in your code
or virtual threads
how would you suggest that we know when to use this option for nixpacks
what files do you currently introspect?
one sec
java is not my level of expertise so please bare with
env variable: JDK_VERSION
.jdk-version
for clojure
lemme check for java
we only do custom version checks for gradle
and you're using maven right @emccue
i am
haha that's defo an oversight
i presume we can just check the same as the clojure provider
.jdk-version
seems nix doesnt have older versions of maven
well - you can say like
19-preview
implies the flag?as a jdk version
that'll automatically imply the flag
hmm
could also have a general "jvm startup flags" option
yeah maybe
...somewhere
we'll just look for -preview versions i usppose
because some preview stuff requires a bit more
like to test some incubator features you need to launch the jvm with
--add-modules jdk.incubator.feature
and to use some old libraries you need to "open" things to reflection manually
--add-opens java.base/java.util=ALL_UNNAMED
and stuff like thatthis is why i dont like java
let me fix the jdk version bug first
π€·ββοΈ
yeah so turns out it's qute a lot more complicated then this
the maven nix package comes with a java version
we can't really control it
which sucks, since that java version is hella old
kinda the social result of this being the prevailing opinion among the haskell/nix corners of the world i reckon
We can override it
we can? π
But I don't think jdk19 is available on Nix unfortunatley
Yeah we do this for nodejs/yarn
oh lord
lemme see if i can do smth funky and get it on there
i can get it on there but it seems we'll have to update our archive version
causing openssl issues
so when the openssl issue is fixed
i thnik we can upgrade
cool cool. I would like to get to that this week (it will not be fun but we do need it)
the openssl bug?
yeah
btw i think upgrading might fix the pcr bug