When building a substream project any non-messari protos being used get built in the target/pb/ folder as substreams.entity.v1.rs for example.
Then in the codegen it will build the src/pb.rs file to map the necessary proto definitions to a usable location in our /src folder, but the folder assumes that all target/pb/ files are messari. appended.
Should we be making this assumption?
In the example I am giving, it generates a broken src/pb.rs file that looks like this:
#[rustfmt::skip]
#[path = "../target/pb/messari.entity.v1.rs"]
pub(in crate::pb) mod entity_v1;
pub mod entity {
pub mod v1 {
pub use super::super::entity_v1::*;
}
}
#[rustfmt::skip]
#[path = "../target/pb/messari.erc20.v1.rs"]
pub(in crate::pb) mod erc20_v1;
pub mod erc20 {
pub mod v1 {
pub use super::super::erc20_v1::*;
}
}
Another note: abis are cleaned up during codegen, but proto files are not. Should we also clean the proto autogenerated files each time someone builds a substream?
When building a substream project any non-messari protos being used get built in the
target/pb/folder assubstreams.entity.v1.rsfor example.Then in the codegen it will build the
src/pb.rsfile to map the necessary proto definitions to a usable location in our/srcfolder, but the folder assumes that alltarget/pb/files aremessari.appended.Should we be making this assumption?
In the example I am giving, it generates a broken
src/pb.rsfile that looks like this:Another note: abis are cleaned up during codegen, but proto files are not. Should we also clean the proto autogenerated files each time someone builds a substream?