Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

Consolidate abstractions and core types into go-libp2p-core #29

Merged
merged 12 commits into from
May 24, 2019

Conversation

raulk
Copy link
Member

@raulk raulk commented Apr 16, 2019

This PR is part of a batch across go-libp2p repos to consolidate abstractions, interfaces and core types into libp2p/go-libp2p-core. See branch consolidate-skeleton there.

Work is being performed in the consolidate-skeleton branch across repos.

In this PR, we:

  1. migrate core types out of this repo into go-libp2p-core.
  2. ensure backwards compatibility by aliasing all items that were publicly exported.
  3. introduce a gomod dependency to go-libp2p-core.

Merge strategy: squash and rebase.

@ghost ghost assigned raulk Apr 16, 2019
@ghost ghost added the in progress label Apr 16, 2019
deprecated.go Outdated
)

// Deprecated: use github.com/libp2p/go-libp2p-core/host.Host instead.
type Host = moved.Host
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have more types that need to be aliased -- all the interfaces I would say.

@raulk raulk merged commit fb741ff into master May 24, 2019
@raulk raulk deleted the consolidate-skeleton branch May 24, 2019 18:31
@prestonvanloon
Copy link

FYI, this seems to break builds when using go get.

../../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

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

Successfully merging this pull request may close these issues.

3 participants