rpc: v2 go mod incompatibility

The RPC v2 module is never downloaded, I believe because of the v2 in the path, go mod believes it is a v2 of gorilla/rpc, not a separate package.

$ go mod vendor
go: finding github.com/gorilla/rpc/v2/json2 latest
go: finding github.com/gorilla/rpc/v2 latest
go: downloading github.com/gorilla/rpc/v2 v2.0.0-20180618141230-5c1378103183

$ go vet ./...
cannot find module for path github.com/gorilla/rpc/v2

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Reactions: 18
  • Comments: 26 (3 by maintainers)

Most upvoted comments

hit this also.

Noted. This won’t be straightforward to rectify - because we have to change the path, which will break existing users (or both!)

  • We “break” the v2 path in a new tagged release, removing the existing “v1” code. This will break those without a module-aware Go toolchain still relying on those paths.
  • Move to a v3 (tagged) and duplicate v2 in both the root and /v2 (duplicate, hugely error prone, maintenance burden)
  • ???

I’m not aware of other great options here, and am open to suggestions.

hit this today also.