Skip to content

Minor: fix missing import in doc example #786

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

petertodd
Copy link
Contributor

Also, how do I get the doc-tests to actually test this example?

Copy link
Collaborator

@Kixunil Kixunil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 7b7085f

@Kixunil
Copy link
Collaborator

Kixunil commented Mar 19, 2025

I suspect that rust after the triple backticks is interfering with running the tests. IIRC I've seen something like that elsewhere.

@tcharding
Copy link
Member

cargo test --doc --all-features seems to run that code. I threw a panic in there to check it was run.

@petertodd
Copy link
Contributor Author

cargo test --doc --all-features seems to run that code. I threw a panic in there to check it was run.

Thanks! That does seem to run the test. Though it actually passes without my change; I guess the test must import rand some other way.

@tcharding
Copy link
Member

tcharding commented Mar 20, 2025

Oh rand is a dependency so its available without importing. Sorry I didn't look closer. Our CI would have to be broken if this code didn't work already.

@Kixunil
Copy link
Collaborator

Kixunil commented Mar 20, 2025

Regarding the wasm failure, how come it broke now and not before? Looks like we're missing a pin somewhere but also the code needs to be fixed (possibly also in upstream).

@apoelstra
Copy link
Member

@Kixunil wasm has been broken for months and months.

Lol @ "missing a pin". Good luck pinning anything in wasm. See my nearly-two-year-old "you can't pin anything" issue rustwasm/wasm-pack#1316

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 7b7085f; successfully ran local tests

@Kixunil
Copy link
Collaborator

Kixunil commented Mar 21, 2025

@apoelstra clearly, this is some sort of compiler thing (though might be the cc crate). Anyway, that issue is actually very concerning to me for other reasons, so I'm going to check if I can fix it.

@Kixunil
Copy link
Collaborator

Kixunil commented Mar 21, 2025

Oh, it looks like build should work, it's just install that doesn't.

@apoelstra apoelstra merged commit 442de10 into rust-bitcoin:master Mar 21, 2025
29 of 30 checks passed
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.

4 participants