Browse Source

dep: import go-smux-* into the libp2p org

0. I imported whyrusleeping/go-smux-* into go mod.
1. To handle post-1.0 tags, I renamed all of our "gx" tags to "gx/v..." as we
   did with the rest of libp2p.
2. This broke _everything_ because `go mod` absolutely can't deal with deleted
   tags if any transitive go.sum file mentions the tag.
3. To fix this, I first got rid of all mentions of these 2.x+incompatible tags.
4. Unfortunately, I realized this was still going to be a nightmare for
   downstream users as a `go get github.com/libp2p/go-libp2p@latest` on a fresh
   clone (no go mod cache) would fail. I didn't want to have to explain to all
   of our downstream users "please delete your go.sum files!".
5. So I did what I should have done in the first place:
  a. I restored those tags.
  b. I forked all the whyrusleeping/go-smux-* repositories (and
     whyrusleeping/yamux) into the libp2p org where.
  c. I removed all tags but the _new_ go-mod tags on those new libp2p repos.

What does this mean for downstream users? If they manually import any of these
stream muxer repos, they'll have to fix their imports. Otherwise, it shouldn't
make a difference.
dep/import-smux
Steven Allen 6 years ago
parent
commit
26f880b899
  1. 2
      config/muxer.go
  2. 2
      config/muxer_test.go
  3. 4
      defaults.go
  4. 14
      go.mod
  5. 16
      go.sum

2
config/muxer.go

@ -5,7 +5,7 @@ import (
host "github.com/libp2p/go-libp2p-host"
mux "github.com/libp2p/go-stream-muxer"
msmux "github.com/whyrusleeping/go-smux-multistream"
msmux "github.com/libp2p/go-stream-muxer-multistream"
)
// MuxC is a stream multiplex transport constructor

2
config/muxer_test.go

@ -7,9 +7,9 @@ import (
host "github.com/libp2p/go-libp2p-host"
peer "github.com/libp2p/go-libp2p-peer"
swarmt "github.com/libp2p/go-libp2p-swarm/testing"
yamux "github.com/libp2p/go-libp2p-yamux"
bhost "github.com/libp2p/go-libp2p/p2p/host/basic"
mux "github.com/libp2p/go-stream-muxer"
yamux "github.com/whyrusleeping/go-smux-yamux"
)
func TestMuxerSimple(t *testing.T) {

4
defaults.go

@ -6,13 +6,13 @@ import (
"crypto/rand"
crypto "github.com/libp2p/go-libp2p-crypto"
mplex "github.com/libp2p/go-libp2p-mplex"
pstoremem "github.com/libp2p/go-libp2p-peerstore/pstoremem"
secio "github.com/libp2p/go-libp2p-secio"
yamux "github.com/libp2p/go-libp2p-yamux"
tcp "github.com/libp2p/go-tcp-transport"
ws "github.com/libp2p/go-ws-transport"
multiaddr "github.com/multiformats/go-multiaddr"
mplex "github.com/whyrusleeping/go-smux-multiplex"
yamux "github.com/whyrusleeping/go-smux-yamux"
)
// DefaultSecurity is the default security option.

14
go.mod

@ -20,6 +20,7 @@ require (
github.com/libp2p/go-libp2p-interface-pnet v0.0.1
github.com/libp2p/go-libp2p-loggables v0.0.1
github.com/libp2p/go-libp2p-metrics v0.0.1
github.com/libp2p/go-libp2p-mplex v0.1.1
github.com/libp2p/go-libp2p-nat v0.0.4
github.com/libp2p/go-libp2p-net v0.0.2
github.com/libp2p/go-libp2p-netutil v0.0.1
@ -28,12 +29,14 @@ require (
github.com/libp2p/go-libp2p-protocol v0.0.1
github.com/libp2p/go-libp2p-routing v0.0.1
github.com/libp2p/go-libp2p-secio v0.0.3
github.com/libp2p/go-libp2p-swarm v0.0.5
github.com/libp2p/go-libp2p-transport v0.0.4
github.com/libp2p/go-libp2p-transport-upgrader v0.0.3
github.com/libp2p/go-libp2p-swarm v0.0.6
github.com/libp2p/go-libp2p-transport v0.0.5
github.com/libp2p/go-libp2p-transport-upgrader v0.0.4
github.com/libp2p/go-libp2p-yamux v0.1.2
github.com/libp2p/go-maddr-filter v0.0.4
github.com/libp2p/go-stream-muxer v0.0.1
github.com/libp2p/go-tcp-transport v0.0.3
github.com/libp2p/go-stream-muxer-multistream v0.1.1
github.com/libp2p/go-tcp-transport v0.0.4
github.com/libp2p/go-testutil v0.0.1
github.com/libp2p/go-ws-transport v0.0.3
github.com/miekg/dns v1.1.12 // indirect
@ -41,8 +44,5 @@ require (
github.com/multiformats/go-multiaddr-dns v0.0.2
github.com/multiformats/go-multiaddr-net v0.0.1
github.com/multiformats/go-multistream v0.0.4
github.com/whyrusleeping/go-smux-multiplex v0.1.0
github.com/whyrusleeping/go-smux-multistream v0.1.0
github.com/whyrusleeping/go-smux-yamux v0.1.1
github.com/whyrusleeping/mdns v0.0.0-20180901202407-ef14215e6b30
)

16
go.sum

@ -112,6 +112,8 @@ github.com/libp2p/go-libp2p-loggables v0.0.1 h1:HVww9oAnINIxbt69LJNkxD8lnbfgteXR
github.com/libp2p/go-libp2p-loggables v0.0.1/go.mod h1:lDipDlBNYbpyqyPX/KcoO+eq0sJYEVR2JgOexcivchg=
github.com/libp2p/go-libp2p-metrics v0.0.1 h1:yumdPC/P2VzINdmcKZd0pciSUCpou+s0lwYCjBbzQZU=
github.com/libp2p/go-libp2p-metrics v0.0.1/go.mod h1:jQJ95SXXA/K1VZi13h52WZMa9ja78zjyy5rspMsC/08=
github.com/libp2p/go-libp2p-mplex v0.1.1 h1:lSPS1VJ36P01gGO//KgcsmSah5uoC3X9r7WY5j+iP4c=
github.com/libp2p/go-libp2p-mplex v0.1.1/go.mod h1:KUQWpGkCzfV7UIpi8SKsAVxyBgz1c9R5EvxgnwLsb/I=
github.com/libp2p/go-libp2p-nat v0.0.4 h1:+KXK324yaY701On8a0aGjTnw8467kW3ExKcqW2wwmyw=
github.com/libp2p/go-libp2p-nat v0.0.4/go.mod h1:N9Js/zVtAXqaeT99cXgTV9e75KpnWCvVOiGzlcHmBbY=
github.com/libp2p/go-libp2p-net v0.0.1/go.mod h1:Yt3zgmlsHOgUWSXmt5V/Jpz9upuJBE8EgNU9DrCcR8c=
@ -133,11 +135,19 @@ github.com/libp2p/go-libp2p-secio v0.0.3 h1:h3fPeDrej7bvvARnC2oSjAfcLZOaS4REZKgW
github.com/libp2p/go-libp2p-secio v0.0.3/go.mod h1:hS7HQ00MgLhRO/Wyu1bTX6ctJKhVpm+j2/S2A5UqYb0=
github.com/libp2p/go-libp2p-swarm v0.0.5 h1:oue1c+NbyFTuwCkWulX+ouyQoaZsdYeYcAzQ/slfxXY=
github.com/libp2p/go-libp2p-swarm v0.0.5/go.mod h1:+nkJir4feiXtWQjb/4CQHMEK8Vw+c5nVVxT8R5bs0yY=
github.com/libp2p/go-libp2p-swarm v0.0.6 h1:gE0P/v2h+KEXtAi9YTw2UBOSODJ4m9VuuJ+ktc2LVUo=
github.com/libp2p/go-libp2p-swarm v0.0.6/go.mod h1:s5GZvzg9xXe8sbeESuFpjt8CJPTCa8mhEusweJqyFy8=
github.com/libp2p/go-libp2p-transport v0.0.1/go.mod h1:UzbUs9X+PHOSw7S3ZmeOxfnwaQY5vGDzZmKPod3N3tk=
github.com/libp2p/go-libp2p-transport v0.0.4 h1:/CPHQMN75/IQwkhBxxIo6p6PtL3rwFZtlzBROT3e8mw=
github.com/libp2p/go-libp2p-transport v0.0.4/go.mod h1:StoY3sx6IqsP6XKoabsPnHCwqKXWUMWU7Rfcsubee/A=
github.com/libp2p/go-libp2p-transport v0.0.5 h1:pV6+UlRxyDpASSGD+60vMvdifSCby6JkJDfi+yUMHac=
github.com/libp2p/go-libp2p-transport v0.0.5/go.mod h1:StoY3sx6IqsP6XKoabsPnHCwqKXWUMWU7Rfcsubee/A=
github.com/libp2p/go-libp2p-transport-upgrader v0.0.3 h1:ZcXhGEMnv8f+ycqVl/9mnIe6uhUYy0aj/vEYQUoG7xU=
github.com/libp2p/go-libp2p-transport-upgrader v0.0.3/go.mod h1:Ng1HzfMIopyYscMHNFmJqiMMcpgDlj0t+NyjVWW89ws=
github.com/libp2p/go-libp2p-transport-upgrader v0.0.4 h1:uGMOd14BL1oFlfb/cGfOxPjiTKBhzWV4aMjjoCF1Z1o=
github.com/libp2p/go-libp2p-transport-upgrader v0.0.4/go.mod h1:RGq+tupk+oj7PzL2kn/m1w6YXxcIAYJYeI90h6BGgUc=
github.com/libp2p/go-libp2p-yamux v0.1.2 h1:DgGItlrWi0j9y1OhRMC8qqL4zj2MEPWeKJTHb55R16Q=
github.com/libp2p/go-libp2p-yamux v0.1.2/go.mod h1:xUoV/RmYkg6BW/qGxA9XJyg+HzXFYkeXbnhjmnYzKp8=
github.com/libp2p/go-maddr-filter v0.0.1/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q=
github.com/libp2p/go-maddr-filter v0.0.4 h1:hx8HIuuwk34KePddrp2mM5ivgPkZ09JH4AvsALRbFUs=
github.com/libp2p/go-maddr-filter v0.0.4/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q=
@ -153,12 +163,18 @@ github.com/libp2p/go-reuseport-transport v0.0.2 h1:WglMwyXyBu61CMkjCCtnmqNqnjib0
github.com/libp2p/go-reuseport-transport v0.0.2/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs=
github.com/libp2p/go-stream-muxer v0.0.1 h1:Ce6e2Pyu+b5MC1k3eeFtAax0pW4gc6MosYSLV05UeLw=
github.com/libp2p/go-stream-muxer v0.0.1/go.mod h1:bAo8x7YkSpadMTbtTaxGVHWUQsR/l5MEaHbKaliuT14=
github.com/libp2p/go-stream-muxer-multistream v0.1.1 h1:DhHqb4nu1fQv/vQKeLAaZGmhLsUA4SF77IdYJiWE1d4=
github.com/libp2p/go-stream-muxer-multistream v0.1.1/go.mod h1:zmGdfkQ1AzOECIAcccoL8L//laqawOsO03zX8Sa+eGw=
github.com/libp2p/go-tcp-transport v0.0.3 h1:ZDMczeg+6uvvlxnShYFY0wGjQqStFhWAYT7769utxuM=
github.com/libp2p/go-tcp-transport v0.0.3/go.mod h1:f11C2zvCaGDkE8aFPUKmuYZwd3pP6HI24LeLMWhJnkQ=
github.com/libp2p/go-tcp-transport v0.0.4 h1:2iRu994wCT/iEz62F+c60FUoSkijNEQ0q2Itc+79XlQ=
github.com/libp2p/go-tcp-transport v0.0.4/go.mod h1:+E8HvC8ezEVOxIo3V5vCK9l1y/19K427vCzQ+xHKH/o=
github.com/libp2p/go-testutil v0.0.1 h1:Xg+O0G2HIMfHqBOBDcMS1iSZJ3GEcId4qOxCQvsGZHk=
github.com/libp2p/go-testutil v0.0.1/go.mod h1:iAcJc/DKJQanJ5ws2V+u5ywdL2n12X1WbbEG+Jjy69I=
github.com/libp2p/go-ws-transport v0.0.3 h1:29hkvsmdOhniNuJ5AzFICfY5SA5nvDO9Xi3FtcGqO+4=
github.com/libp2p/go-ws-transport v0.0.3/go.mod h1:iU0kzfMcO4tBVIk3z+7srp1YG/RFLWTSuO4enpivw8g=
github.com/libp2p/go-yamux v1.2.1 h1:VumHkMhJ2iFk1lzAeoDRgekiZSylGc6NnAEihVdBCiw=
github.com/libp2p/go-yamux v1.2.1/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow=
github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg=
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
github.com/mattn/go-isatty v0.0.5 h1:tHXDdz1cpzGaovsTB+TVB8q90WEokoVmfMqoVcrLUgw=

Loading…
Cancel
Save