vsrepo icon indicating copy to clipboard operation
vsrepo copied to clipboard

[Feature] Allow downloading a specific plugin version

Open theChaosCoder opened this issue 1 year ago • 4 comments

It would be nice if vsrepo could install older plugin versions.

  • Add --version or --force-version as parameter. Maybe --downgrade is better?
  • Only on install or also on upgrade?

Something like vsrepo install myplugin --version "1.2.3" vsrepo upgrade myplugin --version "1.2.3"

theChaosCoder avatar May 26 '24 18:05 theChaosCoder

--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.

downgrade

NSQY avatar May 28 '24 08:05 NSQY

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...

myrsloik avatar May 28 '24 10:05 myrsloik

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

theChaosCoder avatar May 28 '24 11:05 theChaosCoder

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...

myrsloik avatar May 28 '24 12:05 myrsloik