Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Suggestion: Backport to Json.NET 11.x.x, 10.x.x, 9.x.x, and 8.x.x #16

Closed
2 tasks done
applejag opened this issue Dec 1, 2019 · 11 comments
Closed
2 tasks done

Suggestion: Backport to Json.NET 11.x.x, 10.x.x, 9.x.x, and 8.x.x #16

applejag opened this issue Dec 1, 2019 · 11 comments
Labels
enhancement New feature or request

Comments

@applejag
Copy link
Owner

applejag commented Dec 1, 2019

Description

This project is lacking for the users who do not want to update their projects to target a Json..NET 12.0.1. Suggesting to downgrade all the way down to 8.0.3. Of course all provided as the usual UPM provider and others.

This includes:

Edit: Will not backport 8.0.1 nor 8.0.2 in favor of instead only supporting 8.0.3, as they are only minor patches of the same version, and are fully backwards compatible. Same goes for 10.0.1, 10.0.2, and 11.0.1.

Edit 2: Will not do 9.0.x nor 8.0.x at all. See comments.

Why we need this

To gain more users. More users equals more bug reports. More bug reports equals more bugfixes. More bugfixes equals better repository.

Suggested solution

For each old version, create a new release, and revert the changes made from for example 11.0.2 to 12.0.1. Important to keep track of the conflicting changes.

Deployment can perhaps be automated with making a backport branch with deployment jobs of the CI/CD enabled. Or just doing it manually.

@applejag applejag added the enhancement New feature or request label Dec 1, 2019
@tsweeper

This comment has been minimized.

@applejag

This comment has been minimized.

@applejag
Copy link
Owner Author

Change of mind, will not some versions. Note added to description:

"Will not backport 8.0.1 nor 8.0.2 in favor of instead only supporting 8.0.3, as they are only minor patches of the same version, and are fully backwards compatible. Same goes for 10.0.1, 10.0.2, and 11.0.1."

@Nanorock
Copy link

Nanorock commented Feb 11, 2020

Hi, your marked the comment from tsweeper as off-topic , but would porting to newtonsoft json 10.0.x solve the issue ? (We're encountering this same issue on Google but also Jira, both dll can't load the forked json dll)

@applejag
Copy link
Owner Author

@Nanorock

Yes it would! Actually it's just the version number that's the problem. I've not found the time to start backporting. Hopefully soon.

@xabio
Copy link

xabio commented Feb 21, 2021

@jilleJr Please keep us informed, as SinglaR is using Newtonsoft

Assembly 'Assets/Plugins/Microsoft.AspNetCore.SignalR.Common.dll' will not be loaded due to errors:
Microsoft.AspNetCore.SignalR.Common references strong named Newtonsoft.Json in a different folder, versions has to match. Assembly references: 11.0.0.0 Found in project: 12.0.0.0.

We could offer you beer to boost your deliveries ;)

@applejag
Copy link
Owner Author

@xabio Ooo nice that you're using SignalR :o

I must though counter with my list of excuses:

  1. This is a "boring" task, just tedious and I personally don't expect it to be fun.

That being said, I did actually kind of expect Unity's fork of my repo to add backporting, but I must've misunderstood them. Seems like they never will add backports.

I'll take a closer look at this, see if it's really that difficult and tedious.

Side note: I currently don't take beer as a payment ;) I am accepting donations for coffee, though I'm currently getting more money than I'm spending on coffee (OpenCollective ensures I only spend money on stuff I'm accepting donations for). Odd problem to have.

@xabio
Copy link

xabio commented Feb 21, 2021

@jilleJr and is there some way to tell Unity to take that Newtonsoft you have created, as it was the 11.0.0 version ?
Some kind of binding redirect ? Many thanks, you job is really awesome , cannot understand how you got to that degree of knowledge about Newtonsoft internal side

@applejag
Copy link
Owner Author

@xabio sorry to say that binding redirections are not supported in Unity. Which also means you can only use 1 version of Newtonsoft.Json at a time.

@applejag
Copy link
Owner Author

@xabio I tried and backporting to 11.0.2 was not that difficult actually. I think mostly because 11.0.2 and 12.0.3 are differenciating in more or less bug fixes only. I'm honestly quite scared of attempting this for 10.0.3, but as Json .NET 10.x has been so frequently requested, I will at least make an honest attempt on it.

I didn't think about the upm branch that I have set up, so I kind of messed that one up. The latest version on the upm branch is currently the 11.0.202, which is misleading as 12.x is the latest. I will probably set up some new branch, like upm-11.0.2 or something. Don't think I can add upm/11.0.2 though due to Git restrictions.

Newtonsoft.Json-for-Unity 11.0.202 (based on Newtonsoft.Json 11.0.2) has just been released and is available via the Cloudsmith and OpenUPM registries already

2021-02-25-210022_928x723_scrot

@applejag
Copy link
Owner Author

Happy news!

Now the package has both a Json .NET v11.0.2 and a v10.0.3 backports!

@tsweeper It is 473 days later, so I assume you may have moved on to a different project like 3 consecutive times by now, but as they say: Better late than never 😅 You should now be able to use google.apis.sheets.v4 with this package :)

It's much less relevant nowadays as since their Google.Apis.Core v1.44.0 they switched to using Newtonsoft.Json 12.0.x.

I'm pulling the breaks here on the backporting. I'm not going to backport any further unless someone really needs it. It was since Json .NET 10.0.x that they started using the new SDK styled csproj format, and the older format is such an extreme headache to work with.

If anyone needs Json.NET v9.0.x or lower, then open a new issue

To be extra clear: It's not planned, but I will consider it if anyone needs it. I want to get to work on other stuff for this repo. This issue has been dragging my mind for too long.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants