Skip to content

Commit

Permalink
Merge pull request #18284 from thedtripp/check-tools-mod-in-verify-deps
Browse files Browse the repository at this point in the history
[3.5] make: Include tools/mod when checking dependency versions
  • Loading branch information
ahrtr authored Jul 9, 2024
2 parents 472de10 + 35a9140 commit 2b2473c
Show file tree
Hide file tree
Showing 3 changed files with 184 additions and 40 deletions.
7 changes: 7 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,14 @@ function dump_deps_of_module() {
# Checks whether dependencies are consistent across modules
function dep_pass {
local all_dependencies
local tools_mod_dependencies
all_dependencies=$(run_for_modules dump_deps_of_module | sort) || return 2
# tools/mod is a special case. It is a module that is not included in the
# module list from test_lib.sh. However, we need to ensure that the
# dependency versions match the rest of the project. Therefore, explicitly
# execute the command for tools/mod, and append its dependencies to the list.
tools_mod_dependencies=$(run_for_module "tools/mod" dump_deps_of_module "./...") || return 2
all_dependencies="${all_dependencies}"$'\n'"${tools_mod_dependencies}"

local duplicates
duplicates=$(echo "${all_dependencies}" | cut -d ',' -f 1,2 | sort | uniq | cut -d ',' -f 1 | sort | uniq -d) || return 2
Expand Down
19 changes: 10 additions & 9 deletions tools/mod/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ require (
github.com/coreos/license-bill-of-materials v0.0.0-20190913234955-13baff47494e
github.com/gogo/protobuf v1.3.2
github.com/gordonklaus/ineffassign v0.0.0-20200809085317-e36bfde3bb78
github.com/grpc-ecosystem/grpc-gateway v1.14.6
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/gyuho/gocovmerge v0.0.0-20171205171859-50c7e6afd535
github.com/hexfusion/schwag v0.0.0-20170606222847-b7d0fc9aadaa
github.com/mdempsky/unconvert v0.0.0-20200228143138-95ecdbfc0b5f
github.com/mgechev/revive v1.0.2
github.com/mikefarah/yq/v3 v3.0.0-20201125113350-f42728eef735
go.etcd.io/gofail v0.1.0
go.etcd.io/protodoc v0.0.0-20180829002748-484ab544e116
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc
honnef.co/go/tools v0.0.1-2019.2.3
mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7
)

Expand Down Expand Up @@ -46,15 +46,15 @@ require (
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/mailru/easyjson v0.7.1 // indirect
github.com/mattn/go-colorable v0.1.7 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/mattn/go-runewidth v0.0.7 // indirect
github.com/mattn/go-colorable v0.1.11 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.1.2 // indirect
github.com/olekukonko/tablewriter v0.0.4 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/spf13/cobra v1.0.0 // indirect
github.com/spf13/cobra v1.1.3 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/trustmaster/go-aspell v0.0.0-20200701131845-c2b1f55bec8f // indirect
go.mongodb.org/mongo-driver v1.3.0 // indirect
Expand All @@ -64,9 +64,10 @@ require (
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.6.0 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/genproto v0.0.0-20201008135153-289734e2e40c // indirect
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473 // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 2b2473c

Please sign in to comment.