-
Notifications
You must be signed in to change notification settings - Fork 16
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
Exception thrown when using SemVer operator with Semver NuGet v3.0.0 #137
Comments
Hi @deepforest, thanks for raising this. In all honestly, I am surprised that .NET's dependency resolution algorithm doesn't error sooner than run time for this - in other languages, it would throw an error at build / compile time for example. We will look into this, but I can't at this point say that we will be able to implement the functionality for the SemVer comparison logic in our client. In all of our other SDKs (apart from PHP, which provides it as a language built-in ❤ ) we use a third party library. |
Indeed, "DLL Hell" still exists in .NET (core), not traditionally as it was/still with Windows Shared DLLs, yet, if you add NuGet packages, say X, Y, and X uses Z v1.0 while Y uses Z v2.0, you might have a runtime issue if Z v2.0 does breaking changes. |
Understood, thanks @deepforest The easier 'solution' on our side will be to upgrade to SemVer 3.0.0, but I suspect that will still cause issues with any applications that explicitly depend on SemVer 2.X which, according to the stats here, will be more prevalent than those that depend on 3.0.0. In the meantime, are you able to downgrade your dependency specification to 2.x? |
Yes, this is a complete .NET disaster! |
Ok sounds good @deepforest. Let us know if there is anything else you need. |
Given a project that is using Semver NuGet Version="3.0.0" explicitly:
.csproj
An exception is thrown by Flagsmith SDK when trying to evaluate a feature that is using this operator, locally (Local Evaluation Mode):
How to repro:
Expected:
Feature successfully evaluated.
Actual:
Exception is thrown when trying to evaluate locally.
Failed to access feature my-feature for identity FlagsmithDemo: Method not found: 'Boolean Semver.SemVersion.op_GreaterThan(Semver.SemVersion, Semver.SemVersion)'.
Suggestion:
Either upgrade to latest Semver and fix breaking changes, or better, do not use Semver, instead, implement the version comparison operators as part of the library.
The less 3rd-party NuGet being used, the less compatibility and dependency hell.
The text was updated successfully, but these errors were encountered: