Open theChaosCoder opened 6 months ago
--version
is arguably better than --downgrade
as it prevents an inconsistency where a user has version 0.5
and they want to upgrade to 0.6
instead of 0.7
.
Alternatively, consider taking inspiration from the Arch tool downgrade
which allows the user to select which version they want.
I vote for "version" as the argument name. But effectively we expose another problem: we don't track things like minimum (and maximum? is that ever a thing?) plugin versions in the dependency listings. Many huge scripts would benefit from that as well. That's probably a prerequisite for handling this well or you can't warn people that downgrading will break things...
Hmm yes dependencies... this should only be an issue for scripts or some complex plugins like https://github.com/AmusementClub/vs-mlrt
Currently deps look like this:
"dependencies": [
"com.vapoursynth.removegrainvs",
"systems.innocent.fft3dfilter"
],
We could add something like this:
"dependencies": [
"com.vapoursynth.removegrainvs" : [
"min-version": "1.0.1",
"max-version": "1.2.1",
],
"systems.innocent.fft3dfilter"
],
But I'm not sure if python has a smart-enough build in version comparison function + someone needs to verify the min/max versions...
Alternatively, we could allow only specific plugins to downgrad with "allow-downgrade" / "can-downgrade". Or the easiest way: we simply ignore deps :D
But I'm not sure if python has a smart-enough build in version comparison function + someone needs to verify the min/max versions...
You don't need it, the release list is in version order (more or less) so you'd only need to locate the strictly matching version with string comparison in the list of all releases. As a simple hack. Writing a version comparison function also isn't that hard...
It would be nice if vsrepo could install older plugin versions.
Something like vsrepo install myplugin --version "1.2.3" vsrepo upgrade myplugin --version "1.2.3"