Skip to content

refactor(erpc): move the RPC and webhook modules into rpc/ - #70

Open
jamesneve wants to merge 1 commit into
mainfrom
refactor/rpc-modules
Open

jamesneve wants to merge 1 commit into
mainfrom
refactor/rpc-modules

Conversation

@jamesneve

Copy link
Copy Markdown
Contributor

Third step of the crates/erpc module restructure, after cli/ (#49) and account/ (#69).

Moves the endpoint-facing modules into crates/erpc/src/rpc/:

Before After
rpc_call.rs rpc/call.rs
rpc_payment_tests.rs rpc/payment_tests.rs
webhook.rs rpc/webhook.rs
webhook_delivery.rs rpc/webhook_delivery.rs

Renames only, with one changed line. rpc/call.rs loads its tests with #[path], so the attribute now names payment_tests.rs. The other files move byte-for-byte. The new rpc/mod.rs declares the modules, and main.rs re-exports them under their old paths (rpc::call as rpc_call, webhook, webhook_delivery), as it does for cli/ and account/. As a result no imports change in this PR.

None of the other moved files use #[path], include_str! or hardcoded test names, and no docs or scripts refer to their paths.

Verification

  • cargo fmt --check and cargo clippy --workspace --all-targets -- -D warnings are clean.
  • cargo test --workspace: 2,280 passed, 0 failed.
  • erpc test list against main: 954 tests on both sides, with the same names apart from the new rpc:: paths.
  • All 106 --help pages are byte-identical to main.
  • check-oss-hygiene.sh and check-endpoints.sh pass.

Moves rpc_call, rpc_payment_tests, webhook and webhook_delivery into
crates/erpc/src/rpc/, the third step of the module restructure after
cli/ (#49) and account/ (#69). rpc_call and rpc_payment_tests drop
their prefix and become rpc/call.rs and rpc/payment_tests.rs.

Renames only, apart from the #[path] attribute in rpc/call.rs, which
now names payment_tests.rs. main.rs re-exports the modules under their
old paths, as it does for cli/ and account/, so no imports change.

Signed-off-by: James Neve <[email protected]>

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant