-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
consul registry broken: mismatch in type due to import being expected from "github.com/hashicorp/consul/vendor" #502
Comments
same here, got
|
go get -u? |
Using
Response:
Also tried - @asim - just out of curiosity, hashicorp/consul appears to be in the process of enabling go module support(see here). |
please, provide go env output |
Docker image: golang:1.12.5-alpine3.9
|
as i see you don't use go modules, so you have deps that conflict with each other. |
i don't understand why it work before.. |
I have the same issue with @desertjinn, using same docker image, it was work well yesterday, suddenly not working this morning. @vtolstov tried |
if you try to add go mod vendor step before build and use go build -mod vendor ? |
i think that hashicorp/consul dep changed in our module file.. |
if you don't have vendor dir, go with enabled modules download all deps when build package, if vendor exists - it gets it from here. |
@vtolstov - tried with
Note that no build steps are available in the file as this is used only to generate the base Docker image that will be used further as a package builder. |
my version is 1.12.5 same with 1.11.6 too It seems that this issue shows up when executing ../../../micro/go-micro/registry/consul/watcher.go:48:33: cannot use cr.Client (type *"github.com/hashicorp/consul/api".Client) as type *"github.com/hashicorp/consul/vendor/github.com/hashicorp/consul/api".Client in argument to wp.RunWithClientAndLogger |
We're not really responsible for consuls use of censoring and the mismatch in types. We're now using go modules to manage any dependencies and I can imagine hashicorp is doing this vendoring in related to their new sub package versioning. Our builds show that this builds perfectly fine with go modules. If you otherwise have a fix please feel free to PR. |
@asim |
I also saw this problem: github.com/micro/go-micro/registry/consul I ended up doing: |
Hashicorp have included a vendor directory as of yesterday which causes this break. Using go modules seems to be the only solution for now. We need to file an issue with them or find a way to resolve this vendoring issue. |
Switched to using go modules for managing packages and it works as expected now |
Closing the issue |
My Go version is 1.12.5.
I'm building my package binary using the golang1.12.5-alpine3.9 Docker image as a package builder and I'm running the following commands in my Dockerfile to install all the necessary dependencies -
the
go get
command works as expected but thego install
command crashes with an exit code: 2 and the following message -Just FYI, I was able to generate the Docker based package builder successfully up till 3 days ago.
The text was updated successfully, but these errors were encountered: