Fork me on GitHub

I'm wanting to write a small Java file and use it in my Clojure app using deps.edn and clj . Is there anything similar to :java-source-paths or another way I can accomplish the same goal? My other option is to write this and create a JAR for it and deploy it somewhere or keep it as a local resource


No equivalent. No compilation done by tdeps.


You can use javac and have it output to target, and run that shell script before starting clj


Might be easier to rewrite the algorithm to Clojure 🙂

Alex Miller (Clojure team)16:03:02

there are some tools.deps add-ons that can compile as well, like badigeon


it's a wrapper for badigeon


maybe a silly question, but why does badigeon need a wrapper? it's already a tool?


@borkdude no, badigeon is not a ready tool. it is low level api for managing project distributed as sources, which need to be adapted.


ah ok, I see now


Javac is pretty good though

👍 4
Alex Miller (Clojure team)20:03:39

@dominicm if you are suggesting that libraries should maintain a directory full of compiled classes, I think that is a bad idea and you should not do that

Alex Miller (Clojure team)20:03:26

if you want to distribute compiled artifacts, you can already do that by putting them in a jar. we don't typically do that in Clojure because the source is so much more flexible.


I'm not. I'm saying all of the infrastructure around this, code laying around to do the compilation on startup.


@alexmiller if you call (compile 'foo) twice, will the second be almost a no-op as it sees it's already compiled?

Alex Miller (Clojure team)20:03:26

you can try it in that project I posted if you like