➜ ~ 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
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
How do you fix it?
How do you fix it? ??????????????
I'm wondering the same thing too actually -- What was the fix? If I figure it out myself I'll post here.
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.
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
Furthermore this is a dependency that go-micro itself uses and pulls in:
https://github.com/micro/go-micro/blob/a6668ae057348b769e2f656b2cf68474ccb507b4/go.mod#L48
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.
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 https://github.com/golang/go/issues/27899
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.
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 :)
I looked back at my shell history and I _believe_ I inadvertently did the wrong thing by running:
#!sh
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?
In fact doing exactly that _precisely_ causes this breakage:
```#!sh
$ 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
../../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
```
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?
try:
go build again
Most helpful comment
try:
3 delete go.sum
go build again