-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix missing include clause in the gRPC proto compilation #36153
Fix missing include clause in the gRPC proto compilation #36153
Conversation
Fix missing include statements in the proto compilation and also improve the syntax of the proto include/exclude clauses (comma-separated list accepting spaces)
var pathToProtoFile = files.normalize().toAbsolutePath(); | ||
var pathToParentDir = files.getParent(); | ||
// Add the proto file to the list of proto to compile, but also add the directory containing the | ||
// proto file to the list of directories to include (it's a set, so no duplicate). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why also the dir?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because if you don't, it cannot resolve import statements from proto files included in the application. That was the bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. B/c the paths are probably relative to the file (it's dir) that imports them?
🙈 The PR is closed and the preview is expired. |
This comment has been minimized.
This comment has been minimized.
The failure is related, investigating... |
✔️ The latest workflow run for the pull request has completed successfully. It should be safe to merge provided you have a look at the other checks in the summary. |
I fixed the problem. It was more a CI issue than a real issue. We were computing a directory location. With our CI we had 2 distinct locations (one from the first build and one from the IT build) leading to duplicate proto files. I fixed it to generate unique but conservative locations. |
@cescoffier should we consider backporting this for 3.4.2? |
No I think it's fine. Also, this Pr introduced a regression I fixed in another PR. |
Fix missing include statements in the proto compilation and also improve the syntax of the proto include/exclude clauses (comma-separated list accepting spaces)
Fix #36078