Skip to content
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

make protogen error in the docs/tutorial #62

Open
taobig opened this issue Jul 30, 2024 · 1 comment
Open

make protogen error in the docs/tutorial #62

taobig opened this issue Jul 30, 2024 · 1 comment

Comments

@taobig
Copy link

taobig commented Jul 30, 2024

cd /docs/tutorial && make protogen

substreams protogen ./substreams.yaml --exclude-paths="sf/substreams,google"
Error: reading manifest "./substreams.yaml": unable to get package: unable to convert manifest to package: loading protobuf: WARNING: proto file block_meta.proto already exists in system protobufs, do not include it in your manifest
make: *** [protogen] Error 1

@taobig
Copy link
Author

taobig commented Jul 30, 2024

  1. 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.

  2. 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant