简体   繁体   English

Protobuf字段-弃用参数为google.protobuf.Any而不是保留的参数

[英]Protobuf Fields - Deprecating a parameter as google.protobuf.Any instead of reserved

Due to a circular dependency issue. 由于循环依赖问题。 We needed deprecate and reserved a parameter foo . 我们需要弃用并reserved参数foo However, we also want to continue supplanting that parameter on older versions of our App for foo . 但是,我们还希望继续在较早版本的foo应用程序中替换该参数。

Instead of making a reserved parameter: Is it okay to return it as a google.protobuf.Any with no repercussions? 而不是reserved参数:可以以google.protobuf.Any返回任何结果吗?

No you shouldn't. 不,你不应该。 This is a breaking contract that compromised several platforms. 这是一个破坏性合同,损害了多个平台。 The best way is to create new files subverting it. 最好的方法是创建新文件来颠覆它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM