lets say i want to create a babashka "app" so a native compiled thing with my scripts added how would i do that?
https://github.com/babashka/babashka/wiki/Self-contained-executable
sorry rtfm -.-
no problem!
wow @borkdude this is amazing what you did there this is so crazy 😄 i love that. its so KISS man and you get so much out of that. mind = blown !!!
He always goes above and beyond 😆
one more question just hypothetically. If i do this stuff and want to just add some lets say libraries to babashka would that be also passible i don't mean pods but just simple deps
and furthermore how would i invoke the babashka repl again so i can extend babashka 😮
since you build an uberjar first, they can contain "simple deps", they would just be bundled into the standalone binary
if you want to expose the babashka REPL to your users, just do so via the main function of your uberjar
(clojure.main/repl)
Just put that behind your command line logic somewherewow so that would mean if i would add stuff like ruuter to the debs and create a main calling this function my new created babashka binary would have ruuter in it right 😮
yes
ok this is crazy 😄
wow even pods work 😮 ok you have to load them via your script not the bb.edn but man thats cool
or is there a diffrent way to include the pods so that i can use it the babashka project style
Yes you can include the bb.edn in the uberjar. I think it's documented in the page . You have to put it somewhere in META-INF
but somehow it doesn't load the pod
./bb uberjar taskrunner.jar -m uber
{:warning "clashing jar item", :path "META-INF/bb.edn", :strategy :noop}{:paths ["./.scripts" "resources"]
:pods
{huahaiy/datalevin {:version "0.10.5"}}
:tasks
{:requires ([taskrunner :as t])
...
}}Just been reading the docs for Cream and noticed that it lists java.sql but not javax.sql (where DataSource and its relatives live) -- per Babashka's impl/classes.clj. Is there a specific technical reason that javax.sql isn't included?
No reason
can add it. as it stands the binary is 300mb now. I will add stuff to make stuff run but at the same time I also want to add testing so I can remove superfluous stuff. PR welcome though
have you actually tried running anything yet? it might be that it even works now when you set JAVA_HOME
No, I was asking about Babashka here. Cream was incidental insofar as that's how I noticed javax.sql was missing from bb 🙂
Oh that wasn't clear to me. So you're asking to add stuff to bb?
Well, I was asking why it wasn't included really. Mostly curiosity. But it made me wonder if bb could then run next.jdbc if those classes were added -- although I guess you'd need to be able to run certain JDBC drivers too...
Bundle size mostly. I had a version of babashka once with next.jdbc and postgres included but I quickly removed it since it felt arbitrary to me to just support postgres. Including all drivers for all databases would bloat bb. There's a feature flag for it though: https://github.com/babashka/babashka/blob/master/doc/build.md#feature-flags And we have sql pods which use next.jdbc
Yeah, and the drivers can be pretty wild... I guess my next question is "why include java.sql then?"
we only have java.sql.TimeStamp and java.sql.Date - these were included because some libraries used them, although they weren't doing any db stuff
Out of curiosity, I tracked down the https://github.com/babashka/babashka/commit/b93198c9653bc8cf8409218ef6ec64b2fdceb506 when java.sql.TimeStamp was added, if that helps, @seancorfield.
> Compatibility with fipp and puget
Ah, that makes sense! Yes, quite a few libraries know about those two SQL types (and sometimes java.sql.Time too) but have otherwise nothing to do with JDBC. That's the whole "every class is its own DSL" thing Rich complained about I guess 🙂 Especially since all three of those java.sql types extend java.util.Date 😞