Olical / depot

Find newer versions of your dependencies in your deps.edn file
https://clojars.org/olical/depot
The Unlicense
260 stars 14 forks source link

The outdated and update modes consider different parts of the deps.edn file #12

Closed Olical closed 1 year ago

Olical commented 6 years ago

So this is another issue spawned from #7, I thought I'd create a new one to keep it clean and visible.

This discussion involved @seancorfield and @plexus.

I think the addition of --update has actually introduced two very different approaches within the same project. I originally performed the outdated check on whatever your deps resolved to with aliases taken into account, this was mainly for consistency with the clojure CLI and so I didn't have to parse it myself.

I wanted to rely on the tools.deps abstraction so that if the format changed (such as a shorthand for :mvn/version or something) depot would continue to work. I feel like going down a level and manipulating the data structure runs the risk of something breaking it but that risk is low.

It'd be a breaking change but I'd be open to replacing the outdated check with a custom program that walks the deps.edn file and finds all versions. This would mean the "find all the versions and their updates" code could be shared and the "update the version in place" part would just be an extra step.

This should mean more code reuse and easier maintainability. I hope. The version table could always be printed but the act of updating in place would then simply be guarded by the --update flag. I smell lenses.

TL;DR: I'm open to this and think it would lead to a cleaner project. The default command is then a dry run for the --update command, this issue is for further comments. I wouldn't get around to this for quite a while though with my current side projects and Advent of Code on the horizon plus a couple of snowboarding trips in the new year.

This work would fix #11 too, but that's coincidental. Also I'm not saying I won't do this, just that it's not my top priority right now. I'd quite like to do it since it's a semi-rewrite in which I could add a test suite and specs etc. I've got a long flight to Canada early next year, it'd be a good candidate for that!

If someone beats me to it though I'll happily work through the process with them and show credit where it's due. Clojure open source rocks :smiley:

Olical commented 5 years ago

Fixed by #25 and will be released in v2.0.0.

Olical commented 5 years ago

Reopening until v2 is out.

seancorfield commented 1 year ago

It looks like 2.x has been out for a while? Is this issue "done"?

Olical commented 1 year ago

True! Sorry, haven't been paying attention to this repo in a long time 😞 I'll close, thanks.