tools-deps

Andrew Leverette 2024-07-23T15:17:26.227599Z

I'm still new to Clojure, but I think I'm getting a handle on the language. I am a little confused about what development tools to use. I know Leiningen is a solid tool, but it's based on an older way of doing things. The Clojure CLI as I understand it is the new and supported method. I've seen the clj-new tool and the deps-new tool. I'm not sure I understand the difference between the two. Is there a recommended build tool for Clojure development?

2024-07-23T15:27:02.563239Z

I've been using the official Clojure CLI tools for projects for a while now, and it's able to do everything I've needed so far I recommend looking at https://clojure.org/guides/tools_build if you haven't already

lukasz 2024-07-23T15:53:10.812979Z

Technically Lein and Clojure CLI + tools.build give you the same capabilities, with one major difference: Lein has a lot of stuff built-in (starting the REPL, building JARs, integration with the test runner). CLI + tools deps + tools build is more of a "some assembly required" approach

☝️ 1
seancorfield 2024-07-23T16:18:44.189129Z

This guide talks about why there are two tools and how you might choose: https://clojure-doc.org/articles/tutorials/getting_started/

seancorfield 2024-07-23T16:19:33.385129Z

(disclaimer: when I started with Clojure there was only Leiningen; at work we switched from lein to boot in 2015 and from boot to the Clojure CLI in 2018)

Andrew Leverette 2024-07-23T18:19:01.787449Z

I wasn't expecting such quick replies. Thank you! @seancorfield and @skynet thank you for the resource links. I will definitely check them out.

practicalli-johnny 2024-07-23T19:41:38.429889Z

Its worth remembering that code is the same regardless of Leningen or Clojure CLI. It is possible to use both tools for the same project, although it would mean managing library dependencies in two config files The last two commercial companies I worked for used Clojure CLI projects.

practicalli-johnny 2024-07-23T19:45:30.560549Z

If using Clojure CLI, then it is very valuable to have a user level deps.edn file with the community tools that extend the Clojure CLI tool. Sean and I have example you can use or copy https://practical.li/clojure/

👀 1
Andrew Leverette 2024-07-23T20:21:28.544309Z

Thanks for the resource, @jr0cket! Yeah, I've worked through all of the Exercism Clojure problems and they are set up to use both Leiningen and Clojure CLI.

Andrew Leverette 2024-07-23T20:26:46.935609Z

@jr0cket, I'm probably missing something, but you mentioned an example, but the link you provided goes to the top-level guide. Is there a specific link I should take a look at?

seancorfield 2024-07-23T20:31:07.693149Z

https://practical.li/clojure/clojure-cli/practicalli-config/

seancorfield 2024-07-23T20:32:18.779529Z

Mine is here, for comparison, https://github.com/seancorfield/dot-clojure but mine isn't maintained for the public -- just for my own usage, and some of it is tied into my VS Code / Calva / Joyride setup here https://github.com/seancorfield/vscode-calva-setup

Andrew Leverette 2024-07-23T20:50:01.349399Z

Awesome! Thank you again. I'm working on going deeper into Clojure and this build/tooling space is an area that I have been avoiding.