golang / protobuf

Go support for Google's protocol buffers
BSD 3-Clause "New" or "Revised" License
9.74k stars 1.58k forks source link

google.golang.org/protobuf module fails to build on Go 1.12 and below #1483

Closed dsnet closed 2 years ago

dsnet commented 2 years ago

The CI is failing with:

# google.golang.org/protobuf/encoding/protodelim_test [google.golang.org/protobuf/encoding/protodelim.test]
Error:         encoding/protodelim/protodelim_test.go:47:6: undefined: errors.Is
Error:         encoding/protodelim/protodelim_test.go:76:6: undefined: errors.As

See https://github.com/protocolbuffers/protobuf-go/runs/8110390834?check_suite_focus=true

Either we drop support for Go 1.12 and below or we remove use of errors.Is and errors.As.

dsnet commented 2 years ago

I should note that go-cmp has Go 1.13 as its minimally supported version. Since this module depends on cmp, it seems reasonable for protobuf to also have 1.13 as its minimally supported version.

puellanivis commented 2 years ago

Go 1.13 is also ~3 years old now? Entirely reasonable to advance to at least that.

stapelberg commented 2 years ago

I’ll take a look at bumping GitHub Actions to Go 1.13, which we can do until it breaks.

In general, I wouldn’t mind bumping to the latest Go major version and one version before that (Go 1.18 currently).

stapelberg commented 2 years ago

Verified the integration test now passes: https://github.com/protocolbuffers/protobuf-go/actions/runs/3045886157/jobs/4908003318