Open taobig opened 3 months ago
I found out that it's because there's a problem with the config file docs/tutorial/substreams.yaml. We must comment out the protobuf.files property.
I need to manually modify docs/tutorial/src/lib.rs after run make protogen
.
mod.rs in develop branch:
#[path = "eth.block_meta.v1.rs"]
#[allow(dead_code)]
pub mod block_meta;
But, after run make protogen
, mod.rs is auto updated:
// @generated
pub mod eth {
pub mod block_meta {
// @@protoc_insertion_point(attribute:eth.block_meta.v1)
pub mod v1 {
include!("eth.block_meta.v1.rs");
// @@protoc_insertion_point(eth.block_meta.v1)
}
}
}
...
Than, I should change the file docs/tutorial/src/lib.rs
use pb::block_meta::BlockMeta;
=> use crate::pb::eth::block_meta::v1::BlockMeta;
Is there something wrong with my procedure or with the demo's code?
cd /docs/tutorial && make protogen