Open applejag opened 3 years ago
Also, I probably want to do something with a custom patch part of the version, like I've done with Newtonsoft.Json-for-Unity, so for Bson v1.0.2 I use v1.0.2xx, leading to v1.0.201, v1.0.202, v1.0.203, etc for my internal releases and bugfixes.
What I want to do
Release the source code in the package and use an
.asmdef
so it can target any Newtonsoft.Json version.Main issues
I want to keep the repo as similar to the upstream one made by JamesNK, so when changes come they are easily merged in.
If user uses some other DLL that they don't control, one that has been compiled against the NuGet package Newtonsoft.Json.Bson, then the assembly reference will assert that the Newtonsoft.Json.Bson has the expected signature. If I provide the source code and use
.asmdef
file, then I cannot add such a signature, and the package wont compile.If JamesNK starts using newer C# syntax, such as the Nullable reference types that he added in Newtonsoft.Json v12.0.3, then the Unity
.asmdef
build will break as that syntax is not yet supported. We want to keep Unity 2018 support as many are still using that, so this is nothing that will get patched over time.Suggested solution
Do precompiled DLLs, like how the Newtonsoft.Json-for-Unity package does it.
We release the package multiple times under different names. One targeting the latest Newtonsoft.Json version, and other that are locked down to the older versions.
Example:
Having the version specified earlier in the package name does force users to use a different scoped registry if they need to switch version. If this becomes needed, then all other Newtonsoft.Json-for-Unity packages should also get equivalent aliases, so you can access them all from the specific registries. A lot more packages to keep track of, but maybe worth it?
Ex:
Yep that seems like the leading concept for now.
Not decided yet
If anyone comes past this and has a suggestion, then please tell!