-
Notifications
You must be signed in to change notification settings - Fork 527
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
Prerelease versions with hyphen are incorrectly handled #263
Comments
I think we have to accept that nuget packages don't really use the full
|
Yes, I'm with you, NuGet do not use the full SemVer spec, but its a full subset of it, so if we implement the full one we get NuGet for free. The question is only why should we bother as we can't get any of this extended versions from NuGet.
At least we have to support the scenario with hyphen in prerelease identifiers. And as nice to have fail when someone defined a version in dependencies file we can not fully understand. |
Ok. I think that sounds like a good idea. Do you want to look into this?
|
Maybe, after this weekend I think. You know what I mean ;) |
@mexx be a bit careful: nuget v2.x not only doesn't implement the full pre-release spec, it actually implements bits of it wrong (lexical sorts when it should sort on numeric values). So if you implement it "right" you'll be incompatible with NuGet. |
Yes that's what I meant. We need to accept all the wrong versions.
|
I've provided the fix for the current problem, but there should be a general decision about how to handle versions. |
Should this work when using update-from-nuget? I seem to have an issue with this (note, the repo does contain those packages)
Is this a well know issue? debugging... |
@Andrea #288 was reverted, since it caused problems, so dashes in prerelease identifiers are still not handled correctly. Your problem seams to be unrelated to this issue, as far I can see. @forki this issue should be reopened, since it's not fixed yet. |
@mexx ok good to know. Any pointers as to what the problem could be welcome, a debug session sent me in very a different direction |
Can I see the paket.dependencies file? |
This issue still exists. Should we reopen this? |
I'm slacking on this terribly, but there was a related fix in FAKE for the SemVer parser that corrected our handling of prerelease versions. That fix is here: fsprojects/FAKE#1325, specifically the SemVerHelper. I've been meaning to port those fixes over to Paket, in both the semver structures in the bootstrapper and Paket proper. |
Thanks, @baronfel. I just came here to report this issue and was pleased to see it's already being worked on. |
SemVer defines that prerelease identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-].
NuGet allows prerelease identifies that match following regular expression
[a-z][0-9a-z-]*
, see SemanticVersion.cspaket.dependencies
Output of
paket update
paket
's parsing of prerelease identifies do not honor the hyphens.The problem is caused by using
.Split '-'
in SemVer.fsBy this the
-001
part gets lost in the parsing process.paket
should fail.The text was updated successfully, but these errors were encountered: