From 89f364f7eda6073edad6d13d85ff059d377dbda9 Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 16 Sep 2025 00:46:18 +0800 Subject: [PATCH] go.mod: add tool section in module file (#32598) This removes the tools.go workaround in favor of the official tool management infrastructure, which was added in Go 1.24. --- build/tools/tools.go | 27 --------------------------- go.mod | 8 +++++++- 2 files changed, 7 insertions(+), 28 deletions(-) delete mode 100644 build/tools/tools.go diff --git a/build/tools/tools.go b/build/tools/tools.go deleted file mode 100644 index e9e2241d2f..0000000000 --- a/build/tools/tools.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2019 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -//go:build tools -// +build tools - -package tools - -import ( - // Tool imports for go:generate. - _ "github.com/fjl/gencodec" - _ "golang.org/x/tools/cmd/stringer" - _ "google.golang.org/protobuf/cmd/protoc-gen-go" -) diff --git a/go.mod b/go.mod index 058fe3bd8e..71bc6b5a1c 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,6 @@ require ( github.com/ethereum/go-verkle v0.2.2 github.com/fatih/color v1.16.0 github.com/ferranbt/fastssz v0.1.4 - github.com/fjl/gencodec v0.1.0 github.com/fsnotify/fsnotify v1.6.0 github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff github.com/gofrs/flock v0.12.1 @@ -103,6 +102,7 @@ require ( github.com/deepmap/oapi-codegen v1.6.0 // indirect github.com/dlclark/regexp2 v1.7.0 // indirect github.com/emicklei/dot v1.6.2 // indirect + github.com/fjl/gencodec v0.1.0 // indirect github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-ole/go-ole v1.3.0 // indirect @@ -146,3 +146,9 @@ require ( golang.org/x/net v0.38.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) + +tool ( + github.com/fjl/gencodec + golang.org/x/tools/cmd/stringer + google.golang.org/protobuf/cmd/protoc-gen-go +)