feat: support semantic versioning for grain interfaces#9996
feat: support semantic versioning for grain interfaces#9996bknote71 wants to merge 1 commit intodotnet:mainfrom
Conversation
|
@dotnet-policy-service agree |
|
What is the use case for this - why wouldn't numeric versions suffice? |
A couple of thoughts on this: Traceability: Versioning in CI/CD: |
|
@bknote71 Could you use a comment or a custom attribute for those things? Grain interface versioning is primarily for compatibility breaks it's not intended to be informational. |
Summary
Add semantic versioning (SemVer) support for grain interfaces alongside the existing
ushortversioning.Motivation
The current
ushort-only versioning limits grain interfaces to a simple numeric counter. This change allows developers to use SemVer strings (e.g."1.2.0","2.0.0-beta.1") while maintaining full backward compatibility with existing numeric versions.Changes
SemanticVersionstruct (SemVer 2.0.0 compliant)GrainInterfaceVersionunified wrapper supporting bothushortandSemanticVersionVersionAttributenow acceptsstringfor SemVerGrainVersionManifestupdated to useGrainInterfaceVersionBackward Compatibility
[Version(2)]usage works unchangedGrainInterfaceVersion.Parse()auto-detects numeric vs SemVerMicrosoft Reviewers: Open in CodeFlow