evanphx/json-patch

invalid v > 1 go module

Closed this issue · 5 comments

Since this is tagged as v4.X and has a go.mod, the import path must be github.com/evanphx/json-patch/v4 including in the module directive and in any code importing packages across the repo and externally.

https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher

Trying to import v4.6.0 from a project using go modules does not work without this, v4.5.0+incompatible is the last version that works with go modules (this works because it is "incompatible" but not opted into modules by not having a go.mod).

Removing go.mod / go.sum would also work, v4.7.0 could be imported as +incompatible with no other changes.

I'm not sure which route you'd prefer, but currently projects using go modules are stuck on v4.5.0. I'd be happy to send a PR for whatever option is acceptable.

Sorry to let this sit for so long. Please feel free to submit a PR to change to /v5 and bump the version to that. That way it's a clear break.

@BenTheElder what you say?

Hi @evanphx thanks for the response :-)

No worries, I'll get on drafting a PR :-)

filed #100, but there are some outstanding questions there about how we want to handle it (e.g. travis needs to use at least one more recent go version, which ones?).

Thanks @BenTheElder for getting this sorted out!