Skip to content

Commit d18c05e

Browse files
authored
Merge pull request #132 from multiformats/feat/codependencies
dep: add "codependencies" for handling version conflicts
2 parents 26a85b9 + d4e3365 commit d18c05e

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed

go.mod

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ go 1.13
44

55
require (
66
github.com/ipfs/go-cid v0.0.7
7+
github.com/libp2p/go-maddr-filter v0.1.0
8+
github.com/multiformats/go-multiaddr-net v0.2.0
79
github.com/multiformats/go-multihash v0.0.14
810
github.com/multiformats/go-varint v0.0.6
911
)

go.sum

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
github.com/ipfs/go-cid v0.0.7 h1:ysQJVJA3fNDF1qigJbsSQOdjhVLsOEoPdh0+R97k3jY=
22
github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I=
3+
github.com/libp2p/go-maddr-filter v0.1.0 h1:4ACqZKw8AqiuJfwFGq1CYDFugfXTOos+qQ3DETkhtCE=
4+
github.com/libp2p/go-maddr-filter v0.1.0/go.mod h1:VzZhTXkMucEGGEOSKddrwGiOv0tUhgnKqNEmIAz/bPU=
35
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g=
46
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ=
57
github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771 h1:MHkK1uRtFbVqvAgvWxafZe54+5uBxLluGylDiKgdhwo=
@@ -11,6 +13,10 @@ github.com/multiformats/go-base32 v0.0.3 h1:tw5+NhuwaOjJCC5Pp82QuXbrmLzWg7uxlMFp
1113
github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA=
1214
github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4=
1315
github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM=
16+
github.com/multiformats/go-multiaddr v0.2.2/go.mod h1:NtfXiOtHvghW9KojvtySjH5y0u0xW5UouOmQQrn6a3Y=
17+
github.com/multiformats/go-multiaddr v0.3.0/go.mod h1:dF9kph9wfJ+3VLAaeBqo9Of8x4fJxp6ggJGteB8HQTI=
18+
github.com/multiformats/go-multiaddr-net v0.2.0 h1:MSXRGN0mFymt6B1yo/6BPnIRpLPEnKgQNvVfCX5VDJk=
19+
github.com/multiformats/go-multiaddr-net v0.2.0/go.mod h1:gGdH3UXny6U3cKKYCvpXI5rnK7YaOIEOPVDI9tsJbEA=
1420
github.com/multiformats/go-multibase v0.0.3 h1:l/B6bJDQjvQ5G52jw4QGSYeOTZoAwIO77RblWplfIqk=
1521
github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc=
1622
github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc=

internal/codependencies/README.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
This package allows us to depend on other modules, to _force_ these other
2+
modules to upgrade to some minimum version. This allows us to express "co
3+
dependency" requirements in cases where this module doesn't strictly speaking
4+
_depend_ on another module, but conflicts with some version of that module.
5+
We are using this here to depend on deprecated modules that have been
6+
merged into this package.
7+
8+
In practice, this means:
9+
10+
1. Packages imported here _will not_ end up in the final binary as nothing
11+
imports this package.
12+
2. Modules containing these packages will, unfortunately, be downloaded as
13+
"dependencies" of this package.
14+
3. Anyone using this module will be forced to upgrade all co-dependencies.
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package codependencies
2+
3+
import (
4+
// Packages imported into this package.
5+
6+
// go-multiaddr-net < 0.2.0 conflict with this package.
7+
_ "github.com/multiformats/go-multiaddr-net"
8+
// go-maddr-filter < 0.1.0 conflicts with this package.
9+
_ "github.com/libp2p/go-maddr-filter"
10+
)

0 commit comments

Comments
 (0)