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

proto: tests fail to build on Go 1.15 due to new vet check #1209

Closed
saser opened this issue Sep 24, 2020 · 0 comments · Fixed by #1210
Closed

proto: tests fail to build on Go 1.15 due to new vet check #1209

saser opened this issue Sep 24, 2020 · 0 comments · Fixed by #1210

Comments

@saser
Copy link
Contributor

saser commented Sep 24, 2020

What version of protobuf and what language are you using?
Version: v1.4.2.

$ go version
go version go1.15.2 linux/amd64

What did you do?
Go 1.15 contains a new vet check that warns for conversion of the form string(x) where x is an integer type that is not rune or byte. I initially noticed the build failure when I ran go test all in a project that uses Go 1.15 and depends on this module.

To reproduce:

$ cd $(mktemp -d)

$ go mod init test
go: creating new go.mod: module test

$ go get github.com/golang/[email protected]
go: downloading github.com/golang/protobuf v1.4.2

$ go test github.com/golang/protobuf/proto
go: downloading google.golang.org/protobuf v1.23.0
go: downloading github.com/google/go-cmp v0.4.0
# github.com/golang/protobuf/proto
[redacted $GOPATH]/pkg/mod/github.com/golang/[email protected]/proto/text_decode.go:768:10: conversion from uint64 to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)
FAIL    github.com/golang/protobuf/proto [build failed]
FAIL

What did you expect to see?
Passing tests.

What did you see instead?
A build failure (see details above).

Anything else we should know about your project / environment?
N/A

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

Successfully merging a pull request may close this issue.

1 participant