-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Open
Description
Steps to Reproduce Issue
Following the "Build Your First Custom Indexer" tutorial at docs/content/guides/developer/advanced/custom-indexer.mdx results in compilation errors.
- Follow all steps in the tutorial exactly as written
- Run
cargo buildafter completing Step 10 - Observe three compilation errors
Expected Result
The tutorial code should compile successfully and the indexer should run without errors.
Actual Result
Compilation fails with three errors:
error[E0412]: cannot find trait `Store` in this scope
--> src/handlers.rs:56:35
error[E0308]: mismatched types (commit method signature)
--> src/handlers.rs:50:9
error[E0277]: `impl Future<Output = Result<Vec<StoredTransactionDigest>>>` cannot be sent between threads safely
--> src/handlers.rs:24:5
System Information
- OS: All platforms affected
- Compiler: rustc 1.74.0+ (any recent version)
- Tutorial location: docs/content/guides/developer/advanced/custom-indexer.mdx
Root Cause
The example code is outdated and missing:
store::Storeimport- Correct type signature for
commitmethod #[async_trait::async_trait]attribute
Note
This is a documentation/tutorial issue. The example code needs updating to match current API requirements.
Proposed Fix
The examples/rust/basic-sui-indexer/src/handlers.rs file needs three changes:
- Add missing import:
use sui_indexer_alt_framework::store::Store; - Fix commit method signature:
conn: &mut <Self::Store as Store>::Connection<'a> - Add attribute:
#[async_trait::async_trait]to the Processor implementation
I have tested these changes and confirmed they resolve all compilation errors. The indexer successfully compiles and runs against Testnet after applying these fixes.
Metadata
Metadata
Assignees
Labels
No labels