Skip to content

[release-23.0] build: move dev tools into per-tool Go modules (#20293)#20296

Merged
arthurschreiber merged 3 commits into
release-23.0from
backport-20293-to-release-23.0
Jun 11, 2026
Merged

[release-23.0] build: move dev tools into per-tool Go modules (#20293)#20296
arthurschreiber merged 3 commits into
release-23.0from
backport-20293-to-release-23.0

Conversation

@vitess-bot

@vitess-bot vitess-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Description

This is a backport of #20293

Copilot AI review requested due to automatic review settings June 11, 2026 12:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@vitess-bot

vitess-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Hello @arthurschreiber, there are conflicts in this backport.

Please address them in order to merge this Pull Request. You can execute the snippet below to reset your branch and resolve the conflict manually.

Make sure you replace origin by the name of the vitessio/vitess remote

git fetch --all
gh pr checkout 20296
git reset --hard origin/release-23.0
git cherry-pick -m 1 dc9b73d86da7113583a64f91b2d16ab2bd8b9780

@github-actions github-actions Bot added this to the v23.0.5 milestone Jun 11, 2026
@arthurschreiber arthurschreiber self-assigned this Jun 11, 2026
@arthurschreiber arthurschreiber removed Skip CI Skip CI actions from running Merge Conflict labels Jun 11, 2026
Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
@arthurschreiber

Copy link
Copy Markdown
Member

Resolved the cherry-pick conflicts in 23cad92. This branch diverges from main quite a bit, so the resolution adapts the upstream change to release-23.0's tooling — the guiding rule was: keep release-23.0's behavior, adopt module pinning only where this branch used floating versions.

Kept release-23.0's mechanics:

  • The vendored ./goyacc in sqlparser stays (go run ./goyacc -fo); dropped tools/goyacc/ and removed it from the dependabot config
  • gofmt/go fmt stays everywhere — this branch never adopted gofumpt; dropped tools/gofumpt/ likewise
  • No new Makefile lint/lint-fix targets (they don't exist on this branch)
  • No yamllint step (this branch has no github: paths-filter, it would be dead code)
  • build.env untouched (never had GOLANGCI_LINT_VER)

Adopted per-tool modules, re-pinned to this branch's versions with go 1.25.10:

  • tools/golangci-lint at v2.0.2 (the version the git hook pinned; regenerated the module graph from scratch since main's v2.12.2 dependency set doesn't compile at v2.0.2)
  • tools/goimports at x/tools v0.39.0 — an improvement for this branch, which installed goimports @latest in CI
  • tools/gotestsum at v1.13.0 (the version already used via the root tool directive)
  • codegen.GoImports keeps the gofmt -s -w step and now runs modfile-pinned goimports after it
  • One adaptation outside the conflict markers: the CI "Install golangci-lint" step now reads the version from tools/golangci-lint/go.mod instead of hardcoding @v2.0.2 — dependabot now bumps that module, so a hardcoded CI version would silently drift
  • go.mod tool block gets the three protoc plugins (the Makefile's proto rule now resolves them via go tool -n), with protoc-gen-go-grpc settling at v1.2.0 — the version the removed install_protoc-gen-go target pinned

Verified locally: go mod tidy clean in all modules, check_go_versions.sh, check_make_parser.sh, and check_make_sizegen.sh pass (sizegen output byte-identical through the new goimports path), golangci-lint v2.0.2 runs clean, full make build succeeds, and the pre-commit hook exercised the new modfile lint path during the resolution commit itself.

Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Copilot AI review requested due to automatic review settings June 11, 2026 13:32
@arthurschreiber arthurschreiber marked this pull request as ready for review June 11, 2026 13:33
@arthurschreiber arthurschreiber enabled auto-merge (squash) June 11, 2026 13:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 20 changed files in this pull request and generated 1 comment.

Comment on lines +24 to +37
changed_pkgs=$(git diff --cached --name-only --diff-filter=ACM -- '*.go' \
| xargs -n1 dirname \
| sort -u \
| while read -r dir; do
mod_dir=$dir
while [ "$mod_dir" != "." ] && [ ! -f "$mod_dir/go.mod" ]; do
mod_dir=$(dirname "$mod_dir")
done
if [ "$mod_dir" = "." ]; then
echo "$dir/..."
else
echo "skipping $dir (nested module $mod_dir)" >&2
fi
done)
@arthurschreiber arthurschreiber merged commit 1f6368d into release-23.0 Jun 11, 2026
290 of 297 checks passed
@arthurschreiber arthurschreiber deleted the backport-20293-to-release-23.0 branch June 11, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants