[ANN] find-deps - quickly find and add dependencies to your deps.edn file

68 views
Skip to first unread message

Luke Burton

unread,
Jun 17, 2018, 6:43:58 PM6/17/18
to Clojure

find-deps helps you add dependencies to your deps.edn file by searching the Clojars and Maven APIs. By default, the top match is picked using a simple ranking algorithm that considers fuzzy text match, newness, and popularity of the coordinate's group ID.

https://github.com/hagmonk/find-deps

deps.edn has encouraged me to break my larger projects into many smaller parts. Which means I now spend more time in the following loop:

0. … hmm but to do that I'll need a JSON parser.
1. Oh, I should use that fancy JSON library from metosin
2. Can I remember the coordinate? Uh, metosin/jsonista? Version something?
3. I should just pillage one of the deps.edn / project.clj files on my system.
4. Wait, in the time it will take me to type this I could just Google it.
5. I wonder what the browser tab limit is, because it took surprisingly long to open that one.
6. Ah ha, here's https://github.com/metosin/jsonista
7. Son-of-a- … coordinates are encoded as an image! I guess I'll just remember the version number.
8. Ok, I've updated the deps.edn file.
9. Time to blow away the REPL and all my application state before I can use it.
10. So, now that I'm ready to parse JSON … why did I want to parse JSON again?

In the course of writing this tool, I added no less than 7 dependencies to my deps.edn, which got easier and easier as I added more functionality. Right now, most of those steps can be consolidated down to:

clj -A:find-deps -F:save jsonista

Adding add-lib support to remove even the REPL restart is definitely something I want to look at next.

I hope this tool saves people some time, please don't hesitate to provide any feedback, and of course PRs are also welcome!

Luke.

Reply all
Reply to author
Forward
0 new messages