Skip to content

Libp2p Broke Travis #2695

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

Closed
terencechain opened this issue May 26, 2019 · 5 comments
Closed

Libp2p Broke Travis #2695

terencechain opened this issue May 26, 2019 · 5 comments

Comments

@terencechain
Copy link
Collaborator

Looks like some Libp2p's breaking changes came our way, a few stuff was merged before merging in core package

In Travis:

# github.com/libp2p/go-libp2p/p2p/host/basic
../../libp2p/go-libp2p/p2p/host/basic/basic_host.go:145:32: cannot use h (type *BasicHost) as type host.Host in argument to identify.NewIDService:
	*BasicHost does not implement host.Host (wrong type for Mux method)
		have Mux() *multistream.MultistreamMuxer
		want Mux() "github.com/libp2p/go-libp2p-core/protocol".Switch
../../libp2p/go-libp2p/p2p/host/basic/basic_host.go:172:32: cannot use h (type *BasicHost) as type host.Host in argument to ping.NewPingService:
	*BasicHost does not implement host.Host (wrong type for Mux method)
		have Mux() *multistream.MultistreamMuxer
		want Mux() "github.com/libp2p/go-libp2p-core/protocol".Switch
# github.com/libp2p/go-libp2p/p2p/host/routed
../../libp2p/go-libp2p/p2p/host/routed/routed.go:153:20: cannot use rh.host.Mux() (type "github.com/libp2p/go-libp2p-core/protocol".Switch) as type *multistream.MultistreamMuxer in return argument: need type assertion
../../libp2p/go-libp2p/p2p/host/routed/routed.go:190:5: cannot use (*RoutedHost)(nil) (type *RoutedHost) as type "github.com/libp2p/go-libp2p-core/host".Host in assignment:
	*RoutedHost does not implement "github.com/libp2p/go-libp2p-core/host".Host (wrong type for Mux method)
		have Mux() *multistream.MultistreamMuxer
		want Mux() "github.com/libp2p/go-libp2p-core/protocol".Switch
@prestonvanloon
Copy link
Member

It might be fixed according to this: libp2p/go-libp2p#649

@raulk
Copy link

raulk commented May 27, 2019

Hey, gomod can be a pain sometimes. Easy way to fix this is to manually remove all go-libp2p modules from your go.mod file, and do a go get ./... followed by a go mod tidy. That will ensure the build picks up the latest versions of everything.

@raulk
Copy link

raulk commented May 28, 2019

I noticed prysm doesn't use go modules. Any particular reason?

@prestonvanloon
Copy link
Member

We didn't have support for it originally with our build tooling, but it looks like we have support now: bazel-contrib/bazel-gazelle#292 We'll need to assess how this behaves with renovate.

We have two solutions here:

  • Move off of travis and go get (low priority, but happening incrementally for months now)
  • Add vgo support and try to keep go.mod in sync with the WORKSPACE dependencies

For now, we just ignore travis until the problem is resolved. We haven't had too much pain with this strategy so far.

@prestonvanloon
Copy link
Member

This is no longer breaking us. The current travis breakage is #2724

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants