在使用golang/protobuf时,在数据存储中出现了构建错误。

huangapple go评论74阅读模式
英文:

Build errors in datastore while using golang/protobuf

问题

我有一个应用程序,使用了bigquery和cloud datastore的API。我使用glide进行Go包管理。根据我使用的golang/protobuf版本,我一直看到bigquery或datastore的构建错误。我无法找到与bigquery和datastore兼容的版本。其中一个包始终无法构建。

在使用golang/protobuf版本7cc19b78d562895b13596ddce7aafb59dd789318时,在datastore中出现构建错误:

> ../../vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go:33:
> 未定义:proto.ProtoPackageIsVersion2
> ../../vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go:41:
> 结构字面量中的未知proto.ExtensionDesc字段'Filename'
> ../../vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go:48:
> 未定义:proto.RegisterFile
> ../../vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go:540:
> 未定义:proto.RegisterFile

在使用golang/protobuf版本8ee79997227bf9b34611aee7946ae64735e6fd93时,在bigquery中出现构建错误:

> ../../vendor/cloud.google.com/go/bigquery/params.go:55: 未定义:
> bigquery.QueryParameterType
> ../../vendor/cloud.google.com/go/bigquery/params.go:56: 未定义:
> bigquery.QueryParameterType
> ../../vendor/cloud.google.com/go/bigquery/params.go:57: 未定义:
> bigquery.QueryParameterType
> ../../vendor/cloud.google.com/go/bigquery/params.go:58: 未定义:
> bigquery.QueryParameterType
> ../../vendor/cloud.google.com/go/bigquery/params.go:59: 未定义:
> bigquery.QueryParameterType
> ../../vendor/cloud.google.com/go/bigquery/params.go:60: 未定义:
> bigquery.QueryParameterType
> ../../vendor/cloud.google.com/go/bigquery/params.go:61: 未定义:
> bigquery.QueryParameterType
> ../../vendor/cloud.google.com/go/bigquery/params.go:94: 未定义:
> bigquery.QueryParameter
> ../../vendor/cloud.google.com/go/bigquery/params.go:110: 未定义:
> bigquery.QueryParameterType
> ../../vendor/cloud.google.com/go/bigquery/params.go:178: 未定义:
> bigquery.QueryParameter

在这里提出了一个问题 - https://github.com/GoogleCloudPlatform/google-cloud-go/issues/475。如果有任何指导意见,将不胜感激。

英文:

I have an application which uses both bigquery and cloud datastore APIs. I use glide for go package management. I keep seeing build errors with either bigquery or datastore depending upon the version of golang/protobuf that I use. I am not able to find a version that is compatible with both bigquery and datastore. Either one of the packages keeps failing to build.

Build errors in datastore while using golang/protobuf version 7cc19b78d562895b13596ddce7aafb59dd789318:

> ../../vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go:33:
> undefined: proto.ProtoPackageIsVersion2
> ../../vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go:41:
> unknown proto.ExtensionDesc field 'Filename' in struct literal
> ../../vendor/google.golang.org/genproto/googleapis/api/annotations/annotations.pb.go:48:
> undefined: proto.RegisterFile
> ../../vendor/google.golang.org/genproto/googleapis/api/annotations/http.pb.go:540:
> undefined: proto.RegisterFile Build errors in bigquery while using
> golang/protobuf version 8ee79997227bf9b34611aee7946ae64735e6fd93:
>
> ../../vendor/cloud.google.com/go/bigquery/params.go:55: undefined:
> bigquery.QueryParameterType
> ../../vendor/cloud.google.com/go/bigquery/params.go:56: undefined:
> bigquery.QueryParameterType
> ../../vendor/cloud.google.com/go/bigquery/params.go:57: undefined:
> bigquery.QueryParameterType
> ../../vendor/cloud.google.com/go/bigquery/params.go:58: undefined:
> bigquery.QueryParameterType
> ../../vendor/cloud.google.com/go/bigquery/params.go:59: undefined:
> bigquery.QueryParameterType
> ../../vendor/cloud.google.com/go/bigquery/params.go:60: undefined:
> bigquery.QueryParameterType
> ../../vendor/cloud.google.com/go/bigquery/params.go:61: undefined:
> bigquery.QueryParameterType
> ../../vendor/cloud.google.com/go/bigquery/params.go:94: undefined:
> bigquery.QueryParameter
> ../../vendor/cloud.google.com/go/bigquery/params.go:110: undefined:
> bigquery.QueryParameterType
> ../../vendor/cloud.google.com/go/bigquery/params.go:178: undefined:
> bigquery.QueryParameter

Opened an issue here - https://github.com/GoogleCloudPlatform/google-cloud-go/issues/475. Any pointers would be appreciated.

答案1

得分: 2

你通过提交错误报告做得很对,希望问题能够很快解决。最新版本的云 API 增加了对查询参数的支持,但根据你所看到的错误,其中一个库可能没有正确更新。

英文:

You did the right thing by filing a bug, so hopefully that will be resolved soon. The most recent version of the cloud APIs adds support for query parameters but based on the error that you are seeing, one of the libraries was not updated properly.

huangapple
  • 本文由 发表于 2016年12月23日 15:54:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/41297410.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定