-
Notifications
You must be signed in to change notification settings - Fork 138
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
API Feature Request: skip extension updates if minimum version is not met #7009
Comments
This is already possible in a way though this is barely tested (The "Fully Virtual deployment" extension makes use of it). You should be able to have multiple "main files" for your extension as long as their version compatibility is mutually exclusive so you can have one with "requires vortex < 1.3.0" and one with "requires vortex >= 1.3.0" to support both users from older and never versions. Technically you could also require a certain minor version (>=1.3.5) but since we only have one extension list for each mayor version, users with vortex 1.3.0-1.3.4 would then not get your extension offered at all. I know it's kind of fiddly to parses a string from the file description but unfortunately for the time being it's impractical to download each mod to check for the requirement and on the up-side, this ensures users can see the version requirement on the mod page and you can update it without having to re-upload the mod. Please drop me a line when you start making use of it and I will double check that your extension gets added to the lists appropriately. |
That's impressively hacky, but if it works, fine by me 😆 I've updated the description of the current version of BeatVortex to include a version constraint on 1.2.x and I'll let you know once I upload a 1.3.x-requiring file version. |
Well, I'd use the term "pragmatic" instead of "hacky"... |
Before I upload a 1.3 version, one question on this: how does it handle multiple matches? If I had one file with a requires match of |
Yeah, that wouldn't work, it requires a single match for each major version, otherwise the extension won't appear in the list at all. |
@TanninOne I've just uploaded a 0.4.0 of BeatVortex that requires Vortex 1.3+. I've added the text to the description and left the (1.2-requiring) older version in Main files. Can you confirm I've done it right (0.3.9 offered to 1.2 users, 0.4.0 offered to 1.3 users)? |
@TanninOne Looks like it all got picked up alright from @IDCs recent updates: 0.3.9 (file 631) is in the |
Hey @agc93, yeah saw your updated extension this morning and made sure the json files get updated correctly. FYI Tannin is on holiday for two weeks so he may not be very responsive until he's back. Let me know if you need any help while he's away. |
Is your feature request related to a problem? Please describe.
If an extension wants to introduce non-backwards-compatible changes, the
IExtensionContext
includesrequireVersion
that will prevent an extension from loading in incompatible Vortex versions. The issue I'm trying to avoid is that a user who doesn't update their Vortex immediately will still have their extension updated to a version that no longer supports their current Vortex version and it will be unloaded.Describe the solution you'd like
To be clear, I haven't been able to fully understand/discern the extension update process so what I'm asking for might be impossible. Based on #6597 it seems like there is at least a period of time where both the old extension and new extension are installed. Ideally, when the new version fails to load (since
unloadIncompatible
will unload extensions where therequireVersion
isn't met), the upgrade could be "aborted" somehow, still leaving the old version in place.Describe alternatives you've considered
The only other alternative I can think of is moving the Vortex version requirement into an optional field in
info.json
which means Vortex would be able to see incompatible versions before it installed/activated the new version, but that sounds like a lot of work.Additional context
This has come about for two things in BeatVortex: I want to use the new tool parameter stuff (#6629 ), but since people might not have updated to 1.3 when I publish the update, I can't fully rely on it being there without completely breaking existing installs. Likewise, there's upcoming changes in upstream APIs that BeatVortex uses which will require breaking changes.
Ideally, I could publish a new version of the extension that requires a newer Vortex version and old users wouldn't have their games "surprise unmanaged" when the extension gets unloaded on next start, but once they updated to 1.3, the extension would update correctly.
The text was updated successfully, but these errors were encountered: