question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] NugetPreReleaseTag does not respect padding setting

See original GitHub issue

Description

With padding set, the nugetprereleasetag does not match the nugetversionv2

legacy-semver-padding: 3
build-metadata-padding: 3
commits-since-version-source-padding: 3

Expected Behavior


  "NuGetVersionV2": "0.1.1-ci011",
  "NuGetVersion": "0.1.1-ci011",
  "NuGetPreReleaseTagV2": "ci011",
  "NuGetPreReleaseTag": "ci011",

Actual Behavior

  "NuGetVersionV2": "0.1.1-ci011",
  "NuGetVersion": "0.1.1-ci011",
  "NuGetPreReleaseTagV2": "ci0011",
  "NuGetPreReleaseTag": "ci0011",

Possible Fix

Steps to Reproduce

Relevant config:

legacy-semver-padding: 3
build-metadata-padding: 3
commits-since-version-source-padding: 3

Environment

5.6.6+Branch.main.Sha.80adc3f3b8919b655adca7b796b273fb10478c3f

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
bitbonkcommented, Sep 23, 2022

@asbjornu Today I learned that I must not remove padding as I suggested. It is true that nuget actually supports SemVer 2.0.0 but even according to SemVer 2.0, I think that the following is true

1.0.0-beta10 < 1.0.0-beta9.

The dot in the prerelease identifier is actually significant. The following is also true:

1.0.0-beta.9 < 1.0.0-beta.10.

So I think, if you want to use NuGetVersionV2 or NuGetVersion, make sure you have enough padding active. And if you don’t want to have padding, use SemVer or FullSemVer (wich both contain the dot).

1reaction
asbjornucommented, Sep 15, 2022

If you don’t want padding, can’t you use SemVer or FullSemVer?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Software Development
Posts about Software Development written by Mehmet Salgar.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found