-
Notifications
You must be signed in to change notification settings - Fork 1k
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
VersionExtensions Regex does not support package ID ending with numbers #472
Comments
I believe this is still a problem based on testing what is currently shipped with 1.9.1:
Aside from the obvious workaround of changing the package name, it also doesn't look like we've got any tests to cover this regression. Is this something that you'd be interested in submitting @CrazyOrange? |
Hey @shiftkey i took a look at this and maybe found a bigger issue at large? Did we ever write down which kind of SemVer we are supporting? Because the more widely used SemVer 2.0 does not support 4-part version numbers, but we're accepting them as compatible: Squirrel.Windows/test/ReleaseEntryTests.cs Lines 78 to 82 in c4e875b
This is a problem for this issue because to my knowledge this task can't be done without spelling out most of the semver ruleset in the regex. Even then we would never be able to make it actually compatible with semver 2.0. Take this: |
I just checked specs again... not even semver 1.0 considers them compatible. but even then: There is no way to allow the dot separator while simultaneously supporting semver. There just is no way to support this. PackageIDs allowing packages like "p.123" to exist crosses us here. |
See also #917 (and this comment too) - not sure the 4-part version is supported all the way. |
@maxbrunsfeld Do you rememember why 4 digits release numbers were added to the requirements of #450 ? |
Just to clear up any confusion - there's two separate issues here:
While the issue describes a packageid without a dot before the number, i think we have to think about not supporting the scenario at large - otherwise the next rightfully raised issue will torpedo any effort made here. |
As far as I can remember, the purpose of that PR was to allow Squirrel to work with semver version numbers with prerelease strings, like Maybe the |
In any case a decision has to be made:
From a user perspective the last one of course seems like the best case scenario, but i must admit i do not grasp the architecture of squirrel enough to tell whether or not this would shoot us in the foot in the long run. |
Hi,
if you use NuGet Package Explorer and your nuget package id ends with a number updates won't work anymore (caused by changes in VersionExtensions.cs for prerelease support).
The NuGet Package Explorer uses a point to seperate the package id from the version number (at least if you don't change the filename).
ID: MyId123
Version: 1.1.0
The result would be "MyId123.1.1.0.nupkg"
The suffix regex will remove ".nupkg" and the version regex will match "123.1.1.0" instead of "1.1.0".
A workaround would be renaming your NuGet Package to "MyId123-1.1.0.nupkg".
The code should be changed or this naming issue should be noted somewhere.
The text was updated successfully, but these errors were encountered: