tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
seancorfield 2020-12-28T00:10:00.155100Z

(I should probably rename that so it doesn't conflict with any :dev alias someone actually has in a project deps.edn file)

Eugen 2020-12-28T10:11:48.160600Z

hi, I have a question regarding deps.edn and git dependencies. Can I build a deps.edn dependency locally? I have a project (clj-antlr) that has clojure code + java classes. Can I make a clj-antlr/deps.edn so I can use clj-antlr from another project: my-project/deps.edn ? from git ? My goal is depend on the git version to avoid publishing binary dependenices for clj-antrl. clj-antlr does have some java classes that need to be compiled in order for it to be used. Can I trigger a build step in clj-antlr/deps.edn when I use it in my-project/deps.edn ?

borkdude 2020-12-28T10:28:50.161600Z

@eugen.stan For gitlibs, this only works if you check the compiled Java into source control

borkdude 2020-12-28T10:29:09.161800Z

which is probably not so nice

borkdude 2020-12-28T10:29:22.162200Z

for libs that need .class files, I usually make a release to clojars

borkdude 2020-12-28T10:30:05.163400Z

For sci I have one component which needs this, so I have isolated it into its own mini-library. The rest of sci can be used as a git lib

✔️ 1
Eugen 2020-12-28T10:30:54.164200Z

So there is no life-cycle hooks that I can use in deps.edn to trigger pre/post processing for dependencies .. thanks, in my case there are 3 classes so I will make a branch for that and once I am sure all things work I'll publish them.

borkdude 2020-12-28T10:31:56.165100Z

well, you can also push the compilation phase to the user of the library, as part of the main opts, but so far I haven't seen anyone do this

borkdude 2020-12-28T10:32:19.165500Z

it's not unreasonable since you can then treat Java as a source-based language as well

borkdude 2020-12-28T10:32:29.165800Z

I'm hoping tools.build will go a bit into this direction

Eugen 2020-12-28T10:34:24.166900Z

thanks, I also have some ideas on how to provide this capability. With any luck I will push something this week 🙂 .

vlaaad 2020-12-28T10:42:27.167Z

Afaik it's possible to compile and load Java code in the JVM process used for development, maybe tools-build will help with that :D

borkdude 2020-12-28T10:43:15.167300Z

that's what I was suggesting

✔️ 1