json-patch icon indicating copy to clipboard operation
json-patch copied to clipboard

Up to date jsonptr dependency

Open nicraMarcin opened this issue 1 year ago • 2 comments
trafficstars

Hi, json-path uses old jsonptr = "0.4.7" crate. The newest version is 0.6.0 and json-patch isn't compatible with it. Are there any chances to update it?

nicraMarcin avatar Aug 21 '24 15:08 nicraMarcin

Since json-patch has jsonptr types in its public API, maybe it should re-export jsonptr (maybe even just PointerBuf is enough? I didn't check) so that users of json-patch can use json_path::jsonptr (or use json_path::PointerBuf) and not worry about compatibility.

t4lz avatar Aug 22 '24 23:08 t4lz

I merged the update with the changes for json-patch, will release at some point later.

One issue is that PointerBuf didn't exist before, it was a breaking API change on jsonptr side. Re-exporting won't help with them breaking API again (but maybe they are settled on reasonable API already).

idubrov avatar Aug 23 '24 01:08 idubrov

Hey, sorry about that, I went through a major redesign with Chance to minimise allocations with that crate. We've still got a few kinks to iron out before getting to 1.0 but nothing that should be traumatic to json-patch, I'm hoping. Thanks a lot for upgrading, I planned to contribute a PR (I introduced this dependency, after all) but been too busy the past few months.

I'll try and have a look soon to see if there are any places where json-patch can take advantage of the changes we've made.

About re-exporting, that might be a good idea to be honest, at least for the basic Pointer and PointerBuf types.

Sorry everyone for the inconvenience! I hope you'll find the new API more ergonomic to use.

asmello avatar Oct 15 '24 20:10 asmello

Also, perhaps this can be closed now that you're on 0.6.x?

asmello avatar Oct 15 '24 20:10 asmello