filter_iter example fails to compile on Windows because it depends on bdk_testenv
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- rust
调研方向
先查看 crates/bitcoind_rpc/examples/README.md 和 filter_iter 示例,然后在 Windows 上运行 cargo build -p bdk_bitcoind_rpc --example filter_iter。检查 bdk_testenv::anyhow import 及其 dev-dependency 路径。完成的标准是:文档中的示例能够编译,且不会引入仅适用于 Unix 的 electrsd test harness;其现有的运行时要求仍应保留在文档中。
由索引模型根据 Issue 内容生成。
描述
Context
Discovered while using BDK as a new developer: after the bdk_bitcoind_rpc library crate compiled, I followed the in-tree example instructions to run the only official example.
Reproduction
On Windows, from a checkout of this repository:
cargo build -p bdk_bitcoind_rpc
cargo build -p bdk_bitcoind_rpc --example filter_iter
The first command succeeds. The second fails.
crates/bitcoind_rpc/examples/README.md documents the same example as:
cargo run -p bdk_bitcoind_rpc --example filter_iter
Expected behavior
The documented example should compile on a host where bdk_bitcoind_rpc itself compiles. Runtime still needs a local bitcoind (RPC_URL / RPC_COOKIE); that is already documented. Compile should not require the Unix-only test harness.
Actual behavior
Building the example pulls in the bdk_testenv dev-dependency and fails in electrsd 0.38.1's build.rs:
error[E0433]: cannot find `unix` in `os`
--> electrsd-0.38.1\build.rs:14:18
|
14 | use std::os::unix::fs::PermissionsExt;
error[E0599]: no associated function or constant named `from_mode` found for struct `Permissions`
--> electrsd-0.38.1\build.rs:78:39
The example does not use TestEnv. It only imports anyhow from bdk_testenv:
use anyhow::Context;
use bdk_testenv::anyhow;
Because Cargo examples may use the package's dev-dependencies, that import is enough to compile electrsd.
Environment
- BDK commit:
0790f0400b108974b538e44d6498dc6fe1157548 - Crate:
bdk_bitcoind_rpc0.22.0 (filter_iterexample) - OS: Windows 10 (10.0.26200),
x86_64-pc-windows-msvc - Rust: rustc 1.97.1 (8bab26f4f 2026-07-14)
Which backend(s) are relevant (if any)?
- Bitcoin Core RPC
Is this blocking production use?
- No
Additional context
bdk_testenv depending on electrsd is reasonable for integration tests. It is surprising for this example, because the example talks to an already-running Signet bitcoind and does not start a regtest node.
This is a build/developer-experience issue, not a runtime bug in FilterIter.
Related but different:
- #1618 / PR #2329 — CI coverage for the example path on Ubuntu
- #2268 —
FilterItersafety
- 主要语言
- Rust
- 星标
- 1.1k
- 派生
- 520
- 平均合并
- 4 天 1 小时
- 30 天内合并 PR
- 21
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bitcoindevkit/bdk 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
bitcoindevkit/bdk#2432 ·
维护者通常 2 天内回复
-
static/bdk.svg still shows the old logo (bdk.png has the new one)可能重新可做 @notmandatory 于 36 天前认领,目前没有进行中的 PR。 未关闭bug chore
难度 1/5 1 小时以内 新手友好度 72/100
bitcoindevkit/bdk#2326 · 5 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
file_store: `Store::append` through a second handle overwrites changesets appended via another handle可能重新可做 关联的 PR 已关闭且未合并。 未关闭bug
难度 2/5 1-3 小时 新手友好度 84/100
bitcoindevkit/bdk#2308 · 2 条评论 ·
维护者通常 2 天内回复
-
file_store: `Store::load` never terminates when a changeset entry decodes to zero bytes可能已有人在做 @nymius 于 83 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 84/100
bitcoindevkit/bdk#2307 · 5 条评论 ·
维护者通常 2 天内回复
-
Document trust requirements for floating-prevout accounting可能重新可做 @Anandb71 于 17 天前认领,目前没有进行中的 PR。 未关闭documentation
难度 2/5 1-3 小时 新手友好度 84/100
bitcoindevkit/bdk#2287 · 2 条评论 ·
维护者通常 2 天内回复
查看 bitcoindevkit/bdk 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
gitbutlerapp/gitbutler#16982 ·
维护者通常 1 天内回复
-
priority: high status: new topic: ga4gh-sdk type: docs type: maintenance workload: minutes
难度 2/5 1-3 小时 新手友好度 78/100
-
C-bug
难度 2/5 1-3 小时 新手友好度 68/100
rust-lang/rust-clippy#17976 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
aaif-goose/goose#13327 ·
维护者通常 1 天内回复
-
llm translation
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复