babashka

2025-06-28T05:29:33.925279Z

What does Error building classpath. The following libs must be prepared before use: [io.github.noahtheduke/lazytest] mean? does babashka expect clojure -T:prep before running?

borkdude 2025-06-28T05:47:59.148969Z

This is just tools deps, not special to bb

borkdude 2025-06-28T09:35:51.401899Z

if you have only one custom class, compiling it with the lowest bytecode version setting and just checking in the .class file into source control is worth preventing the prep-lib dance, imo

borkdude 2025-06-28T09:38:04.676239Z

e.g.:

javac --release 8 MyClass.java

2025-06-28T11:09:36.281059Z

i mean my GH Action that calls bb lazytest raises this, which is surprising to me. i thought bb couldn't handle .class files: https://github.com/NoahTheDuke/lazytest/actions/runs/15940901952/job/44968809963#step:9:1

borkdude 2025-06-28T11:20:11.619139Z

bb doesn't care about .class files, but if you specify in your library that it needs prepping, then tools.deps will require this

borkdude 2025-06-28T11:21:15.071609Z

you can probably bypass this step by manually prepping the lib before you call bb

borkdude 2025-06-28T11:21:47.629969Z

bb clojure -X:deps prep

borkdude 2025-06-28T11:21:59.408299Z

I don't know if it preps a local project though

2025-06-28T11:28:25.886069Z

it's silly to me that you have to prep deps with bb given it doesn't use the resulting class files lol

2025-06-28T11:29:31.110709Z

thanks, i got it working

borkdude 2025-06-28T11:29:57.442739Z

I don't make tools.deps's rules

borkdude 2025-06-28T11:30:30.880239Z

how did you get it working? I tried local prepping but I don't think the clojure CLI supports it

borkdude 2025-06-28T11:30:58.779319Z

if tools.deps supports a toggle that avoids prepping, I'd happily use it

borkdude 2025-06-28T11:34:44.337309Z

if you release a mvn/version we also don't have this problem with bb, so there's two ways to solve it currently

👍 1
seancorfield 2025-08-09T19:28:24.601019Z

> I tried local prepping but I don't think the clojure CLI supports it clojure -X:deps prep :current true maybe?

2025-06-28T11:31:02.941839Z

next release, #lazytest will support babaska! https://github.com/NoahTheDuke/lazytest/commit/9e1678956e105cf8b897885ed5262d57748731c3

🎉 5
borkdude 2025-06-30T13:14:03.027469Z

hell yeah!

borkdude 2025-06-30T13:22:36.746349Z

Added a little test for it too: https://github.com/babashka/babashka/commit/fc151ce361317636173917950fb9f7cb3f11e7cb Sometimes strange things happen in a native image with reflection (e.g. when some call returns some private class) so I usually add a smoke test like this

2025-06-30T13:22:56.291609Z

ah thanks, i should have written one

borkdude 2025-06-30T13:23:04.193879Z

no worries

borkdude 2025-06-30T13:23:51.760809Z

In 10 minutes or so you could use the dev build to run lazytest's tests in bb in CI I guess. I could also add them to bb's CI but the problem is, I'm using clojure.test, lol

🎉 1
borkdude 2025-06-28T11:32:45.859459Z

amazing!

borkdude 2025-06-28T11:46:37.037209Z

you're still going to the PR with the missing class, right?

borkdude 2025-06-28T11:46:41.795329Z

(no hurry)

2025-06-28T12:11:26.884459Z

yes