-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Extend existing System.Version class or provide new one. #15868
Comments
There are many different forms a version beyond |
No, read issue more detailed. I suggest provide string[] Parts that is independent from format |
Then why not just use string.Split? You weren't just suggesting exposing a string[] Parts, you were suggesting additional heuristics on top of that, and I'm saying that I don't believe such heuristics should be codified into a type in corefx. |
Agreed. Just use the nuget semantic version class https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Core/NuGet.Versioning/SemanticVersion.cs |
Not agree. Why we should use so strict version format for AssemblyVersion and so on. X.X.X.X is not so good format to think that it's standard. For now - assembly versions are distinct from that is applyed to other parts. For example numeric Revision is good for numbered VCS such SVN and not so good for hashed (git). |
Is your request actually about being able to use a different versioning scheme for assemblies? That's a different issue. If you have a compelling reason for why that should be expanded, please feel free to open an issue in the coreclr repo about that. But that's mostly separate from saying that Version as a class should support arbitrary versioning schemes. You gave one specific example that has some very specific characteristics: it uses The point is that you're proposing taking an existing type that currently has very well-defined semantics and augmenting it with arbitrary heuristics around parsing arbitrary strings. Further, the existing Version class has semantics that would likely result in consuming code breaking if it applied such additional semantics, e.g. code that relies on version parsing failing in certain cases. And without a concrete specification for the formats supported, this does not belong in corefx. If the Version class as is doesn't meet your needs, and if the type that @davidfowl suggested doesn't meet your needs, you're of course welcome and encouraged to write your own implementation that provides the exact behavior you want and put out a NuGet package so that others can consume your implementation. At that point it doesn't really matter that it's not in corefx, as others can use it just as easily. Given all this, I'm going to close out this issue. But thank you for the suggestion and interest. |
Must support not just {Maj}.{Min}.{Rev}.{Bld} but be more smart and complex.
Assume
prod-edition.1.2-rc1-rev:43abcd32
Expected:
['prod','edition',1,2,rc1,rev,43abcd32]
and provide all of them as PartsIt can be very helpful for #15824 and for dealing with any package/ product versions. Additionally it add support to provide more complex version info for assemblies with Assembly(File)Version attribute.
The text was updated successfully, but these errors were encountered: