Closed Olical closed 1 year ago
Fixed by #25 and will be released in v2.0.0.
Reopening until v2 is out.
It looks like 2.x has been out for a while? Is this issue "done"?
True! Sorry, haven't been paying attention to this repo in a long time 😞 I'll close, thanks.
So this is another issue spawned from #7, I thought I'd create a new one to keep it clean and visible.
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 theclojure
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: