-
Notifications
You must be signed in to change notification settings - Fork 657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@grpc/reflection writes wanings to console for .proto files with no package declaration #2671
Comments
I have not tried your tests but perhaps a possible solution could be to replace that piece of code with
I also changed |
I think that looks reasonable, though I'm guessing that @jtimmons You wrote this code, does this change look reasonable to you, or is there something we're missing here? |
I think the problem here is actually in the "seek upwards in package scope to find symbol" logic in the second if statement. I managed a pretty minimal reproduction of @paulish's issue by paring his example down to: syntax = "proto3";
message TopLevelMessage {
bool value = 1;
}
message ProcessRequest {
string key = 1;
TopLevelMessage message = 2;
} in testing this, we end up with
this seems like a bug because I'd expect it to look for |
fix(grpc-reflection): [#2671] handle references to root-level message types in default package
A fix for this is out in |
@murgatroid99 tried 1.0.2 and the problem is still exists. At least I still have warnings in the console output. |
What warnings are you seeing, exactly? |
|
I just published version 1.0.3 with more fixes. According to my manual testing with your proto file, that fixes all of the warnings that you were seeing. |
Thank you! Now I can confirm that the problem is fixed. |
Problem description
If proto file has not
package
declaration then call to ReflectionService writes unwanted warnings to console.Reproduction steps
Use attached .proto file from archive dbdata.zip and the following code
Environment
"@grpc/reflection": "^1.0.1"
Additional context
The problem is in the
reflection-v1.js
addReference function.It expects to remove the prefix before the package but regular messages has no package prefix and dot should not be removed for them.
The text was updated successfully, but these errors were encountered: