Update System.Text.Json 5.0.0 (transitive reference) -> 9.0.0 (direct… #996
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Discussion Reference
https://discord.com/channels/531175899588984842/599270434642460753/1307336003156971574
Is this a breaking change?
(AI generated)
Polymorphic Serialization: Polymorphism for object types with custom converters was disabled in .NET 7. All object values now rely on the custom converter, requiring explicit type specification for polymorphism.
Source Generator Behavior: Reflection fallback in source-generated serializers was removed, requiring explicit annotation for all serialized types.
JsonSerializerOptions Copying: Copying JsonSerializerOptions now preserves the JsonSerializerContext, affecting reuse scenarios.
Justification
Currently, System.Text.Json 5.0.0 is already present as a transitive dependency of Gw2Sharp, but this version is obsolete and missing newer features like polymorphic serialization, which is a feature I want to use in my module.
Rather than updating Gw2Sharp and then updating Blish HUD, it seems appropriate to me that Blish HUD should dictate which version of the library is available. It's not possible to choose a different version as a module author. (Gw2Sharp may continue to target
>=5.0.0
for broadest compatibility, I don't think it is affected by the breaking changes above.)I have made sure that Blish HUD still runs with this newer package version. However, existing modules that use System.Text.Json might be affected by the breaking changes. This is a general problem with the Blish module ecosystem, not specific to this change.
Also consider the performance improvements made to System.Text.Json in the last 4 major versions. This update should make Blish HUD somewhat more efficient.