Fork me on GitHub
#babashka
<
2022-05-06
>
borkdude10:05:01

Made documentation collapsible now with quickdoc per namespace and var: https://github.com/babashka/sci/blob/master/API.md

Benjamin13:05:04

how does it work in bb to load java code? 1) all the classes need to be defined upfront? 2) let's say I take a random clj lib, what are the hurdles until I can run it with bb? 3) In particular this lib https://github.com/viebel/google-api-clj would help me

lispyclouds13:05:00

bb doesnt load java code as it doesnt have the JVM anymore post native image compilation. to be able to support arbritary java code/bytecodes you need to compile bb with those classes.

👍 1
borkdude13:05:57

Indeed. For a library such as the above, you may be better off using an http client directly or use a Node.js lib with #nbb - or use Clojure on the JVM of course

✔️ 1
Jeffrey Bay13:05:02

I'm having a problem with clojure.test and babashka (i'm using babashka, but it might not be relevant? I'm running my tests and the trace when throwing an exception doesn't have my code in it.

(load-file (str file))
        (let [filename (babashka.fs/file-name (babashka.fs/strip-ext file))
              namespace-name (clojure.string/replace filename "_" "-")
              namespace (find-ns (symbol namespace-name))]
          (clojure.test/run-tests namespace))))))
I'm running the tests through this load-file and then clojure.test/run-tests call - is that why? is there a workaround for running the tests dynamically and still getting a useful stack trace? the trace I am getting is all sci.impl, babashka.impl.clojure, clojure.lang

borkdude13:05:45

@U03A0EGF82E Could you post an issue? Needs a deeper look

Jeffrey Bay14:05:30

done - i thinned it down to a reasonably small reproducing test case, as well. hope it helps.

borkdude13:05:25

Babashka 0.8.2 • Convey *print-length* to pprint and allow set!babashka.nrepl: support pprint length • SCI: support invoking field, without dash • Add compatibility with clojure numeric tower • Update deps.clj to tools jar 1.11.1.1113 • Compatibility with fipp and puget • Fix https://github.com/babashka/babashka/issues/1233: don't print error to stdout in prepl • Update process with :pre-start-fn option • Update fs with cwd and Windows glob improvements • Expose edamame, fixes https://github.com/babashka/babashka/issues/549 and https://github.com/babashka/babashka/issues/1258 (#1259) • Support BABASBHKA_PODS_DIR environment variable

catjam 3
👍 2