This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-16
Channels
- # adventofcode (24)
- # announcements (3)
- # aws (3)
- # babashka (16)
- # beginners (88)
- # biff (5)
- # calva (27)
- # cider (15)
- # cljs-dev (70)
- # clojure (87)
- # clojure-austin (3)
- # clojure-belgium (6)
- # clojure-europe (59)
- # clojure-nl (1)
- # clojure-norway (14)
- # clojure-uk (3)
- # clojurescript (37)
- # data-science (2)
- # datalevin (40)
- # datomic (1)
- # emacs (23)
- # events (2)
- # graalvm (13)
- # graphql (7)
- # gratitude (1)
- # holy-lambda (193)
- # inf-clojure (15)
- # lsp (27)
- # malli (9)
- # off-topic (20)
- # polylith (6)
- # reitit (29)
- # releases (2)
- # scittle (13)
- # shadow-cljs (51)
- # transit (15)
- # xtdb (29)
Hi all:slightly_smiling_face:
I'm trying to build a graalvm native-image of my personal cli tool that uses https://github.com/grzm/awyeah-api. When I run the command with unberjar
everything works, but when I run the same command with the binary I get:
> Exception in thread "main" java.io.FileNotFoundException: Could not locate com/grzm/awyeah/http/awyeah__init.class, com/grzm/awyeah/http/awyeah.clj or com/grzm/awyeah/http/awyeah.cljc on classpath.
When building the image, I do see the package is being registered:
[clj-easy/graal-build-time] Registering packages for build time initialization: clojure, babashka, cheshire, clj_easy, com.grzm.awyeah, mal
When I run jar -tf <my-jar> | grep com/grzm/awyeah/http/awyeah.clj
I do see this file present.
My tool's setup is similar https://github.com/borkdude/jayfu setup, and was working fine till I've added the awyeah
dependency.
Has anyone encountered this issue?
I suspect it's some graalvm-related configuration but I can't understand what.@U04V15CAJ Unfortunately this repo is on my workplace private organization, but I'll create a minimal one now to reproduce the error. Thanks! BTW: I'm a huge fan and truly excited to converse with you:blush:
Hi, I've created some minimal repo (just need to invoke main to get the error): https://github.com/wanishing/awyeah-graalvm
@U04FGP6EJ20 I think the issue is that those namespaces that are reported are lazily loaded
Do you mean adding this to my core.clj
file?
(require '[com.grzm.awyeah.client.api :as aws]
'[com.grzm.awyeah.config :as config]
'[com.grzm.awyeah.credentials :as credentials])
It didn't work/-:btw, it's possible to use this library from babashka as well, if you want fast startup
I didn't now that. How can I use it?
I've added com.grzm.awyeah.http.awyeah
and com.grzm.awyeah.protocols.rest-xml
to my main namespace and it did work! thank you dearly:pray:
@U04FGP6EJ20 You can use it from babashka the same way you would use it with clojure, like this: https://github.com/grzm/awyeah-api#bbedn