tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
phronmophobic 2021-06-11T00:48:38.199900Z

> clojure -X:depstar sync-pom compile jar If I wanted to add a prepare-assets step? How would that fit in? Is it like writing any other clojure function, or would it be like writing a depstar plugin? How likely is it that an idiomatic clojure function would also function as a cli target? One of the reasons automating git is a pain is that there 1) a low level programmatic library and 2) a high level command line interface and not much in between. Maybe there's no way around it, but it seems like it's easy to fall into the trap where the cli is the primary interface and the programmatic interface becomes less idiomatic. It's a tough problem to crack since the clojure cli wants to tame the bashisms, clojurisms, and javaisms with just the right isms on top.

seancorfield 2021-06-11T01:33:25.200100Z

I’ll try to choose the hash map contents/keys carefully but it would be just writing a function that took a hash map and return a hash map and then making sure it’s on the classpath. Some of it would depend on what inputs your prepare-assets function needed?

seancorfield 2021-06-11T01:34:09.200300Z

I think having a task that computes the project basis (possible based on aliases provided as :exec-args) and then passes that through the pipeline would be helpful.

seancorfield 2021-06-11T01:35:59.200500Z

I think we may all get a better sense of how this should work once we see tools.build — I suspect it will have a few “utility” tasks that standardize some of this setup. @alexmiller has indicate that tools.build will have a number of “standard” build steps built-in so it’ll be a case of other tools following that lead and building on the basic pipeline.

👍 1
seancorfield 2021-06-11T01:37:18.200700Z

depstar does a lot of “smart” stuff when building uberjar files (in terms of merging things) so once I have tools.build to play with, I’ll figure out how to make the “smart” part of depstar replace the (presumably, much simpler) uber/`jar` tasks.

alexmiller 2021-06-11T02:21:31.201800Z

There will be a basis building function. Well, there are multiple atm, I’m trying to sort all that out :)

1
😁 1
alexmiller 2021-06-11T02:22:17.202300Z

Yeah, we should probably do that for you

seancorfield 2021-06-11T03:00:15.202800Z

Thank you, yeah, that would be super-helpful!