boot

:boot-clj: https://boot-clj.github.io/ — build tooling for Clojure. Dev chat in #boot-dev
dvorme 2018-09-20T01:38:50.000200Z

Hi: I'm looking for a good example Boot project where Clojure namespaces depend on Java classes. Any suggestions? Or blog articles on the topic might work too. 🙂 . Thanks in advance.

seancorfield 2018-09-20T02:08:36.000100Z

@dvorme Not sure what you're asking there... can you elaborate?

dvorme 2018-09-20T02:09:18.000200Z

OK, more specifically:

dvorme 2018-09-20T02:09:59.000100Z

I'm working on a project loader built around Boot and Git.

dvorme 2018-09-20T02:11:04.000100Z

Current code reads a configuration file for the git coordinates of the bootstrap plugin, which points to a Clojure project built using Boot.

dvorme 2018-09-20T02:11:36.000100Z

It clones the project. Then I want to delegate to Boot to load the project.

dvorme 2018-09-20T02:13:00.000100Z

I've tried various approaches to this but wind up with classloader trouble, race conditions between core/worker pod startup and the code that launches Boot. It appears that the most reliable approach is likely to be to launch Boot the way it launches itself: via the Boot.java class.

dvorme 2018-09-20T02:14:21.000100Z

But the Boot launcher project isn't distributed on Clojars (or similar) as a Jar, so I thought I'd just fork the sources (there are only two classes) into my own repo, and just include that code natively in my build.

dvorme 2018-09-20T02:15:29.000100Z

However, adding (javac) (target) to the front end of my build pipeline isn't successfully making Boot.java's class available on the Clojure classpath--unless I've done something stupidly wrong, which is possible. 😉

dvorme 2018-09-20T02:16:31.000100Z

I was hoping for an example project where someone has a mixed Java/Clojure build working using Boot so I could compare and see where I might have gone wrong.

dvorme 2018-09-20T02:16:42.000100Z

Or suggestions. 🙂

dvorme 2018-09-20T02:16:45.000100Z

TIA

dvorme 2018-09-20T02:23:10.000100Z

LOL; found it. Boot.java as delivered from https://github.com/boot-clj/boot-bin/blob/master/src/Boot.java doesn't include a 'package' line.

seancorfield 2018-09-20T02:44:00.000100Z

@dvorme I'm having a hard time understanding what Boot.java has to do with what you're trying to do... it really sounds like you're over-complicating things.

seancorfield 2018-09-20T02:51:21.000100Z

Boot itself can run git, compile Java code, and then run your Clojure code. Not sure why you think you need to somehow "launch Boot" in the middle of that pipeline...?