]> Untitled Git - bdk/commitdiff
Merge bitcoindevkit/bdk#2401: fix(bitcoind_rpc): allow filter_iter example to compile...
authormerge-script <hello@evanlinjin.me>
Mon, 19 Oct 2026 12:29:33 +0000 (23:29 +1100)
committermerge-script <hello@evanlinjin.me>
Mon, 19 Oct 2026 12:29:33 +0000 (23:29 +1100)
32795f95dd3f99b4d2dcb3ffb29b894b028504e3 fix(bitcoind_rpc): allow filter_iter example to compile on Windows (Ravindra Kumar Bundela)

Pull request description:

  ### Description

  Fixes #2338.

  On Windows hosts, compiling the `filter_iter` example via `cargo build -p bdk_bitcoind_rpc --example filter_iter` failed because Cargo compiles package-level dev-dependencies for examples. This pulled in `bdk_testenv` -> `electrsd`, whose `build.rs` relies on `std::os::unix::fs::PermissionsExt` and fails on Windows.

  `filter_iter` connects to an external `bitcoind` RPC instance and only used `bdk_testenv` to import `anyhow`.

  This patch:
  - Adds `anyhow = "1"` directly to `[dev-dependencies]` of `bdk_bitcoind_rpc`.
  - Removes the indirect `bdk_testenv::anyhow` import in `filter_iter.rs`.
  - Moves `bdk_testenv` under `[target.'cfg(not(windows))'.dev-dependencies]`.
  - Conditionally gates the local integration/unit tests that use the `TestEnv` regtest harness on non-Windows targets.

  ### Verification

  Tested locally on Windows (`x86_64-pc-windows-msvc`):
  - `cargo build -p bdk_bitcoind_rpc --example filter_iter` compiles cleanly.
  - `target/debug/examples/filter_iter.exe` runs and displays the expected RPC argument requirements.
  - `cargo check --tests -p bdk_bitcoind_rpc` passes with 0 warnings.
  - `cargo test -p bdk_bitcoind_rpc` passes.
  - `cargo clippy -p bdk_bitcoind_rpc --all-targets` passes with 0 warnings.
  - `cargo fmt --package bdk_bitcoind_rpc -- --check` passes.

  ### Checklists

  - [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  - [x] I ran `cargo fmt` and `cargo clippy` before committing

ACKs for top commit:
  evanlinjin:
    ACK 32795f95dd3f99b4d2dcb3ffb29b894b028504e3

Tree-SHA512: cbe8548b363a5a1e64955b55c18cb2f4efa264221d0ef6a2bf544923e1d564731aba5f8df7990626a7ef5640c94f39ac05f12e025ad2310bcb20334c076d1b9e

1  2 
crates/bitcoind_rpc/src/lib.rs
crates/bitcoind_rpc/tests/test_emitter.rs

Simple merge