Uh oh!
There was an error while loading. Please reload this page.
docs: Add documentation for adding new features - #302
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## master #302 +/- ##
=======================================
Coverage 57.45% 57.45% =======================================
Files 22 22 Lines 3695 3695 =======================================
Hits 2123 2123 Misses 1572 1572
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
7391aad to
14c34d6Compare| fn execute(&self, contex: &mut AppContext<OfflineOperations<'_>>) -> Result<Self::Output, Error> { | ||
| // Access the loaded wallet via the context state | ||
| let wallet = &contex.state.wallet; |
There was a problem hiding this comment.
nit: Is the contex parameter here a typo or intentional?
14c34d6 to
8f27808Compare
vadim-anfv
left a comment
There was a problem hiding this comment.
Concept ACK 8f27808
One thing worth fixing before merge - the Step 3 example doesn't compile as-is - the imports don't resolve (details inline).
| use crate::context::{AppContext, OfflineOperations}; | ||
| use crate::commands::AppCommand; | ||
| use crate::error::Error; |
There was a problem hiding this comment.
I copied the guide's snippets (Steps 1-3) into a single module and ran cargo check - the imports in Step 3 don't resolve:
error[E0432]: unresolved import `crate::context`
| ^^^^^^^ could not find `context` in the crate root
error[E0432]: unresolved import `crate::commands::AppCommand`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `AppCommand` in `commands`
error[E0603]: derive macro import `Error` is private
There's no context module; AppContext/OfflineOperations/AppCommand all live in crate::handlers, and crate::error::Error resolves to thiserror's private derive macro rather than the error type (which is BDKCliError). The paths the real handlers use:
usecrate::handlers::{AppCommand,AppContext,OfflineOperations};usecrate::error::BDKCliErrorasError;| ## Adding a command/feature in bdk-cli | ||
| The modular architectural redesign (PR #278) introduced a strict separation of concerns and utilizes a Typestate Pattern to prevent invalid operations. If you are a new contributor looking to add a new command or feature, this guide will walk you through the process step-by-step. |
There was a problem hiding this comment.
8f27808 to
7e4a0caCompareUh oh!
There was an error while loading. Please reload this page.
Description
With the introduction of modular design architecture in the app (PR #278) , new contributors may find it challenging adding new features/commands. This PR adds a documentation section to provide them with an easy-to-follow guide.
Fixes#298
Changelog notice
Checklists
All Submissions:
cargo fmtandcargo clippybefore committing