Git Product home page Git Product logo

Comments (10)

buschtoens avatar buschtoens commented on July 3, 2024

Yip, I was too stupid. Fixed it.
However, the issue remains, doesn't it?

btw, I love you for this project. ❤️

from protobuf.js.

dcodeIO avatar dcodeIO commented on July 3, 2024

There has been some progress on this lately: #38

Are you already using ProtoBuf.js >=1.1.1 (1.1.4 is latest)?

from protobuf.js.

buschtoens avatar buschtoens commented on July 3, 2024

Yes, I do. If you want, you can test it with node lib/schemas.

from protobuf.js.

dcodeIO avatar dcodeIO commented on July 3, 2024

I am sorry but I am still not sure what's the actual issue. Would you create a simple test case for me?

from protobuf.js.

adammw avatar adammw commented on July 3, 2024

This looks like the imports statements are not working... I'm trying a similar thing, using the same builder for each proto file gives the error:
Duplicate name in namespace Namespace .spotify.playlist4.proto: ListChecksum
whereas using a separate builder for each file gets one proto file further and gives the error:
Unresolvable type reference in Message.Field .spotify.playlist4.proto.Item.attributes: ItemAttributes

I'm trying to read and understand the docs and code, do we need to do anything special to use the import statements?

from protobuf.js.

dcodeIO avatar dcodeIO commented on July 3, 2024

If would already be sufficient if you could supply me with a simple test case that fails because I, unfortunately, have no understanding of the inheritance used in the spotify protos. I'll fix it then!

from protobuf.js.

adambom avatar adambom commented on July 3, 2024

I'm experiencing this problem using the proto2js command line utility. The issue arises when two proto files share a dependency. The depended-upon messages get loaded in twice.

Example:

in main.proto

package My;
import public "dep1.proto";
import public "dep2.proto";

message main {
    optional dep1 test1 = 0;
    optional dep2 test2 = 0;
}

in dep1.proto

package My;
import public "dep2.proto";

message dep1 {
    optional dep2 test1 = 0;
}

in dep2.proto

package My;

message dep2 {
    optional uint64 test1 = 0;
}

When I run proto2js main.proto -class='my' I get

my = dcodeIO.ProtoBuf.newBuilder().import(/* dep1 */).import(/* dep2 */).import(/* dep2 */)

Notice how dep2 gets loaded in duplicate.

from protobuf.js.

TooTallNate avatar TooTallNate commented on July 3, 2024

@adambom Nice repro steps!

from protobuf.js.

dcodeIO avatar dcodeIO commented on July 3, 2024

So, is this related to proto2js only?

from protobuf.js.

adambom avatar adambom commented on July 3, 2024

Have not attempted to repro the issue experienced by op.

Sent from my iPhone

On Aug 8, 2013, at 4:20 PM, dcode [email protected] wrote:

So, is this related to proto2js only?


Reply to this email directly or view it on
GitHubhttps://github.com//issues/40#issuecomment-22365587
.

from protobuf.js.

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.