quickfeed
quickfeed copied to clipboard
chore: replace Makefile target tools with simpler alternative
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.gofile tointernal/toolspackage. - Augment the
tools.gofile 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.