Lower minimum System.Memory version to 4.5.4#455
Lower minimum System.Memory version to 4.5.4#455sliekens wants to merge 1 commit intoSimonCropp:mainfrom
Conversation
- Lowers the barrier for consumers on older environments. - System.Memory 4.5.4 is more widely transitively included than 4.5.5. - 4.5.4 remains the version with the highest download count, ensuring broad compatibility without requiring unnecessary upgrades.
|
why would we want to make a change that encourages/enables people to use an older buggier version of an package? |
|
It has to do with collection expressions being in a broken state if you use Polyfill in an older TFM with System.Memory <4.5.5, which has quite a high possibility because many other packages import 4.5.4. All the primitives are there, just the polyfills are missing (gated behind 4.5.5). |
then i would prefer a warning that tells people to upgrade to at least the min supported version |
|
Okay but extending that line of thought, why not require 4.6.3? |
that would be a breaking change the outcome absolutely should be that people should be using the latest stable of any dependencies, notwithstanding technical blocker. AFAIK there is no blocker for you updating to 4.6.3. the actual problem is that you got no feedback that you were using an incompatible version of a dependency |
While this is true, it's not this library's responsibility. My preference would be that Polyfill depend on the minimum compatible version to give consumers more flexibility. If a lower incompatible version is detected then a warning instead of silent failure would be great, but that's not the case with this particular version adjustment. |
|
I can appreciate recommending people to upgrade their dependencies, but as a user I also don't want my Polyfill library to warn me for using outdated dependencies, I'm already well aware. I'm also a bit reluctant to add a System.Memory dependency to my own library's nuspec beyond what is needed for System.Text.Json 6.0.11. I'm on the fence about reopening a different PR to add a warning for <4.5.5. I believe it should just work. //edit: whether this is accepted or not, the warning for incompatible versions is always a good idea so I will proceed with that in a different PR |
This PR lights up features like collection expressions for projects which use System.Memory v4.5.4, which previously required at least v4.5.5.
Reasons for this change:
System.Text.Json 6.0.xis a popular target for .NET Standard 2.0 libraries and depends onSystem.Memory 4.5.4