Code Monkey home page Code Monkey logo

Comments (10)

xfxyjwf avatar xfxyjwf commented on May 19, 2024 3

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.

xfxyjwf avatar xfxyjwf commented on May 19, 2024

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.

xfxyjwf avatar xfxyjwf commented on May 19, 2024

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.

feiyuw avatar feiyuw commented on May 19, 2024

hi all,

any update of this issue? I also met this issue.

from protobuf.

xfxyjwf avatar xfxyjwf commented on May 19, 2024

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.

feiyuw avatar feiyuw commented on May 19, 2024

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.

mwildehahn avatar mwildehahn commented on May 19, 2024

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.

xfxyjwf avatar xfxyjwf commented on May 19, 2024

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.

mwildehahn avatar mwildehahn commented on May 19, 2024

they all have different package names

from protobuf.

Mubashshira avatar Mubashshira commented on May 19, 2024

@xfxyjwf how u solved this problem

from protobuf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.