babashka-sci-dev 2022-04-18

@rahul080327 I already had JVM 17 once but we decided to hold off since it added 5mb to the native image size without any significant new features.

yeah i remember that, im not sure adding socat and netcat for convenience is warranted on the docker image

but feel free to experiment locally to see if that solves some problem. last time we tried the java.net.http stuff didn't work yet with the unix socket stuff.

no, they can just make their own derived image

yeah thats what i concluded with

> last time we tried the java.net.http stuff didn't work yet with the unix socket stuff do you remember what it was exactly? i think apart from the image bloat there should not be an issue. we still would need curl to do http over unix sock though

jdk 17 would just enable code like https://nipafx.dev/java-unix-domain-sockets/ which essentially is what socat is solving

anyways, will try building a bb 17

it was a java 17 bug

right, will try to find it

yeah this is expected hence we need curl

this is still not addressed til now, not sure when it would be

pretty silly

I haven't but maybe upgrade to 22.0.0.2

and prior to this commit stuff still worked, so you might be able to see how it ran then

seems to happen only on the arm instances

you cannot use musl with aarch, use mostly static there

so we still still stick to static only also on arm?

yeah, mostly ststiv

this works better on raspberry

as it then doesn't need anything libz etc on there

okay, this was new to me

so on aarch you need to pass the static-except-glibc flag

else it will link against the build system glibc and that's never what we want

right, need to add to the compile script

I don't know if passing --static + mostly-static works

Either way, that's not according to the docs

thats what we are doing in bb right? static + -H:+StaticExecutableWithDynamicLibC ?

you're right

then it should work

yeah meawhille shell doesnt seem to like the + i guess, trying to quote it

that would surprise me

this is just from me adding that flag into args

$ bb -e '(babashka.tasks/shell "echo" "1+1")'
1+1

try the script locally

and debug locally

fastest way

with newer babashka you no longer need to prepend that .cmd thing in windows

right, as for the failure only thing i can think of is the graal cache we are doing has gone bad somehow

its failing right at the gu install

cannot reproduce this at all locally

maybe the amd64 cache is used by the arm machines

finally, holy shit, was a nightmare

moral of the story: add arch to the cache key too

Afk, will look when home

updating them, seem to have support now, but the api has bunch of breaking changes 😕

the test lib functions of embedded pg lib we are using

from 1.0 they have all arch support and the builder api has totally changed

and it needs docker too now it seems, not sure i understand how it works

That's weird