Skip to content

Conversation

@maru-ava
Copy link
Contributor

@maru-ava maru-ava commented Nov 6, 2025

Why this should be merged

During the transition to go tool as of 1.24, mockgen and canoto were not added our tools module (tools/go.mod) due to not wanting to risk version skew between our tools module and the main go module. But that just means we can use go tool against our main go.mod.

How this was tested

CI

Need to be documented in RELEASES.md?

N/A

@maru-ava maru-ava self-assigned this Nov 6, 2025
@maru-ava maru-ava added ci This focuses on changes to the CI process tooling labels Nov 6, 2025
@maru-ava maru-ava force-pushed the maru/go-tool-cleanup branch from 04fc0fb to 8c723ed Compare November 6, 2025 22:27
@maru-ava maru-ava marked this pull request as ready for review November 6, 2025 22:28
Copilot AI review requested due to automatic review settings November 6, 2025 22:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the codebase to use go tool for running mockgen and canoto instead of go run, leveraging Go 1.24's improved tool support. The changes eliminate the need for a separate tools.go file by declaring these tools directly in go.mod.

Key Changes:

  • Migrated mock generation commands from go run go.uber.org/mock/mockgen to go tool mockgen
  • Migrated canoto generation commands from go run github.com/StephenButtolph/canoto/canoto to go tool canoto
  • Added tool declarations to go.mod and removed the obsolete tools.go file

Reviewed Changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated no comments.

Show a summary per file
File Description
go.mod Added tool block declaring mockgen, canoto, and ginkgo; moved golang.org/x/mod to indirect dependencies
tools.go Removed obsolete tools import file
Taskfile.yml Updated generate task commands to use simplified tool names
Various *_generate_test.go files Updated go:generate directives to use go tool mockgen instead of go run
simplex/*.go and snow/engine/snowman/block/block_context_vm.go Updated go:generate directives to use go tool canoto instead of go run

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@maru-ava maru-ava moved this to Ready 🚦 in avalanchego Nov 6, 2025
@joshua-kim joshua-kim added this pull request to the merge queue Nov 10, 2025
Merged via the queue into master with commit 779dd20 Nov 10, 2025
35 checks passed
@joshua-kim joshua-kim deleted the maru/go-tool-cleanup branch November 10, 2025 19:01
@github-project-automation github-project-automation bot moved this from Ready 🚦 to Done 🎉 in avalanchego Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci This focuses on changes to the CI process

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants