Anvil icon indicating copy to clipboard operation
Anvil copied to clipboard

Plugin Reload: Migrate to System.Text.Json

Open Jorteck opened this issue 3 years ago • 2 comments

With the addition of the NUI API, an extra dependency was added to Newtonsoft.Json due to its simplicity for serializing polymorphic objects.

Unfortunately it has a few issues from sometimes holding hard dependencies to plugins, preventing AssemblyLoadContexts from being unloading and causing hot reloads to fail.

Jorteck avatar Oct 17 '21 01:10 Jorteck

Should not start working on this until we have appropriate test coverage: https://github.com/nwn-dotnet/Anvil/issues/463

Jorteck avatar Jan 25 '22 22:01 Jorteck

Just saw this! While this is a long ways away, I'd like to mention that System.Text.Json may not solve the issue. I've used it in one of my plugins to help with hot reloading with no success. I certainly could be missing something in my setup, but this issue was pretty convincing to me: https://github.com/dotnet/runtime/issues/65323

I ended up having to use Jil instead: https://github.com/kevin-montrose/Jil

Samuel-IH avatar Feb 19 '23 01:02 Samuel-IH