mirror of
https://github.com/tendermint/tendermint.git
synced 2025-12-23 22:35:27 +00:00
* libs/pubsub/query: specify peg version in go.mod The code to generate the pubsub queries was dependent on an unspecified version of the peg tool. This brings peg into go.mod so it is on a fixed version. This should also enable dependabot to notify us of future updates to peg. The version of query.peg.go generated from the current version of peg correctly contains the special "Code generated by..." line to indicate to other tools that the file is automatically generated and should therefore be excluded from linters, etc. I removed the make target as there were no git grep results referencing "gen_query_parser"; directly running "go generate" is a reasonable expectation in Go projects. Now that "go run" is module aware, I would typically use "go run" inside the go:generate directive, but in this case we go build to a gitignore-d directory in order to work around the nondeterministic output detailed in pointlander/peg#129. * libs/pubsub/query: check error from (*QueryParser).Init() The newly generated peg code returns an error from Init(); the previous version was niladic. Co-authored-by: Sam Kleinman <garen@tychoish.com>
15 lines
386 B
Go
15 lines
386 B
Go
//go:build tools
|
|
|
|
// This file uses the recommended method for tracking developer tools in a go module.
|
|
//
|
|
// https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
|
|
|
|
package tools
|
|
|
|
import (
|
|
_ "github.com/bufbuild/buf/cmd/buf"
|
|
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
|
_ "github.com/pointlander/peg"
|
|
_ "github.com/vektra/mockery/v2"
|
|
)
|