Skip to content

Commit

Permalink
Test go mod in travis and use major versioning in import paths (ipfs#236
Browse files Browse the repository at this point in the history
)
  • Loading branch information
lanzafame authored and anacrolix committed Feb 12, 2019
1 parent 402f83e commit 7e68ac3
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 21 deletions.
21 changes: 16 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,25 @@ env:
go:
- 1.11.x

install:
- make deps

script:
- bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh)
install: true

jobs:
include:
- stage: "build and test"
name: "gx"
script:
- make deps
- bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh)

- name: "go mod"
script:
- export GO111MODULE=on
- make mod_deps
- bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh)

cache:
directories:
- $GOPATH/pkg/mod
- $GOPATH/src/gx

notifications:
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ deps: gx

publish:
gx-go rewrite --undo

mod_deps:
env GO111MODULE=on go mod download
6 changes: 3 additions & 3 deletions dht.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"sync"
"time"

opts "github.com/libp2p/go-libp2p-kad-dht/opts"
pb "github.com/libp2p/go-libp2p-kad-dht/pb"
providers "github.com/libp2p/go-libp2p-kad-dht/providers"
opts "github.com/libp2p/go-libp2p-kad-dht/v5/opts"
pb "github.com/libp2p/go-libp2p-kad-dht/v5/pb"
providers "github.com/libp2p/go-libp2p-kad-dht/v5/providers"

proto "github.com/gogo/protobuf/proto"
cid "github.com/ipfs/go-cid"
Expand Down
2 changes: 1 addition & 1 deletion dht_net.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

ggio "github.com/gogo/protobuf/io"
ctxio "github.com/jbenet/go-context/io"
pb "github.com/libp2p/go-libp2p-kad-dht/pb"
pb "github.com/libp2p/go-libp2p-kad-dht/v5/pb"
inet "github.com/libp2p/go-libp2p-net"
peer "github.com/libp2p/go-libp2p-peer"
)
Expand Down
4 changes: 2 additions & 2 deletions dht_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"testing"
"time"

opts "github.com/libp2p/go-libp2p-kad-dht/opts"
pb "github.com/libp2p/go-libp2p-kad-dht/pb"
opts "github.com/libp2p/go-libp2p-kad-dht/v5/opts"
pb "github.com/libp2p/go-libp2p-kad-dht/v5/pb"

cid "github.com/ipfs/go-cid"
u "github.com/ipfs/go-ipfs-util"
Expand Down
2 changes: 1 addition & 1 deletion ext_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

ggio "github.com/gogo/protobuf/io"
u "github.com/ipfs/go-ipfs-util"
pb "github.com/libp2p/go-libp2p-kad-dht/pb"
pb "github.com/libp2p/go-libp2p-kad-dht/v5/pb"
inet "github.com/libp2p/go-libp2p-net"
pstore "github.com/libp2p/go-libp2p-peerstore"
record "github.com/libp2p/go-libp2p-record"
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/libp2p/go-libp2p-kad-dht
module github.com/libp2p/go-libp2p-kad-dht/v5

require (
github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 // indirect
Expand All @@ -22,7 +22,7 @@ require (
github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8
github.com/kr/pretty v0.1.0 // indirect
github.com/libp2p/go-addr-util v2.0.7+incompatible // indirect
github.com/libp2p/go-buffer-pool v0.1.1 // indirect
github.com/libp2p/go-buffer-pool v0.1.3 // indirect
github.com/libp2p/go-conn-security v0.1.15 // indirect
github.com/libp2p/go-conn-security-multistream v0.1.15 // indirect
github.com/libp2p/go-flow-metrics v0.2.0 // indirect
Expand Down
5 changes: 2 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/libp2p/go-addr-util v2.0.7+incompatible h1:Su3MLsvDzl7afq0Z99sCjQxhrjOpf/dVBIWOBur9qlY=
github.com/libp2p/go-addr-util v2.0.7+incompatible/go.mod h1:doh2auL/Rkfq1xHxDrWJGHZ8yDojPerOZoPu9XVwRB8=
github.com/libp2p/go-buffer-pool v0.1.1 h1:G2HLfT76cZIb1x6jPJ3E14um5SzHn/fea4kMgNDPOuU=
github.com/libp2p/go-buffer-pool v0.1.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ=
github.com/libp2p/go-buffer-pool v0.1.3 h1:L0rKTSV7CdgVzxqP75+6AmJsjkvyM+xY8BCcoR9XLLw=
github.com/libp2p/go-buffer-pool v0.1.3/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ=
github.com/libp2p/go-conn-security v0.1.15 h1:Ohx7vYeje1Wal+eIBUkejcaQPhVjOAZveXoFmo5pArA=
github.com/libp2p/go-conn-security v0.1.15/go.mod h1:lIqm8x2wrAxlG+6CzJ3z4Nk5/F73zdjkS6RKbHSbaJ4=
github.com/libp2p/go-conn-security-multistream v0.1.15 h1:ZpIz9u+000dcUM4+S65rUfjSmwKNFFND+MFSLH0z6oc=
Expand Down Expand Up @@ -197,7 +197,6 @@ github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7 h1:
github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7/go.mod h1:X2c0RVCI1eSUFI8eLcY3c0423ykwiUdxLJtkDvruhjI=
github.com/whyrusleeping/yamux v1.1.2 h1:oGpjhLpa0mZnRMbthCkEe+61VvkQGFSkQgm9WvaHgRU=
github.com/whyrusleeping/yamux v1.1.2/go.mod h1:E8LnQQ8HKx5KD29HZFUwM1PxCOdPRzGwur1mcYhXcD8=
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44 h1:9lP3x0pW80sDI6t1UMSLA4to18W7R7imwAI/sWS9S8Q=
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9 h1:mKdxBk7AujPs8kU4m80U72y/zjbZ3UcXC7dClwKbUI0=
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
Expand Down
2 changes: 1 addition & 1 deletion handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
cid "github.com/ipfs/go-cid"
ds "github.com/ipfs/go-datastore"
u "github.com/ipfs/go-ipfs-util"
pb "github.com/libp2p/go-libp2p-kad-dht/pb"
pb "github.com/libp2p/go-libp2p-kad-dht/v5/pb"
inet "github.com/libp2p/go-libp2p-net"
peer "github.com/libp2p/go-libp2p-peer"
pstore "github.com/libp2p/go-libp2p-peerstore"
Expand Down
2 changes: 1 addition & 1 deletion lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

cid "github.com/ipfs/go-cid"
logging "github.com/ipfs/go-log"
pb "github.com/libp2p/go-libp2p-kad-dht/pb"
pb "github.com/libp2p/go-libp2p-kad-dht/v5/pb"
kb "github.com/libp2p/go-libp2p-kbucket"
peer "github.com/libp2p/go-libp2p-peer"
notif "github.com/libp2p/go-libp2p-routing/notifications"
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,3 @@
"releaseCmd": "git commit -a -m \"gx publish $VERSION\"",
"version": "4.4.22"
}

2 changes: 1 addition & 1 deletion routing.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
cid "github.com/ipfs/go-cid"
u "github.com/ipfs/go-ipfs-util"
logging "github.com/ipfs/go-log"
pb "github.com/libp2p/go-libp2p-kad-dht/pb"
pb "github.com/libp2p/go-libp2p-kad-dht/v5/pb"
kb "github.com/libp2p/go-libp2p-kbucket"
inet "github.com/libp2p/go-libp2p-net"
peer "github.com/libp2p/go-libp2p-peer"
Expand Down

0 comments on commit 7e68ac3

Please sign in to comment.