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

Expose original unmodified version string through read-only property #1325

Merged
merged 2 commits into from
Apr 20, 2017

Conversation

xavierdecoster
Copy link
Member

@emgarten
Copy link
Member

I'm fine with this change, but I am not sure this should ever be used over ToString(). If this is for the gallery we should normalize all SemVer 2.0.0 versions to avoid the confusion non-normalized versions cause.

@joelverhagen
Copy link
Member

If this is for the gallery we should normalize all SemVer 2.0.0 versions to avoid the confusion non-normalized versions cause.

We already have this behavior in the V2 feed. The Version property has always had the original version string. The NormalizedVersion has the normalized version plus any build metadata.

We improved this naming in V3. Version has the normalized version plus build metadata and VerbatimVerrsion has the original version string.

/// <summary>
/// Returns the original, non-normalized version string.
/// </summary>
public string OriginalVersion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: could be public string OriginalVersion => _originalString right? I like that syntax 😄

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 4baa3cc

@emgarten
Copy link
Member

emgarten commented Apr 19, 2017

In that case, why allow a SemVer2 package to be uploaded where the normalized and non-normalized versions are different?

I suppose the client should have thrown on these from the start and solving it here won't help. I just really want the normalized vs original issue to go away, it's painful.

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

Successfully merging this pull request may close these issues.

4 participants