Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

types error when build mdns #67

Closed
JackBekket opened this issue Jun 24, 2019 · 4 comments
Closed

types error when build mdns #67

JackBekket opened this issue Jun 24, 2019 · 4 comments

Comments

@JackBekket
Copy link

cannot use peerhost (type "github.com/libp2p/go-libp2p-core/host".Host) as type "github.com/libp2p/go-libp2p-host".Host in argument to discovery.NewMdnsService:
	"github.com/libp2p/go-libp2p-core/host".Host does not implement "github.com/libp2p/go-libp2p-host".Host (wrong type for ConnManager method)
		have ConnManager() connmgr.ConnManager
		want ConnManager() ifconnmgr.ConnManager
@JackBekket
Copy link
Author

when I try go get -v -d ./...
and then go build
it's says

# github.com/libp2p/go-libp2p/p2p/host/routed
../../github.com/libp2p/go-libp2p/p2p/host/routed/routed.go:190:5: cannot use (*RoutedHost)(nil) (type *RoutedHost) as type host.Host in assignment:
	*RoutedHost does not implement host.Host (missing EventBus method)
# github.com/libp2p/go-libp2p/p2p/host/basic
../../github.com/libp2p/go-libp2p/p2p/host/basic/basic_host.go:83:5: cannot use (*BasicHost)(nil) (type *BasicHost) as type host.Host in assignment:
	*BasicHost does not implement host.Host (missing EventBus method)
../../github.com/libp2p/go-libp2p/p2p/host/basic/basic_host.go:148:64: cannot use h (type *BasicHost) as type host.Host in argument to identify.NewIDService:
	*BasicHost does not implement host.Host (missing EventBus method)
../../github.com/libp2p/go-libp2p/p2p/host/basic/basic_host.go:175:32: cannot use h (type *BasicHost) as type host.Host in argument to ping.NewPingService:
	*BasicHost does not implement host.Host (missing EventBus method)

@JackBekket
Copy link
Author

@Kubuxu
Copy link
Member

Kubuxu commented Jun 24, 2019

Hi, downgrade to go-libp2p-core@v0.0.3 by adding:

replace github.com/libp2p/go-libp2p-core => github.com/libp2p/go-libp2p-core@v0.0.3

To your main gomod file.

@JackBekket
Copy link
Author

thanks!

Also I've noticed, that new modules worked with 1.12 go version, I has 1.11

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

No branches or pull requests

2 participants