Skip to content

go.mod: prune indirect gopkg.in/yaml.v3#250

Merged
AkihiroSuda merged 2 commits intocontainerd:mainfrom
thaJeztah:remove_transient_deps
Oct 26, 2024
Merged

go.mod: prune indirect gopkg.in/yaml.v3#250
AkihiroSuda merged 2 commits intocontainerd:mainfrom
thaJeztah:remove_transient_deps

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

gopkg.in/yaml.v3 is a transient dependency of testify;

go mod graph | grep ' gopkg.in/yaml.v3'
github.com/containerd/continuity gopkg.in/[email protected]
github.com/stretchr/[email protected] gopkg.in/[email protected]

Which is depended on through logrus;

go mod graph | grep ' github.com/stretchr/[email protected]'
github.com/sirupsen/[email protected] github.com/stretchr/[email protected]

The v3.0.0-20200313102051-9f266ea9e77c -> v3.0.1 bump may have been either a manual bump (to prevent an old version with CVEs), or possibly stuck after it was updated indirectly. Go mod doesn't remove such lines automatically but it doesn't add them back if you remove them manually, so let's remove it here.

gopkg.in/yaml.v3 is a transient dependency of testify;

    go mod graph | grep ' gopkg.in/yaml.v3'
    github.com/containerd/continuity gopkg.in/[email protected]
    github.com/stretchr/[email protected] gopkg.in/[email protected]

Which is depended on through logrus;

    go mod graph | grep ' github.com/stretchr/[email protected]'
    github.com/sirupsen/[email protected] github.com/stretchr/[email protected]

The `v3.0.0-20200313102051-9f266ea9e77c` -> `v3.0.1` bump may have been either
a manual bump (to prevent an old version with CVEs), or possibly stuck after
it was updated indirectly. Go mod doesn't remove such lines automatically but
it doesn't add them back if you remove them manually, so let's remove it here.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Copy Markdown
Member Author

Actually; looks like the cmd/ also prunes indirects? Let me check

Comment on lines -15 to -21
require (
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/sys v0.7.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... weird; it sometimes adds it, sometimes doesn't; let me try in a container

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah force-pushed the remove_transient_deps branch from 5b0e722 to 3eb1ef4 Compare October 26, 2024 08:45
@thaJeztah
Copy link
Copy Markdown
Member Author

Removing go.sum and having it re-generate it also produced some diff. go mod tidy isn't always that stable if there's prior state. Either way; should be good to go now @AkihiroSuda

@AkihiroSuda AkihiroSuda merged commit 45e78a9 into containerd:main Oct 26, 2024
@thaJeztah thaJeztah deleted the remove_transient_deps branch October 26, 2024 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants