You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The DotNet package uses System.Text.Json to interpret the runtimeconfig.json files associated to input binaries. System.Text.Json was introduced in .NET Core 3.0 or later, and we are currently targeting the latest LTS version of .NET 6.0. As a result, projects using AsmResolver.DotNet that target legacy .NET framework require pulling in many dependencies, including polyfill packages such as System.Buffers. For such a small (non-crucial) portion of the library, this seems excessive.
Proposal
Replace the System.Text.Json serializer/deserializer code with a small, lightweight JSON parser that we can embed into the library directly, effectively removing dependencies to System.Text.Json and other polyfill dependencies for consumers targeting legacy frameworks.
Alternatives
We can consider using compiler preprocessor directives to switch between implementations of the JSON parser (e.g., using a direcvtive like#if NETSTANDARD). This way, for builds targeting recent runtime versions, we can keep usingSystem.Text.Json and keep leveraging the simplicity and performance of this library, while for for older more generic builds, we use a light-weight JSON parser instead. The downside of this is that it requires maintaining two versions of the same functionality.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Problem Description
The DotNet package uses
System.Text.Json
to interpret theruntimeconfig.json
files associated to input binaries.System.Text.Json
was introduced in .NET Core 3.0 or later, and we are currently targeting the latest LTS version of .NET 6.0. As a result, projects using AsmResolver.DotNet that target legacy .NET framework require pulling in many dependencies, including polyfill packages such as System.Buffers. For such a small (non-crucial) portion of the library, this seems excessive.Proposal
Replace the System.Text.Json serializer/deserializer code with a small, lightweight JSON parser that we can embed into the library directly, effectively removing dependencies to System.Text.Json and other polyfill dependencies for consumers targeting legacy frameworks.
Alternatives
We can consider using compiler preprocessor directives to switch between implementations of the JSON parser (e.g., using a direcvtive like
#if NETSTANDARD
). This way, for builds targeting recent runtime versions, we can keep usingSystem.Text.Json
and keep leveraging the simplicity and performance of this library, while for for older more generic builds, we use a light-weight JSON parser instead. The downside of this is that it requires maintaining two versions of the same functionality.Additional Context
No response
The text was updated successfully, but these errors were encountered: