Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Allow downloading a specific plugin version #222

Open
theChaosCoder opened this issue May 26, 2024 · 4 comments
Open

[Feature] Allow downloading a specific plugin version #222

theChaosCoder opened this issue May 26, 2024 · 4 comments

Comments

@theChaosCoder
Copy link
Collaborator

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"

@NSQY
Copy link

NSQY commented May 28, 2024

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

@myrsloik
Copy link
Member

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

@theChaosCoder
Copy link
Collaborator Author

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

@myrsloik
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants