Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: replace Makefile target tools with simpler alternative #1126

Open
meling opened this issue Jul 16, 2024 · 0 comments
Open

chore: replace Makefile target tools with simpler alternative #1126

meling opened this issue Jul 16, 2024 · 0 comments

Comments

@meling
Copy link
Contributor

meling commented Jul 16, 2024

We should simplify installing the tools dependencies. The Makefile tools target and its sub-targets works, but it is a bit magic, requiring even people with general makefile knowledge to lookup the documentation to understand what's going on.

  • Move the tools.go file to internal/tools package.
  • Augment the tools.go file with lines like this: //go:generate go install google.golang.org/protobuf/cmd/protoc-gen-go

The Makefile would instead do this:

tools: internal/tools/*.go
	go generate --tags tools ./internal/tools

This is inspired by protopatch.

Or we could wait for golang/go issue #48429, which should obviate the need for a separate tools.go file and Makefile targets, since it would be supported by the go command itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant