Test repo showing exclude behavior for the foobar
example from proposal #52296 ("limit version resolution to packages that are consumed").
-
v0.2.0 (details) corresponds to the end state of the concrete foobar example in the opening comment golang/go#52296 (comment).
-
v0.3.0 (details) corresponds to the suggestion from bcmills in golang/go#52296 (comment) to "apply exclude (not replace!) directives to notch out the dependencies that you know to be spurious". In this version:
- foobar excludes the undesirable versions of logrus in the foobar go.mod.
- clients of foobar still end up with the undesirable versions of logrus in their go.mod.
-
v0.4.0 (details) corresponds to a different package-level import graph. In this version:
- apparmor from containerd is still in the module-level graph, but not necessarily in the package-level import graph.
- foobar excludes the undesirable versions of logrus in the foobar go.mod.
- a new client that does not have apparmor in its package-level import graph avoids the undesirable versions of logrus.