Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

semver inconsistencies #181

Open
art0007i opened this issue Oct 21, 2022 · 7 comments
Open

semver inconsistencies #181

art0007i opened this issue Oct 21, 2022 · 7 comments
Labels
broken A bug or any other kind of breakage

Comments

@art0007i
Copy link
Member

some entries in the manifest don't use semver correctly (semver has exactly 3 parts, while some versions have 4 or even 2)

I think either the manifest schema on the website should be updated to mention that semver isn't really respected
or the incorrect semvers should be fixed up.
I have made a fork with all the semvers fixed up master...art0007i:neos-mod-manifest:patch-4

@zkxs
Copy link
Collaborator

zkxs commented Oct 21, 2022

I think forcing semver via the schema and fixing the non-conforming mod versions is a good approach here. The semver spec provides a regex that could be used in schema.json to enforce valid semver: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$

LocalVideoPlayerVolume 1.0.0.1 and GenericSettings 1.0.0.2 concern me, as I'm not certain truncating the 4th number is the correct way of dealing with this. As far as I can tell there are no code changes in LocalVideoPlayerVolume between 1.0.0.0 and 1.0.0.1, but the fact the that the dlls are named LocalVideoPlayerVolume.dll and LocalVideoPlayerVolumeMuted.dll respectively makes me suspect there may be a difference. GenericSettings only has one release, so I don't think that's as big of an issue.

@zkxs zkxs added the broken A bug or any other kind of breakage label Oct 21, 2022
@art0007i
Copy link
Member Author

yep I saw that too with the 4th number, maybe it would be fine to just put the 4th number into the 3rd instead since in all cases where it matters the 3rd is 0

also im guessing LocalVideoPlayerVolume.dll and LocalVideoPlayerVolumeMuted.dll changes the default value for volume sliders to 0 for LocalVideoPlayerVolumeMuted.dll and to 1 for the other one

@art0007i
Copy link
Member Author

wow I am trying to find some documentation on semver ranges (we use them in dependencies and conflicts) and I can't actually find anything official, and finding any regex for it seems basically impossible...

@zkxs
Copy link
Collaborator

zkxs commented Oct 23, 2022

iirc semver ranges aren't actually part of semver? They're an extra thing a few dependency managers (npm, cargo, etc) do.

@art0007i
Copy link
Member Author

yes I have found that out now, but there is a wip on their github repo on a separate branch

@art0007i
Copy link
Member Author

ok I took the regex from the semver spec, and turned it into a fairly basic version range regex https://regex101.com/r/NDQ4J8/1
it's still missing some stuff from the proposed spec (logical or operators, and hyphen ranges)
we could also use the cargo spec which doesn't have logical or and hyphen ranges, instead it has comma separated list of requirements

though I have no clue how to turn either of those into a regex

@ljoonal
Copy link
Member

ljoonal commented Dec 18, 2022

relevant XKCD comic

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
broken A bug or any other kind of breakage
Projects
None yet
Development

No branches or pull requests

3 participants