Semantic version shouldn't always ignore "-0" prerelease tag
Pathoschild opened this issue ยท 1 comments
SemanticVersion
incorrectly treats 1.0.0-0
as equivalent to 1.0.0
. That's due to an old edge case where modders incorrectly assumed 0 was the default for the confusingly-named 'build' field, which caused SMAPI to treat it as a prerelease version:
"Version": {
"MajorVersion": 1,
"MinorVersion": 0,
"PatchVersion": 0,
"Build": 0
},
That confusion no longer exists with the new version format in SMAPI 2.0+:
"Version": "1.0.0-0"
This causes strange behaviour like new SemanticVersion("1.0.0-0").IsLessThan("1.0.0-2") == false
. Make sure -0
prerelease tags are only ignored when parsing a legacy version field.