From 550e88954e617545f49920b752c154d72abf1d8d Mon Sep 17 00:00:00 2001 From: Walter Schulze Date: Thu, 7 Jan 2021 13:40:41 +0000 Subject: [PATCH] update to go version 1.15.6 and protoc 3.14.0 (#717) * update to go version 1.15.6 and protoc 3.14.0 * change go and protoc versions in travis and Readme * update github actions to go version 1.15.6 and protoc version 3.14.0 * updated badge link * updated badge link * updated badge link --- .github/workflows/ci-workflow.yml | 6 ++-- .travis.yml | 6 ++-- Readme.md | 6 ++-- go.mod | 5 ++- go.sum | 35 +++++++++++++++++++ proto/text_parser.go | 2 +- .../combos/unmarshaler/castvalue.pb.go | 4 ++- .../combos/unmarshaler/theproto3.pb.go | 4 ++- 8 files changed, 55 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index 83a674a2ad..8b98b0b23b 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -13,8 +13,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go_version: [1.12.x, 1.11.x] - protobuf_version: [3.9.1, 3.0.2, 2.6.1] + go_version: [1.15.x, 1.12.x] + protobuf_version: [3.14.0, 3.0.2, 2.6.1] fail-fast: false steps: - name: Checkout branch @@ -42,5 +42,5 @@ jobs: run: GOPATH=/home/runner/work/protobuf/gopath GOBIN=$GOPATH/bin PATH=$HOME/bin:$GOBIN:$PATH make buildserverall - name: Diff check - if: matrix.protobuf_version == '3.9.1' && matrix.go_version == '1.12.x' + if: matrix.protobuf_version == '3.14.0' && matrix.go_version == '1.15.x' run: (! git status --porcelain | read || (git status; git diff; exit 1)) \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index d157b3ffd6..2106f3aa5d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ apt: env: - PROTOBUF_VERSION=2.6.1 - PROTOBUF_VERSION=3.0.2 - - PROTOBUF_VERSION=3.9.1 + - PROTOBUF_VERSION=3.14.0 before_install: - HOME=/home/travis ./install-protobuf.sh @@ -13,10 +13,10 @@ before_install: script: - PATH=/home/travis/bin:$PATH make buildserverall - echo $TRAVIS_GO_VERSION - - if [[ "$PROTOBUF_VERSION" == "3.9.1" ]] && [[ "$TRAVIS_GO_VERSION" == "1.12.x" ]]; then ! git status --porcelain | read || (git status; git diff; exit 1); fi + - if [[ "$PROTOBUF_VERSION" == "3.14.0" ]] && [[ "$TRAVIS_GO_VERSION" == "1.15.x" ]]; then ! git status --porcelain | read || (git status; git diff; exit 1); fi language: go go: - - 1.11.x - 1.12.x + - 1.15.x diff --git a/Readme.md b/Readme.md index 554d9c54d9..e11dad70cf 100644 --- a/Readme.md +++ b/Readme.md @@ -2,7 +2,7 @@ # Protocol Buffers for Go with Gadgets -[![Build Status](https://travis-ci.org/gogo/protobuf.svg?branch=master)](https://travis-ci.org/gogo/protobuf) +[![Build Status](https://github.com/gogo/protobuf/workflows/Continuous%20Integration/badge.svg)](https://github.com/gogo/protobuf/actions) [![GoDoc](https://godoc.org/github.com/gogo/protobuf?status.svg)](http://godoc.org/github.com/gogo/protobuf) gogoprotobuf is a fork of golang/protobuf with extra code generation features. @@ -92,10 +92,10 @@ After that you can choose: ### Installation To install it, you must first have Go (at least version 1.6.3 or 1.9 if you are using gRPC) installed (see [http://golang.org/doc/install](http://golang.org/doc/install)). -Latest patch versions of 1.10 and 1.11 are continuously tested. +Latest patch versions of 1.12 and 1.15 are continuously tested. Next, install the standard protocol buffer implementation from [https://github.com/google/protobuf](https://github.com/google/protobuf). -Most versions from 2.3.1 should not give any problems, but 2.6.1, 3.0.2 and 3.6.1 are continuously tested. +Most versions from 2.3.1 should not give any problems, but 2.6.1, 3.0.2 and 3.14.0 are continuously tested. ### Speed diff --git a/go.mod b/go.mod index fa2c3a9670..001b419c95 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,9 @@ module github.com/gogo/protobuf +go 1.15 + require ( - github.com/kisielk/errcheck v1.2.0 // indirect + github.com/kisielk/errcheck v1.5.0 // indirect github.com/kisielk/gotool v1.0.0 // indirect + golang.org/x/tools v0.0.0-20210106214847-113979e3529a // indirect ) diff --git a/go.sum b/go.sum index d6cd179686..9cd8efe0dc 100644 --- a/go.sum +++ b/go.sum @@ -2,9 +2,44 @@ github.com/kisielk/errcheck v1.1.0 h1:ZqfnKyx9KGpRcW04j5nnPDgRgoXUeLh2YFBeFzphcA github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0 h1:reN85Pxc5larApoH1keMBiu2GWtPqXQ1nc9gx+jOU+E= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635 h1:2eB4G6bDQDeP69ZXbOKC00S2Kf6TIiRS+DzfKsKeQU0= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563 h1:NIou6eNFigscvKJmsbyez16S2cIS6idossORlFtSt2E= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f h1:tuwaIjfUa6eI6REiNueIxvNm1popyPUnqWga83S7U0o= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a h1:CB3a9Nez8M13wwlr/E2YtwoU+qYHKfC+JrDa45RXXoQ= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/proto/text_parser.go b/proto/text_parser.go index 1ce0be2fa9..f85c0cc81a 100644 --- a/proto/text_parser.go +++ b/proto/text_parser.go @@ -318,7 +318,7 @@ func unescape(s string) (ch string, tail string, err error) { if i > utf8.MaxRune { return "", "", fmt.Errorf(`\%c%s is not a valid Unicode code point`, r, ss) } - return string(i), s, nil + return string(rune(i)), s, nil } return "", "", fmt.Errorf(`unknown escape \%c`, r) } diff --git a/test/castvalue/combos/unmarshaler/castvalue.pb.go b/test/castvalue/combos/unmarshaler/castvalue.pb.go index 3cf29d6066..462bd6bfe0 100644 --- a/test/castvalue/combos/unmarshaler/castvalue.pb.go +++ b/test/castvalue/combos/unmarshaler/castvalue.pb.go @@ -99,7 +99,9 @@ func init() { proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") } -func init() { proto.RegisterFile("combos/unmarshaler/castvalue.proto", fileDescriptor_8a43cbd4586a8bcb) } +func init() { + proto.RegisterFile("combos/unmarshaler/castvalue.proto", fileDescriptor_8a43cbd4586a8bcb) +} var fileDescriptor_8a43cbd4586a8bcb = []byte{ // 359 bytes of a gzipped FileDescriptorProto diff --git a/test/theproto3/combos/unmarshaler/theproto3.pb.go b/test/theproto3/combos/unmarshaler/theproto3.pb.go index ad8deb358f..c27ff2c361 100644 --- a/test/theproto3/combos/unmarshaler/theproto3.pb.go +++ b/test/theproto3/combos/unmarshaler/theproto3.pb.go @@ -486,7 +486,9 @@ func init() { proto.RegisterType((*NotPacked)(nil), "theproto3.NotPacked") } -func init() { proto.RegisterFile("combos/unmarshaler/theproto3.proto", fileDescriptor_e24bba79c1e35a1f) } +func init() { + proto.RegisterFile("combos/unmarshaler/theproto3.proto", fileDescriptor_e24bba79c1e35a1f) +} var fileDescriptor_e24bba79c1e35a1f = []byte{ // 1612 bytes of a gzipped FileDescriptorProto