This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'm fine with this change because it seems to work either way and for some reason the example code
prost-buildalso adds the include path to the source files. But it would be interesting to know why the code as it was before is not working for you.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.
If we look some lines below, we give the path
src/schemaas includes. Looking at the docs, the files given inPROTOSshould be found in the given includes. So, it should work.So, I also want to know why it doesn't work for you and then we need to report this to upstream.
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.
I understand "protos - Paths to .proto files to compile." means that "the parameter protos is the path of the file, not the file name", so the protos here should be added with
src/schema. Is my understanding correct?Btw, I reinstall protobuf compiler 3.20.3 to solve this problem. If it is determined that no modification is needed, I will close the pr.
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.
https://docs.rs/prost-build/latest/prost_build/fn.compile_protos.html
If you read the docs there, we do it exactly as explained in the docs. Others have reported that maybe deleting the
targetdir fixed it for them. There is clearly some bug, but I don't think in our code. None of our devs also reported this issue.Uh oh!
There was an error while loading. Please reload this page.
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.
I asked PROST about the issue, and maybe they can answer the question. tokio-rs/prost#734
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.
Ty @anonymousGiga ❤️
Uh oh!
There was an error while loading. Please reload this page.
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.
I got a response from this issue( tokio-rs/prost#734 ) , may be we should use "
src/schema/bitswap.v1.2.0.proto" instead of "bitswap.v1.2.0.proto" here. @bkchrThere 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.
@anonymousGiga could you then please update all usages of
compile_protos?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.
I checked that all the other places where
compile_protosis used are correct, and they all use in the way "prefix the protos with the path". In addition, I also updated to the latest master branch. @bkchr