Jsonx dependency in gocb

Hi, we use couchbase/gocb at Dapr, and I had some confusion regarding a dependency.

Background

This is our go mod why output:

go mod why gopkg.in/couchbaselabs/jsonx.v1
# gopkg.in/couchbaselabs/jsonx.v1
github.com/dapr/dapr/cmd/daprd
github.com/dapr/components-contrib/state/couchbase
gopkg.in/couchbase/gocb.v1
gopkg.in/couchbaselabs/jsonx.v1

Relevant part from our go.mod file

gopkg.in/couchbase/gocb.v1 v1.6.4
gopkg.in/couchbase/gocbcore.v7 v7.1.18 // indirect
gopkg.in/couchbaselabs/gocbconnstr.v1 v1.0.4 // indirect
gopkg.in/couchbaselabs/gojcbmock.v1 v1.0.4 // indirect
gopkg.in/couchbaselabs/jsonx.v1 v1.0.0 // indirect

Question one

If I try to check the code for gocb.v1@v1.6.4, there is no go.mod file. There is only a Makefile with go get commands, but the gopkg.in/couchbaselabs/jsonx.v1 dependency is still not here.

How does gocb.v1 depend on jsonx.v1?

Question two

jsonx.v1 was unlicensed earlier, but with Add Apache License 2.0 by fenech · Pull Request #2 · couchbaselabs/jsonx (github.com), it now has a license. Can we upgrade jsonx.v1's version in gocb.v1@1.6.4, such that it’s also compliant?

/cc @chvck @ingenthr

Hi @shubham1172, just a quick note that 1.6 goes EOL next month (and is already end of full maintenance) so you should consider upgrading to 2.0 :slight_smile:.

That said, gocb v1 uses the old style of Go dependency management so if jsonx gets a new tag in the v1 line then gocb will automatically pull that in. I’ll talk to the jsonx project owner and see if I can get them to cut a new tag.

1 Like

That will be really helpful, thanks @chvck!

Hi @shubham1172 FYI I’ve just pushed a new tag to jsonx, containing your change. I think that gocb.v1 should now pull in that tag.

1 Like

Works, @chvck, thanks a lot for the quick help! :smile: