Comments (10)
If they all have different package names, they will not be considered as conflicts. Could you post the content of the .proto files and the exact error message you got?
from protobuf.
Such name conflict should be reported as an error in every implementation. The pure Python needs to be fixed to report an error as well.
from protobuf.
One problem is that in Python there isn't a central DecriptorPool with all generated types so it can't detect such conflicts. Unless such a DescriptorPool is introduced in Python, pure Python implementation won't be able to detect such conflicts. This also applies to Java.
from protobuf.
hi all,
any update of this issue? I also met this issue.
from protobuf.
Hi feiyuw, if you met this issue, the right solution is to get rid of the duplicated messages (by changing the name of one of them).
from protobuf.
hi @xfxyjwf , the proto difinition is included in the to decode file together with protobuf message, and the file format is out of my control, now I use python implementation instead of cpp to work around this problem.
from protobuf.
running into this issue too, dropping back to python implementation fixed it.
is the issue really that you can't have objects with the same name in separate .proto
files? i have a common practice of defining Request
& Response
messages in different services and then import them in a common registry.
is the issue just that common registry?
from protobuf.
I think using the same name for different message types is not a good practice. In your case, you can set different package names on these .proto files and that will avoid the conflict.
from protobuf.
they all have different package names
from protobuf.
@xfxyjwf how u solved this problem
from protobuf.
Related Issues (20)
- Segmentation fault build failure when building on MacOS HOT 1
- Generate the pre-built protoc like maven repo HOT 3
- [Bazel CI] Build failed: undeclared inclusion(s) in rules //src/google/protobuf/util:field_mask_util and //src/google/protobuf/json:json with Bazel@HEAD
- [Bazel CI] Build failed: undeclared inclusion(s) in rules //src/google/protobuf/util:field_mask_util and //src/google/protobuf/json:json with Bazel@HEAD HOT 1
- bug(python): Potential breaking change in protobuf 5.27.0rc1 where `MessageMapContainer` cannot be imported HOT 1
- Failure to serialize protos on re-run when proto2 syntax file has doubles with default values HOT 4
- Fatal error: Uncaught Google\Protobuf\Internal\GPBDecodeException HOT 1
- feat: Add `tar.gz` archive format on release?
- Linux cross-compile error, can't find .proto file, but it exists.
- libprotobuf.so not generated when building :protobuf target with bazel.
- Messy code when returning Chinese characters HOT 5
- editions: compiler disallows extension to have default value when file sets default presence to implicit HOT 4
- python: invalid uint32_t value convertion
- WithPreserveProtoFieldNames and JsonParser HOT 1
- CMake fails to find abslConfig.cmake/absl-config.cmake HOT 1
- Version 26.1 compiles on Windows with errors
- Span<T> in C# on RepeatedField<T> HOT 4
- absl/base/attributes.h: No such file or directory HOT 1
- editions: options interpretation can generate incorrect results HOT 3
- editions: strange behavior with open enums and unrecognized values in message literals HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protobuf.