devinbost opened a new issue #315:
URL: https://github.com/apache/pulsar-client-go/issues/315


   #### Expected behavior
   
   I should not have problems when building my go module
   
   #### Actual behavior and steps to reproduce
   
   I get a never-ending rabbit hole of dependency/module/package conflicts that 
end with a dead-end. It starts like this:
   
   Go module:
   
   ```
   module github.com/path/to/module
   
   go 1.13
   
   require github.com/apache/pulsar-client-go v0.1.1
   ```
   
   Then, I run:
   `go get -v -u all`
   
   and get this:
   
   ```
   go: finding github.com/docker/libtrust latest
   go: finding github.com/tonistiigi/fifo latest
   go: finding golang.org/x/time latest
   go: finding github.com/Azure/go-ansiterm latest
   go: git.overstock.com/scm/dedev/bc-utils/src/fd-container-go imports
           github.com/docker/docker/api/server/router/container imports
           github.com/Sirupsen/logrus: github.com/Sirupsen/logrus@v1.6.0: 
parsing go.mod:
           module declares its path as: github.com/sirupsen/logrus
                   but was required as: github.com/Sirupsen/logrus
   ```
   So, I replace it by adding a replace line to the go.mod file like this:
   
   ```
   module github.com/path/to/module
   
   go 1.13
   
   require github.com/apache/pulsar-client-go v0.1.1
   
   replace github.com/Sirupsen/logrus => github.com/sirupsen/logrus v1.6.0
   ```
   
   which leads to this:
   
   ```
   $ go get -v -u all
   go: finding github.com/tonistiigi/fifo latest
   go: finding github.com/docker/libtrust latest
   go: finding github.com/Azure/go-ansiterm latest
   go: finding golang.org/x/time latest
   go: git.overstock.com/scm/dedev/bc-utils/src/fd-container-go imports
           github.com/docker/docker/container imports
           github.com/docker/docker/libcontainerd imports
           github.com/tonistiigi/fifo: 
github.com/tonistiigi/fifo@v0.0.0-20200410184934-f15a3290365b: parsing go.mod:
           module declares its path as: github.com/containerd/fifo
                   but was required as: github.com/tonistiigi/fifo
   ```
   So, I add another replace to go.mod, like this:
   
   ```
   module github.com/path/to/module
   
   go 1.13
   
   require github.com/apache/pulsar-client-go v0.1.1
   
   replace github.com/Sirupsen/logrus => github.com/sirupsen/logrus v1.6.0
   
   replace github.com/tonistiigi/fifo => github.com/containerd/fifo latest
   ```
   
   which leads to this:
   
   ```
   $ go get -v -u all
   go: finding github.com/containerd/fifo latest
   go: finding github.com/docker/libtrust latest
   go: finding github.com/Azure/go-ansiterm latest
   go: finding golang.org/x/time latest
   go: finding github.com/go-check/check latest
   go: finding github.com/vishvananda/netns latest
   go: finding github.com/syndtr/gocapability latest
   go: finding github.com/coreos/pkg latest
   go: finding github.com/niemeyer/pretty latest
   go: finding github.com/samuel/go-zookeeper latest
   go: finding github.com/xiang90/probing latest
   go: finding github.com/tmc/grpc-websocket-proxy latest
   go: finding github.com/golang/groupcache latest
   go: git.overstock.com/scm/dedev/bc-utils/src/fd-container-go imports
           github.com/docker/docker/container imports
           github.com/docker/libnetwork imports
           github.com/docker/libnetwork/datastore imports
           github.com/docker/libkv/store/etcd imports
           github.com/coreos/etcd/client tested by
           github.com/coreos/etcd/client.test imports
           github.com/coreos/etcd/integration imports
           github.com/coreos/etcd/etcdserver imports
           github.com/coreos/etcd/mvcc/backend imports
           github.com/coreos/bbolt: github.com/coreos/bbolt@v1.3.5: parsing 
go.mod:
           module declares its path as: go.etcd.io/bbolt
                   but was required as: github.com/coreos/bbolt
   ```
   So, I add this replace line to my go.mod file:
   
   `replace github.com/coreos/bbolt => go.etcd.io/bbolt latest`
   
   which leads to this dead-end:
   
   ```
   $ go get -v -u all
   go: finding github.com/docker/libtrust latest
   go: finding golang.org/x/time latest
   go: finding github.com/Azure/go-ansiterm latest
   go: finding github.com/vishvananda/netns latest
   go: finding github.com/coreos/pkg latest
   go: finding github.com/go-check/check latest
   go: finding github.com/syndtr/gocapability latest
   go: finding github.com/samuel/go-zookeeper latest
   go: finding github.com/niemeyer/pretty latest
   go: finding github.com/tmc/grpc-websocket-proxy latest
   go: finding github.com/golang/groupcache latest
   go: finding github.com/xiang90/probing latest
   go: finding google.golang.org/grpc/examples latest
   go: go.etcd.io/bbolt@v1.3.5 used for two different module paths 
(github.com/coreos/bbolt and go.etcd.io/bbolt)
   ```
   
   I cannot figure out how to get beyond this issue with the two different 
module paths. 
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to