Skip to content

Commit

Permalink
Makefile: vendor target should always remove toolchain
Browse files Browse the repository at this point in the history
We never want the toolchain as the default is to use the same as the go
version. So the only purpose of toolchain is to force a newer compiler
than necessary which we do not want as we are getting build by many
different distributions and block builds that would otherwise work fine
is just not helpful to anyone.

Also update the go.mod comments remind people that there should be no
toolchain. The make vendor target with the toolchain will now guarantee
this so the CI will fail otherwise.

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 committed Nov 1, 2024
1 parent ef20e75 commit 0acd192
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ vendor:
$(GO) mod tidy
$(GO) mod vendor
$(GO) mod verify
$(GO) mod edit -toolchain none


# We define *-in-container targets for the following make targets. This allow the targets to be run in a container.
Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module github.com/containers/podman/v5

// Warning: Ensure the "go" and "toolchain" versions match exactly to prevent unwanted auto-updates
// Warning: if there is a "toolchain" directive anywhere in this file (and most of the
// time there shouldn't be), its version must be an exact match to the "go" directive.

go 1.22.6

Expand Down
1 change: 1 addition & 0 deletions test/tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ vendor:
$(GO) mod tidy
$(GO) mod vendor
$(GO) mod verify
$(GO) mod edit -toolchain none

.PHONY: clean
clean:
Expand Down
3 changes: 3 additions & 0 deletions test/tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
module github.com/containers/podman/test/tools

// Warning: if there is a "toolchain" directive anywhere in this file (and most of the
// time there shouldn't be), its version must be an exact match to the "go" directive.

go 1.22.0

require (
Expand Down

0 comments on commit 0acd192

Please sign in to comment.