You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ git status
HEAD detached at v0.9.161
nothing to commit, working tree clean
platform
$ uname -a
Linux drnick-xps-15-9500 5.15.0-46-generic #49~20.04.1-Ubuntu SMP Thu Aug 4 19:15:44 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
problem
When using a compiled babashka binary with the BABASHKA_FEATURE_POSTGRESQL and BABASHKA_FEATURE_JDBC features set to true, I'm unable to cleanup resources using with-open. I haven't tested if using the pod produces the same behavior. repro
I'll gladly work on it since I seem to be the only one using bb for my postgres sql purposes :) Is there any references you might be able to share before I jump right into Clojure Graalvm goodness?
Hey @neuromantik33 I could try to point you to some of the files and implementation details, hopefully that helps you get started! I'm not sure how familiar are you with all the bb and graal things so hopefully I can be helpful (I'm a bit shaky on the config too maybe @borkdude can verify this once? 😅):
So the issue is the .close method isn't allowed on the class org.postgresql.jdbc.PgConnection as GraalVM needs to know of all methods we may reflect and invoke in a native image as is the common case in Clojure. It uses a config for it.
As you can imagine in bb, this could get really big, so we use this piece of code to generate the thing. Since this is code, we can build it up conditionally specially for feature flags.
For this issue, we need to add this class here using a similar condition like this
That should open up all the public methods on that class and when you compile it now, it should work.
version
platform
$ uname -a Linux drnick-xps-15-9500 5.15.0-46-generic #49~20.04.1-Ubuntu SMP Thu Aug 4 19:15:44 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
problem
When using a compiled babashka binary with the
BABASHKA_FEATURE_POSTGRESQL
andBABASHKA_FEATURE_JDBC
features set totrue
, I'm unable to cleanup resources usingwith-open
. I haven't tested if using the pod produces the same behavior.repro
expected behavior
No error should occur.
The text was updated successfully, but these errors were encountered: