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)
- Container types are inconsistent even within the same patch of Python protobuf
- Building protobuf 27.0 with emcc yields errors HOT 2
- protoc can not generate java class
- abseil-cpp, absl in thirdparty conflict with abseil-cpp, absl in unreal5 project HOT 1
- Offer a better migration path from protobuf-java 3.x to 4.x HOT 3
- Clarify the license of utf8_range HOT 2
- clarify field syntax HOT 1
- uniform_int_distribution not a member of "std" ?
- Call DescriptorPool::FindEnumValueByName in C++ don't work (return nullptr).
- "warning: refname 'HEAD' is ambiguous" is shown. HOT 1
- Question: Application requires missing libprotobuf.so.13 version, how to find equivalent tag?
- editions: map fields and message_encoding and field_presence features HOT 4
- Protocol Buffers Python API Reference for v5.x is missing HOT 1
- v27.0-rc1 breaks tagging for archives multiple builds taking the latest tag breaks due to extra - in file name HOT 8
- 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
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.