Giter Club home page Giter Club logo

Comments (9)

Zexuz avatar Zexuz commented on June 10, 2024

I might look in to this myself later, but if anyone has any ideas that would help.

Edit
Had a quick look at it, and did not find it. Need a push in the right direction if I'm going to solve this.

from bloomrpc.

fenos avatar fenos commented on June 10, 2024

@Zexuz Thanks a lot for reporting the issue, your description it's very precise it helps a lot!

I'll be looking at it sometime today, and comeback to you 👍

from bloomrpc.

Zexuz avatar Zexuz commented on June 10, 2024

No worries, I'm a developer that uses this tool every day when I'm working. And it has made my life so much easier. Just glad I could provide and give something back to make it more awesome! ✌

PS. If you have any ideas of where to look, I would be happy to take another look at it.

from bloomrpc.

fenos avatar fenos commented on June 10, 2024

@Zexuz Hi,

I spent a little bit of time on this, and i could narrow down the issue.

The problem is happening on this Line, it's essentially try to locate the service by this key mypackage.common.Example but unable todo so.

It should traverse the protobuf Root object and retrieve the Service from it using that full path key as any other protofile is able todo so.

I'm not entirely sure why it cannot locate it with the full path, probably is related to the fact that lives in a different file perhaps?

i've quickly tried to use the service name only just Example instead of mypackage.common.Example and it seemed to work just fine as well as other protos.

The code will result as following:

serviceDef() {
    const serviceName = this.service.serviceName.split('.').pop();

    if (!serviceName) {
       throw new Error(`Cannot locate service name in ${this.service.serviceName}`);
    }
    return this.service.proto.root.lookupService(serviceName);
  }

although i'd like todo some more testing with other protobuf files before considering a safe change.

from bloomrpc.

Zexuz avatar Zexuz commented on June 10, 2024

The problem is happening on this Line, it's essentially try to locate the service by this key mypackage.common.Example but unable to do so.

Isn't the problem that it try to look up the service with key mypackage.common.Example in the first place?

mypackage.common.Example does not contain a service, mypackage.service.Example contains the service.

from bloomrpc.

fenos avatar fenos commented on June 10, 2024

@Zexuz I see, good point! That's surely the problem. 👍

i'll have another go to see if I can make it generate correctly, you are also welcome to look this yourself.

Some Guidance

  • The name is generated by this Method and points to the bloomrpc-mock library which the editor is using.

  • The implementation of walkServices can be found HERE

  • The bug should be located around those lines

from bloomrpc.

fenos avatar fenos commented on June 10, 2024

to run bloomrpc-mock server you can execute the script inside bin/ as following:

./bin/run C:\Users\desktop\Desktop\somePath\proto\service.proto

This should give you instant feedback

from bloomrpc.

fenos avatar fenos commented on June 10, 2024

@Zexuz Doing some progress with this, being a bit busy lately at work but I'm getting to a fix

from bloomrpc.

Zexuz avatar Zexuz commented on June 10, 2024

Great! I have been swamp myself, but thank you for looking in to it

from bloomrpc.

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.