This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-10-16
Channels
- # aleph (73)
- # babashka (12)
- # beginners (17)
- # calva (9)
- # clerk (8)
- # clj-otel (1)
- # clojars (8)
- # clojure (3)
- # clojure-europe (13)
- # clojure-nl (3)
- # clojure-norway (66)
- # clojure-uk (3)
- # clojuredesign-podcast (2)
- # clojurescript (11)
- # clr (8)
- # conjure (2)
- # core-typed (1)
- # data-science (11)
- # datahike (4)
- # etaoin (5)
- # events (1)
- # graalvm (2)
- # honeysql (27)
- # hyperfiddle (26)
- # introduce-yourself (3)
- # lsp (3)
- # membrane (1)
- # off-topic (60)
- # polylith (20)
- # practicalli (4)
- # reitit (3)
- # shadow-cljs (18)
- # specter (2)
- # xtdb (1)
Is there a way to create a "super-uberjar", where also babashka's internal dependencies are included? I'd like to be able to use my babashka-scripts in a java-app without further dependencies.
Sure, create a deps.edn
with bb print-deps
, then add a dependency on that deps.edn
using :local/root
in bb.edn and then create an uberjar using bb uberjar
but if you are building a Java app you could also decide to create a pom.xml
from that deps.edn
instead
I like the super-uberjar better - that way only that dependency has to be added to the app...
Let's say I have a /bin/script.clj
somewhere on my machine, and a ~/.bb/script.clj
symlink to it. There is a /resources/foo.edn
that the script needs to read, even when called via the symlink. Is there an idiomatic way to make sure the foo.edn
filepath is right?
Or is it necessary to, say, shell out to readlink
? :thinking_face:
Fwiw I have already tried (a few days ago, so just loading the context back up now 😛) a number of things, including:
• (def x) (.getParent (io/file (:file (meta #'x))))
• *file*
• (io/resource "foo.edn")
• and a bunch of stuff from babashka.fs
@U018D6NKRA4 You can use fs/real-path
to follow a symlink