tools-deps

borkdude 2025-05-06T09:11:47.529669Z

How to preplib an library that is in an alias?

$ clj -X:deps:dev prep
Error building classpath. The following libs must be prepared before use: [afrolabs/afrolabs-clj]
$ clj -X:dev:deps prep
Error building classpath. The following libs must be prepared before use: [afrolabs/afrolabs-clj]

Alex Miller (Clojure team) 2025-05-06T11:41:35.151919Z

Pass in the :aliases arg https://clojure.github.io/tools.deps.cli/clojure.tools.deps.cli.api-api.html#clojure.tools.deps.cli.api/prep

borkdude 2025-05-06T11:43:05.475939Z

thanks

Ovi Stoica 2025-05-06T12:39:57.605429Z

Hello! How do you give access to Java dependencies? In Lein, there is :java-source-paths, what is the equivalent of telling tools deps that? Example:

src/
  clj/
    core.clj ;; should have access to HelloWorld.java
  java/
    HelloWorld.java
Most of the examples I found just use Leiningen for this. Is there an open-source example? Here’s such an example: https://github.com/tonsky/fast-edn/tree/main. P.S.: I know I can add a jar file to the path, and that works, but ideally, I’d want a way to point to some Java files, and when starting a REPL, the Java classes defined inside should be available

dpsutton 2025-05-06T13:11:40.492449Z

https://clojure.org/guides/tools_build#_mixed_java_clojure_build There are instructions of how to do this and then how to make it a prep task

🙏 1
dpsutton 2025-05-06T13:12:26.045649Z

i think people like to use https://github.com/clj-commons/virgil to help with recompilation during dev time