When I made a exapmle follow the guides link: https://docs.libp2p.io/guides/getting-started/go/ . So I use go get go-libp2p@v0.28.1 by default, but it unable to complite the code, with error tips like:
# github.com/libp2p/go-libp2p/p2p/transport/quicreuse
..\..\vendor\github.com\libp2p\go-libp2p\p2p\transport\quicreuse\connmgr.go:16:28: undefined: quic.DialContext
..\..\vendor\github.com\libp2p\go-libp2p\p2p\transport\quicreuse\connmgr.go:50:11: quicConf.StatelessResetKey undefined (type *quic.Config has no field or method StatelessResetKey)
..\..\vendor\github.com\libp2p\go-libp2p\p2p\transport\quicreuse\connmgr.go:60:21: cannot use quiclogging.NewMultiplexedTracer(tracers...) (value of type logging.Tracer) as func(context.Context, "github.com/quic-go/quic-go/internal/protocol".Perspective, "github.com/quic-go/quic-go/internal/protocol".ConnectionID) logging.ConnectionTracer value in assignment
..\..\vendor\github.com\libp2p\go-libp2p\p2p\transport\quicreuse\listener.go:85:9: cannot use ln (variable of type *quic.Listener) as quic.Listener value in assignment
..\..\vendor\github.com\libp2p\go-libp2p\p2p\transport\quicreuse\tracer.go:29:14: undefined: qlog.NewTracer
And I search the issue #2347 then have to change thoese to older.
I just feel strange that the dependency installed by default using the go mod command cannot run the sample code, and obviously that #2347 has been resolved. In addition, it is also fixed using go mod tidy; go mod vendor, but it does not work.
I hope it can support direct installation of dependencies and code usage. If there are errors due to ignored information, please forgive m.
You probably ran go get -u, which updated quic-go to a higher version than is currently supported by go-libp2p. Please make sure that the quic-go version matches the one in go.mod of go-libp2p.
Version Information
When I made a exapmle follow the guides link: https://docs.libp2p.io/guides/getting-started/go/ . So I use
go get go-libp2p@v0.28.1
by default, but it unable to complite the code, with error tips like:And I search the issue #2347 then have to change thoese to older.
I just feel strange that the dependency installed by default using the go mod command cannot run the sample code, and obviously that #2347 has been resolved. In addition, it is also fixed using
go mod tidy; go mod vendor
, but it does not work.I hope it can support direct installation of dependencies and code usage. If there are errors due to ignored information, please forgive m.