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

Upgrade protobuf dependency to 1.36.1, remove retool #402

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tools via mod, update protoc-gen-go, support new protoc
Wanted to update protoc-gen-go to match the protobuf update. Couldn't get
retool to work properly, despite trying several older versions of Go. The
project is also archived, so tool the time to switch to simple, Go modules
based installs of the tools. This is done without actually changing this
library to need modules, support is only flagged in explicitly to install
those. This is used to install the version of protoc-gen-go that matches the
vendored copy, and the latest version of errcheck is installed.

The protoc check script is updated - the versioning scheme has changed, so we
now just check a minimum of protoc 3.

Generated pb files are re-generated.
lstoll committed Dec 24, 2024
commit baa8ef465ad2a480940de9438647f0ec1633d96e
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -34,8 +34,7 @@ Twirp uses github pull requests. Fork, hack away at your changes and submit. Mos

- Add tests that cover your contribution. Overall code coverage should not decrease.
- Twirp officially supports the last 3 releases of Go.
- Protobuf version 3.x.x to generate code with the protoc command.
- For linters and other tools, we use [retool](https://github.com/twitchtv/retool). If `make setup` is not able to install it, you can install it in your path with `go get github.com/twitchtv/retool` and then install tools with `retool build`.
- Protobuf version 3.x.x or later to generate code with the protoc command.

### Running tests

9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PATH := ${PWD}/_tools/bin:${PWD}/bin:${PATH}
PATH := ${PWD}/bin:${PATH}
export GO111MODULE=off

all: setup test_all
@@ -7,10 +7,11 @@ all: setup test_all

setup:
./check_protoc_version.sh
GOPATH="$$PWD/_tools" GOBIN="$$PWD/_tools/bin" go get github.com/twitchtv/retool
./_tools/bin/retool build

generate:
# Install dependent tools via modules
GO111MODULE=on GOBIN="$$PWD/bin" go install -v google.golang.org/protobuf/cmd/[email protected]
GO111MODULE=on GOBIN="$$PWD/bin" go install -v github.com/kisielk/[email protected]
# Recompile and install generator
GOBIN="$$PWD/bin" go install -v ./protoc-gen-twirp
# Generate code from go:generate comments
@@ -19,7 +20,7 @@ generate:
test_all: setup test test_clientcompat

test: generate
./_tools/bin/errcheck ./internal/twirptest
./bin/errcheck ./internal/twirptest
go test -race ./...

test_clientcompat: generate
3 changes: 0 additions & 3 deletions _tools/.gitignore

This file was deleted.

22 changes: 0 additions & 22 deletions _tools/src/github.com/kisielk/errcheck/LICENSE

This file was deleted.

122 changes: 0 additions & 122 deletions _tools/src/github.com/kisielk/errcheck/README.md

This file was deleted.

Loading