Skip to content

Commit 53e1577

Browse files
authored
Merge pull request #5441 from thaJeztah/dont_loop_da_loop
go.mod: cut circular dependency on github.com/containerd/containerd
2 parents c1a3523 + e26fc84 commit 53e1577

6 files changed

Lines changed: 32 additions & 205 deletions

File tree

.empty-mod/go.mod

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// module empty-mod is an empty module that's used to help with containerd
2+
// having a circular dependency on itself through plugin modules.
3+
//
4+
// We use this module as a "replace" rule in containerd's go.mod, to prevent
5+
// relying on transitive dependencies (coming from older versions of containerd
6+
// defined on plugin go.mod).
7+
//
8+
// The replace rule forces go modules to consider the "current" version of
9+
// containerd to be the source of truth, helping us catch missing go.mod rules,
10+
// or version changes early.
11+
module empty-mod

go.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ require (
4646
github.com/pelletier/go-toml v1.8.1
4747
github.com/pkg/errors v0.9.1
4848
github.com/prometheus/client_golang v1.7.1
49+
github.com/prometheus/procfs v0.6.0 // indirect; temporarily force v0.6.0, which was previously defined in imgcrypt as explicit version
50+
github.com/satori/go.uuid v1.2.0 // indirect
4951
github.com/sirupsen/logrus v1.7.0
5052
github.com/stretchr/testify v1.6.1
5153
github.com/tchap/go-patricia v2.2.6+incompatible
@@ -68,6 +70,9 @@ require (
6870

6971
// When updating replace rules, make sure to also update the rules in integration/client/go.mod
7072
replace (
73+
// prevent transitional dependencies due to containerd having a circular
74+
// dependency on itself through plugins. see .empty-mod/go.mod for details
75+
github.com/containerd/containerd => ./.empty-mod/
7176
github.com/gogo/googleapis => github.com/gogo/googleapis v1.3.2
7277
github.com/golang/protobuf => github.com/golang/protobuf v1.3.5
7378
// urfave/cli must be <= v1.22.1 due to a regression: https://github.com/urfave/cli/issues/1092

0 commit comments

Comments
 (0)