Update embedded SemVersion class or use Semver package again #14539
ronaldbarendse
started this conversation in
Features and ideas
Replies: 1 comment 2 replies
-
IMO we are too tightly bound to that class today. We only use a subset of the features and still have quite some extension methods. I guess it would be fairly simple to just have our own class instead |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Umbraco 8 still had a package reference on
Semver
:Umbraco-CMS/src/Umbraco.Core/Umbraco.Core.csproj
Line 95 in 159f92d
But in Umbraco 9, this reference has been removed and the
SemVersion
class was copied over, see commit: 152ba31. I believe the motivation was to only have .NET (System) and Microsoft dependencies in the core Umbraco projects.We updated this class several times to add nullability support and in a recent PR I did, I've added an additional attribute to improve the nullable static analysis:
Umbraco-CMS/src/Umbraco.Core/Semver/Semver.cs
Line 199 in 84a0cd8
The Semver package is currently on version 2.3.0, so there are potentially some bugfixes we haven't included yet. The reverse also seems to be the case: we've added nullable support, but that's something not yet available in the latest Semver release (although the source seems to be updated and this will probably be released in the next major).
So what should we do?
SemVersion
class (potentially lagging behind again in the future):a. Contribute our changes back to the original repository and create a copy again (making it easier to stay up-to-date later);
b. Update the class from the original repository and re-apply any changes we did (in case we can't contribute them back).
Beta Was this translation helpful? Give feedback.
All reactions