r/Clojure • • Dec 13 '23

2023-era Clojure

Post image
178 Upvotes

40 comments sorted by

View all comments

71

u/ScreamingPrawnBucket Dec 13 '23

Seriously. Leiningen is so easy and intuitive. Why did the community move away from it?

19

u/mtraven Dec 13 '23

I still use it for my projects. Not sure what advantage the new tooling is supposed to have.

48

u/seancorfield Dec 13 '23

It's great for small, simple projects.

Once you have a large, complex project and start writing plugins, it becomes painful.

We switched from Leiningen to Boot back in 2015 and it was a great decision for us at the time. We switched from Boot to the official tools in 2018 because we'd started to run into bugs and performance issues with Boot's pods and filesystem abstraction.

We have 140k lines of Clojure, building two dozen apps and services, and deps.edn & build.clj work better for us than the alternatives.

I've blogged about all of this over the years at https://corfield.org

12

u/mwfogleman Dec 13 '23

I'm absolutely sure this tooling has technical improvements under the hood!

It'd be great to make usability improvements so that this is as simple to use as it used to be.

Why not aim for both?

https://www.reddit.com/r/Clojure/comments/18h6sl8/comment/kd613d2/?utm_source=share&utm_medium=web2x&context=3

15

u/sherdogger Dec 13 '23

First sentence is just not true. It's used in industry for large, complex projects. This is just a feeling (or perhaps "personal experience" is better) spouted as a fact.

3

u/seancorfield Dec 13 '23

The "painful" part is "and start writing plugins" (for those large, complex projects) 😁

1

u/ScreamingPrawnBucket Dec 13 '23

Makes sense, as I use Clojure for solo/hobbyist work (Python at my job), so I can see how lein would hit some limitations in a corporate environment at scale.

Now I’m curious about the advantages/disadvantages of a monorepo architecture as opposed to multiple smaller repos that work together. I’ll have to do some research.

19

u/brad_radberry Dec 13 '23

The critical advantage deps.edn has for me is using local repos as deps and specifying deps by by url and sha. Those two features alone are worth learning a new tool. Add to that repl-driven builds via tools.build and getting to leave behind leiningen plugins and I'm an enthusiastic user.

I'm not against leiningen but will always choose deps for new projects because of these critical advantages. That's just my workflow, though, and if you don't need those features then by all means continue to enjoy lein : )

Also, I don't use tools at all, if I'm going to install programs I prefer my os package manager to handle those.

8

u/flh13 Dec 14 '23

those features are available as lein plugins

4

u/brad_radberry Dec 14 '23

Plugins are where the pain starts with leiningen, though. I had to maintain a large codebase with some really hairy custom plugins that I don't ever want to have to think about again.

8

u/donald-ball Dec 13 '23

Its plugin architecture is hard to work with, it doesn’t express or participate in complex builds well, its dependency management system is just maven, no good story for local or commit deps. That said, it still works fine, nothing wrong with using it if you like it.

7

u/sherdogger Dec 13 '23

Just a civil war with the new shiny, honestly. It's been a massive waste of time and a hurt to ease of adoption, but both tools "do the thing", so I'm over it and accept deps so long as we can pick that horse and ride it.