Skip to content
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

[bug]go get -u github.com/micro/go-micro errors (maybe not update frequency) #747

Closed
DuckulaGL opened this issue Sep 10, 2019 · 15 comments
Closed
Labels
go.mod Issues related to go modules question

Comments

@DuckulaGL
Copy link

DuckulaGL commented Sep 10, 2019

~ go get -u github.com/micro/go-micro
# cd /home/glenlau/GoWork/src/github.com/marten-seemann/qtls; git pull --ff-only
fatal: refusing to merge unrelated histories
package github.com/marten-seemann/qtls: exit status 128
@DuckulaGL
Copy link
Author

DuckulaGL commented Sep 10, 2019

export export GO111MODULE=on                                 
go get -u github.com/micro/go-micro

error is till there

# github.com/lucas-clemente/quic-go/internal/handshake
GoWork/pkg/mod/github.com/lucas-clemente/[email protected]/internal/handshake/crypto_setup.go:501:72: undefined: qtls.CipherSuite
GoWork/pkg/mod/github.com/lucas-clemente/[email protected]/internal/handshake/crypto_setup.go:523:73: undefined: qtls.CipherSuite

@milosgajdos milosgajdos added go.mod Issues related to go modules question labels Sep 10, 2019
@TLang622
Copy link

How do you fix it?

@SWBMESSI
Copy link

How do you fix it? ??????????????

@prologic
Copy link

I'm wondering the same thing too actually -- What was the fix? If I figure it out myself I'll post here.

@asim
Copy link
Member

asim commented Sep 13, 2019

Please stop commenting on a closed bug. If the issue persists either reopen or file a new issue. This error is related to the dependencies of quic-go. Please either use go modules or ensure you are using the latest version of Go and the dependencies.

@prologic
Copy link

Please stop commenting on a closed bug. If the issue persists either reopen or file a new issue.

Dude; That comes off as a little rude. I can't re-open this bug; only you can.

This error is related to the dependencies of quic-go. Please either use go modules or ensure you are using the latest version of Go and the dependencies.

This error still persists despite using Go modules and the latest version of go-micro v1.10.0

@prologic
Copy link

Furthermore this is a dependency that go-micro itself uses and pulls in:

github.com/lucas-clemente/quic-go v0.12.0

@asim
Copy link
Member

asim commented Sep 13, 2019

go get -u updates those dependencies. It does not make use of the dependencies we have pinned in the go.mod file.

My comment is in reference to the three people who have commented since the issue was closed and to inform anyone else to open a new issue if it persists.

@prologic
Copy link

I'm fine to open a new issue (sorry sometimes text communication is hard to interpret) but ym main problem with this issue being closed is it was closed without any actionable resolution. I'll keep trying to figure out why this is so badly broken for me -- The only other thing I'm aware of at play here that can/does wreak havoc on dependencies is golang/go#27899

@DuckulaGL
Copy link
Author

This problem is not one of the go-micro projects. Every go-lang project would have the same problem. You can still use "go get -u" command to update this project too, and use export GO111MODULE=on. Like these problems happened some times before, but, recently, they didn`t happen again. So I didn't think about this aspect carefully. When I looked at it in error detail, I recalled it.

If you come across this problem again,
You can try to delete(remove) the 3rd party dependency package. The go-lang tool(essential is git tool) will download it again. For example, I removed the "qtls" package.

This git`s problems.

Hope this will help you.

@DuckulaGL DuckulaGL reopened this Sep 13, 2019
@prologic
Copy link

I solved this by redoing what I was originally doing. Which was replacing the deprecated github.com/micro/go-micro/grpc imports with the new githubcom/micro/go-micro/service/grpc

I believe the problem I was experiencing in particular was exacerbated by my running go get -u ... on some other dependencies to fix other problems such as the ambiguous imports of consul.

I have to have this in my go.mod:

// XXX: https://github.com/hashicorp/consul/issues/6019
// XXX: https://github.com/golang/go/issues/27899
replace github.com/hashicorp/consul => github.com/hashicorp/consul/api v1.2.0

Actually this is all quite a bit confusing :)

@prologic
Copy link

I looked back at my shell history and I believe I inadvertently did the wrong thing by running:

go get -u github.com/micro/go-micro/service/grpc

Which isn't even a sub-package that's go-getable anyway and go get -u probably goes and ruins already pinned/vendoered deps?

@prologic
Copy link

In fact doing exactly that precisely causes this breakage:

$ GOPROXY="" go get -u github.com/micro/go-micro/service/grpc
go: finding github.com/mitchellh/go-homedir v1.1.0
go: finding golang.org/x/net latest
go: finding github.com/sean-/seed latest
go: finding golang.org/x/crypto latest
go: finding golang.org/x/sys latest
go: finding github.com/modern-go/concurrent latest
go: finding github.com/miekg/dns v1.1.17
go: finding google.golang.org/grpc v1.23.1
go: finding github.com/hashicorp/memberlist v0.1.5
go: finding google.golang.org/genproto latest
go: finding github.com/marten-seemann/qtls v0.4.0
go: finding github.com/armon/go-metrics latest
# github.com/lucas-clemente/quic-go/internal/handshake
../../go/pkg/mod/github.com/lucas-clemente/[email protected]/internal/handshake/crypto_setup.go:501:72: undefined: qtls.CipherSuite
../../go/pkg/mod/github.com/lucas-clemente/[email protected]/internal/handshake/crypto_setup.go:523:73: undefined: qtls.CipherSuite

@prologic
Copy link

I think we can Close this now! Don't run go get -u unless you mean to? Someone probably needs to fix some upstream/downstream deps -- Maybe master of qtls is broken?

@chenset
Copy link

chenset commented Sep 14, 2019

try:

  1. update GO
  2. reset go.mod
    3 delete go.sum

go build again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go.mod Issues related to go modules question
Projects
None yet
Development

No branches or pull requests

7 participants