This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-07-27
Channels
- # babashka (35)
- # beginners (85)
- # cider (14)
- # clojure (115)
- # clojure-europe (15)
- # clojure-norway (2)
- # clojure-portugal (9)
- # clojure-uk (3)
- # clojurescript (28)
- # conjure (35)
- # data-science (10)
- # datomic (4)
- # graalvm (28)
- # holy-lambda (7)
- # hyperfiddle (2)
- # jobs (2)
- # joker (4)
- # malli (9)
- # meander (6)
- # nbb (6)
- # off-topic (23)
- # pathom (3)
- # remote-jobs (1)
- # shadow-cljs (158)
- # sql (15)
- # tools-deps (35)
- # vim (5)
Has the image size also reduced?
Wow, cool!
Yeah, it's amazing, it seems to shrink now every time, unlike before where the image size grew every time ;)
Yeah, i stopped investing in this after I spoken with few guys from Oracle and they told me about having plans of publishing repository of GraalVM metadata of popular open source libraries.
I’m not sure yet. I thought that they will distribute it in a way it’s accessible by all Clojure build tools, but it doesn’t seem so.
It's like we did on https://github.com/clj-easy/graal-config :)
> • Improved many internal data structures of the native-image
generator to reduce the memory footprint. This makes Native Image builds more robust when running on memory-constraint environments like cloud-based build services, https://github.com/marketplace/actions/github-action-for-graalvm, or in https://www.graalvm.org/downloads/. Many larger application now build successfully with 2 GByte of Java heap size available for the native-image
generator.
🙏
I’m using graal v 22.1 with microsoft sql; this in the deps.edn:
com.github.clj-easy/graal-config-next {:git/url ""
:git/sha "0dc2862e1b1c9871eef4c306ef77da3610a2bd93"
:deps/root "config/com.github.seancorfield/next.jdbc"}
@bocaj I'm assuming you're going to post a question after this, right? Check out https://github.com/babashka/babashka-sql-pods which has configs for that. Perhaps we can move them to graal-config.
"-H:IncludeResourceBundles=com.microsoft.sqlserver.jdbc.SQLServerResource"
(str "--initialize-at-run-time="
",com.microsoft.sqlserver.jdbc.SQLServerFMTQuery"
",com.microsoft.sqlserver.jdbc.SQLServerFMTQuery"
",com.microsoft.sqlserver.jdbc.SQLServerBouncyCastleLoader"
",com.microsoft.sqlserver.jdbc.SQLServerBulkCSVFileRecord"
",com.microsoft.sqlserver.jdbc.SQLServerBulkCopyOptions"
",com.microsoft.sqlserver.jdbc.SQLServerBulkCopy"
",com.microsoft.sqlserver.jdbc.SQLServerResource"
",com.microsoft.sqlserver.jdbc.SQLServerMSAL4JUtils"
)
The question is about this error:
com.microsoft.sqlserver.jdbc.SQLServerResource the class was requested to be initialized at run time (from command line with 'com.microsoft.sqlserver.jdbc.SQLServerResource'). To see why com.microsoft.sqlserver.jdbc.SQLServerResource got initialized use --trace-class-initialization=com.microsoft.sqlserver.jdbc.SQLServerResource
Failed generating ' --trace-class-initialization=com.microsoft.sqlserver.jdbc.SQLServerResource' after 49.9s.
I see this is working well with clj-easy, which reports
Registering packages for build time initialization: clojure, com.github.ztellman, next, camel_snake_kebab, dbloader, com.climate, charred, tech.v3, babashka, taoensso, clj_easy, hyperfiddle
so I’m curious if next.jdbc is initializing sql server resources at build time, but I need to somehow force portions of the next dependencies to initialize at run time so that the sql server driver works
@bocaj It depends. It could also be in your own program, something which is initialising stuff on the top level
@bocaj This is the only thing for mssql that the bb pod has, I think: https://github.com/babashka/babashka-sql-pods/blob/7fd0d1a78b19f0fab3ecc5babada88f41194de7b/script/compile.clj#L65-L68