Skip to content
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

Prevent usage of leading 0 in package version numbers #1174

Closed
pascalberger opened this issue Mar 1, 2017 · 7 comments
Closed

Prevent usage of leading 0 in package version numbers #1174

pascalberger opened this issue Mar 1, 2017 · 7 comments

Comments

@pascalberger
Copy link
Contributor

What You Are Seeing?

Currently it is possible to have packages containing leading zeros in version numbers (eg. Totalcommander, see chocolatey-community/chocolatey-packages#600).

What is Expected?

While this works using current choco client and the chocolatey.org feed, it can break with other tools (eg. ProGet).
NuGet had a breaking change introduced in the 3.4 version of the client to prevent leading zeros. See here. I therefore assume that the choco client would also have issues with these packages as soon as is updates to a never NuGet.Core version.

I therefore would suggest to start preventing the packaging of packages containing leading zeros in version numbers and prevent publishing them to chocolatey.org.

@jberezanski
Copy link

I agree in principle - I believe version numbers should be treated strictly as numbers, not strings, so leading zeros should be meaningless.
The choco client still needs to be able to handle existing packages with leading zeros, however.

@pascalberger
Copy link
Contributor Author

I agree that choco installshould be able to handle installation of existing packages with leading zeros, but choco pack should tread version numbers strictly as numbers.

@ferventcoder
Copy link
Member

Version numbers are treated strictly as numbers, however handling on the source repository may look at the entire version number with the leading zeros.

@ferventcoder ferventcoder modified the milestone: 0.10.4 Mar 23, 2017
@TheCakeIsNaOH
Copy link
Member

There is an issue here with discussion: NuGet/Home#3050

TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jan 12, 2023
… zeros

These tests are to ensure that the version normalization on pack with the
new NuGet assemblies is consistent into the future. There were already tests
for removing semver v2 build metadata and that four part versions still work.
This adds tests to ensure that leading zeros are removed, and that a zero in
the fourth part of the version will be trimmed down to three parts.
https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#normalized-version-numbers
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jan 12, 2023
… zeros

These tests are to ensure that the version normalization on pack with the
new NuGet assemblies is consistent into the future. There were already tests
for removing semver v2 build metadata and that four part versions still work.
This adds tests to ensure that leading zeros are removed, and that a zero in
the fourth part of the version will be trimmed down to three parts.
https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#normalized-version-numbers
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jan 13, 2023
… zeros

These tests are to ensure that the version normalization on pack with the
new NuGet assemblies is consistent into the future. There were already tests
for removing semver v2 build metadata and that four part versions still work.
This adds tests to ensure that leading zeros are removed, and that a zero in
the fourth part of the version will be trimmed down to three parts.
https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#normalized-version-numbers
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jan 13, 2023
…ing zeros

Also adds install tests for packages with a forth part zero
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jan 13, 2023
…ing zeros

Also adds install tests for packages with a forth part zero
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jan 13, 2023
…ing zeros

Also adds install tests for packages with a forth part zero
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jan 13, 2023
… with leading zeros

Also adds install tests for packages with a forth part zero
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jan 13, 2023
…stall with leading zeros

Also adds install tests for packages with a forth part zero
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jan 13, 2023
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jan 13, 2023
… zeros

These tests are to ensure that the version normalization on pack with the
new NuGet assemblies is consistent into the future. There were already tests
for removing semver v2 build metadata and that four part versions still work.
This adds tests to ensure that leading zeros are removed, and that a zero in
the fourth part of the version will be trimmed down to three parts.
https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#normalized-version-numbers
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jan 13, 2023
…s with leading zeros

Also adds install tests for packages with a forth part zero
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jan 13, 2023
@TheCakeIsNaOH TheCakeIsNaOH added this to the 2.0.0 milestone Jan 14, 2023
gep13 pushed a commit to TheCakeIsNaOH/choco that referenced this issue Jan 16, 2023
… zeros

These tests are to ensure that the version normalization on pack with the
new NuGet assemblies is consistent into the future. There were already tests
for removing semver v2 build metadata and that four part versions still work.
This adds tests to ensure that leading zeros are removed, and that a zero in
the fourth part of the version will be trimmed down to three parts.
https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#normalized-version-numbers
gep13 pushed a commit to TheCakeIsNaOH/choco that referenced this issue Jan 16, 2023
…s with leading zeros

Also adds install tests for packages with a forth part zero
gep13 pushed a commit to TheCakeIsNaOH/choco that referenced this issue Jan 16, 2023
gep13 added a commit that referenced this issue Jan 16, 2023
(#1174)(#1610) Add tests for package versions with leading zeros
@gep13
Copy link
Member

gep13 commented Jan 24, 2023

@AdmiringWorm @TheCakeIsNaOH am I right in saying that this work has been completed?

@gep13
Copy link
Member

gep13 commented Jan 24, 2023

After discussion with @AdmiringWorm we agree that this can be closed.

@gep13 gep13 closed this as completed Jan 24, 2023
@gep13 gep13 changed the title Prevent leading 0 in package version numbers Prevent usage leading 0 in package version numbers Jan 24, 2023
@gep13 gep13 changed the title Prevent usage leading 0 in package version numbers Prevent usage of leading 0 in package version numbers Jan 24, 2023
corbob added a commit to corbob/choco that referenced this issue May 15, 2023
Add packages with a non-normalized version number. These are the packed 
nupkgs as we can't `choco pack` them with v2.x. Updated the 
`Invoke-Tests.ps1` file in order to also copy these files to the test 
packages directory.
corbob added a commit to corbob/choco that referenced this issue May 15, 2023
Add packages with a non-normalized version number. These are the packed 
nupkgs as we can't `choco pack` them with v2.x. Updated the 
`Invoke-Tests.ps1` file in order to also copy these files to the test 
packages directory.
gep13 pushed a commit to corbob/choco that referenced this issue May 16, 2023
Add packages with a non-normalized version number. These are the packed 
nupkgs as we can't `choco pack` them with v2.x. Updated the 
`Invoke-Tests.ps1` file in order to also copy these files to the test 
packages directory.
corbob added a commit that referenced this issue May 19, 2023
* release/2.0.0: (422 commits)
  (maint) Update Chocolatey.NuGet.Client version
  (build) Update GRM Template to add full stop.
  (build) Update GRM config for BuildAutomation tag
  (#508) Ensure correct configuration object is used
  (tests) Use nuspec for version normalization tests
  (tests) Tag version normalization Pester tests
  (#158) Restore --source in tab completion for list
  (#158) Refactoring based on pairing session
  (#158) Restore --source for choco list
  (maint) Add vscode settings file
  (maint) Changes during pairing session
  (tests) Add non-normalized version Pester tests
  (maint) Update testing vagrant for granular runs
  (maint) Update Pester test for Pester v5 norms
  (#1174) Add non-normalized packages for tests
  (#508) Fix v3 feeds mixed with v2 feeds not finding packages
  (#508) Do case insensitive comparison on package ids
  (maint) Remove prerelease warnings from the nuspec
  (maint/doc) Amend GenerateDocs for list/search split
  (#2902) Ensure PowerShell tasks use SystemDefault TLS
  ...
@choco-bot
Copy link

🎉 This issue has been resolved in version 2.0.0 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants