Skip to content

Release tracking PR: bitcoin-io v0.1.4#5183

Merged
apoelstra merged 10 commits intorust-bitcoin:io-0.1.xfrom
tcharding:push-wkwllkoltnwt
Dec 1, 2025
Merged

Release tracking PR: bitcoin-io v0.1.4#5183
apoelstra merged 10 commits intorust-bitcoin:io-0.1.xfrom
tcharding:push-wkwllkoltnwt

Conversation

@tcharding
Copy link
Copy Markdown
Member

@tcharding tcharding commented Oct 22, 2025

Remove the doc_auto_cfg as we did in #5162. Shoosh the Rust compiler (not clippy). Then bump the version number, add a changelog entry, and update the lock files.

@github-actions github-actions bot added C-io PRs modifying the io crate doc labels Oct 22, 2025
@tcharding
Copy link
Copy Markdown
Member Author

tcharding commented Oct 22, 2025

I didn't update them because the build gives an error which does not matter for this release.

error: unexpected `cfg` condition value: `alloc`
   --> bitcoin/src/blockdata/transaction.rs:529:1
    |
529 | units::impl_parse_str_from_int_infallible!(Sequence, u32, from_consensus);

@apoelstra
Copy link
Copy Markdown
Member

Yes, we need CI to pass for backport branches. Certainly we need my local CI to pass. Otherwise we are releasing untested stuff.

@tcharding
Copy link
Copy Markdown
Member Author

tcharding commented Oct 23, 2025

This is kind of fucked, we are going to have to start at the leaf crates and remove the doc_auto_cfg for as many versions as far back as we do releases. Then move up the stack - what an PITA.

EDIT: Oh, you worked that out already: #5084 (comment)

@tcharding tcharding force-pushed the push-wkwllkoltnwt branch 2 times, most recently from f486f92 to 2245a71 Compare October 23, 2025 17:33
@apoelstra
Copy link
Copy Markdown
Member

Bump.

You can ignore the clippy stuff I guess but the "invalid cfg" is a compiler error which I can't really override.

@tcharding
Copy link
Copy Markdown
Member Author

tcharding commented Oct 29, 2025

Aight, on it. Note to self remove auto_doc_cfg thing too.

EDIT: lol, this is literally what this PR is doing already.

@github-actions github-actions bot added the C-bitcoin PRs modifying the bitcoin crate label Oct 30, 2025
@tcharding tcharding force-pushed the push-wkwllkoltnwt branch 2 times, most recently from 204ed3f to 4109c8a Compare October 30, 2025 05:09
@tcharding
Copy link
Copy Markdown
Member Author

I updated the lock files on top of the temporary hash and moved the changes into the patch before the temporary one, criky.

@apoelstra
Copy link
Copy Markdown
Member

I think it's fine to keep this "hack" in place. Or we could just whitelist the lint. Your fix is incorrect though -- it deletes a call to impl_tryfrom_str_from_int_infallible which previously was called from within the macro, and therefore breaks the API. (I guess, your reason for the big "revert this" comment is that the hack affects bitcoin but not io? This seems unreasonably complicated. If we don't want to do a proper fix we should just whitelist the lint.)

Whatever you do, can you do it in the first commit of this PR rather than the last?

@tcharding
Copy link
Copy Markdown
Member Author

Answering from my memory because digging back through exactly which version of units is being used is bothersome. I believe that the code is buggy and the call to impl_tryfrom_str_from_int_infallible is not being called because the alloc feature does not exist in bitcoin. That's the reason I used <insert-normal-rant-about-calling-macros-across-crate-boundries>. But like I said I'd have to dig back through my branches to double check this.

@apoelstra
Copy link
Copy Markdown
Member

I double-checked it and you are incorrect. There are two macro calls inside the macro and only one is alloc-gated.

But if we just whitelisted the lint we wouldn't need to think baout this.

@tcharding
Copy link
Copy Markdown
Member Author

Thanks, I'll do it.

@tcharding tcharding force-pushed the push-wkwllkoltnwt branch 2 times, most recently from 31fac52 to cc50cc6 Compare November 2, 2025 23:53
@github-actions github-actions bot added the test label Nov 2, 2025
@apoelstra
Copy link
Copy Markdown
Member

In 4e8522a

Please just whitelist the lint. Add cfg(alloc) to the existing list of cfgs. Changing deny to warn does nothing for either Github's or my CI.

@tcharding
Copy link
Copy Markdown
Member Author

tcharding commented Nov 4, 2025

Add cfg(alloc) to the existing list

I tried that, it doesn't work. I don't know if I'm confused but its feature = "alloc" that is triggering the lint. I guess its something to do with how optional deps are treated as features so alloc is being misinterpreted as a dep (since there is no alloc feature in bitcoin then since there is no alloc dep the compiler goes on to say alloc is an unrecognized cfg. I tried various things before I switched the deny to warn.

@apoelstra
Copy link
Copy Markdown
Member

Hmm, ok. Can you change deny to allow then?

"warn" is the same as "deny" in CI.

@apoelstra
Copy link
Copy Markdown
Member

I actually tried this one and it appears to work.

@tcharding
Copy link
Copy Markdown
Member Author

Hmm, ok. Can you change deny to allow then?

Done

"warn" is the same as "deny" in CI.

For my understanding can you explain this? I was under the impression that I was making the build pass just so I could update the lock files. Do you mean that you have your CI box configured to fail for lint warnings. FTR I'm not super clear on why some lints are in the compiler and some in clippy.

@apoelstra
Copy link
Copy Markdown
Member

Do you mean that you have your CI box configured to fail for lint warnings.

Yes. And we do the same in Github CI.

FTR I'm not super clear on why some lints are in the compiler and some in clippy.

It's more or less random.

Shoosh the Rust linter. Copied over from master.
@tcharding
Copy link
Copy Markdown
Member Author

This one is good to go @apoelstra, ack, merge, release - YOLO!

@apoelstra
Copy link
Copy Markdown
Member

So, I'm failing to build this locally because we have hex-conservative 0.2.0 in the lockfile which has doc_auto_cfg. I think we need to release a hex-conservative 0.2.1 first.

@tcharding
Copy link
Copy Markdown
Member Author

Damn, I spat the dummy already earlier trying to get that done. (Its 0.2.2 we need I think, even though I was trying to do 0.2.1 earlier - ouch )

@apoelstra
Copy link
Copy Markdown
Member

Oh I think the reason I'm having trouble is that there's no nightly-version file here. I think if we add this file with nightly-2024-09-15 (or whatever) that would let my local CI work despite the doc_auto_cfg mess.

OTOH fixing hex-conservative is probably the correct way to do this..

@tcharding
Copy link
Copy Markdown
Member Author

OTOH fixing hex-conservative is probably the correct way to do this..

You mean what you did already in rust-bitcoin/hex-conservative#197, right?

@apoelstra
Copy link
Copy Markdown
Member

Yep. Released now. Can you update this PR to pull in hex-conservative 0.2.2? I think then we'll have no more doc_auto_cfg in bitcoin 0.32 or anything in its dep tree.

@github-actions github-actions bot added C-hashes PRs modifying the hashes crate C-base58 PRs modifying the base58 crate labels Nov 26, 2025
@apoelstra
Copy link
Copy Markdown
Member

Thanks! Needs lockfile update.

@apoelstra
Copy link
Copy Markdown
Member

Ping @tcharding

@apoelstra
Copy link
Copy Markdown
Member

Fallout from the `doc_auto_cfg` cluster f***
In preparation for a point release bump the version, add a changelog
entry, and update the lock files.
@tcharding
Copy link
Copy Markdown
Member Author

tcharding commented Nov 30, 2025

Damn, this branch has what looks like all the lint warnings fixed in #5282. Are you ok to merge as is @apoelstra or do we want those fixed here too?

@apoelstra
Copy link
Copy Markdown
Member

Nah. Maybe if we decide that we want to maintain io 0.1.x for real for some reason. But I don't think we do.

@apoelstra
Copy link
Copy Markdown
Member

omfg now I have the doc_auto_cfg error in hashes 0.13.0.

Can we release a hashes 0.13.1?

@apoelstra
Copy link
Copy Markdown
Member

Well, actually, io doesn't depend on hashes. Nothing depencd on hashes 0.13.0. It's just in the repo with io 0.1.x.

I think I should utACK and merge this.

Copy link
Copy Markdown
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 125585f; successfully ran local tests; with runDocs turned off

@apoelstra
Copy link
Copy Markdown
Member

BTW. The reason this is causing a crisis for us and not everybody is that it triggers specifically when we compile with the docsrs flag on, which we do in our local CI but is really not a normal thing to do.

@apoelstra apoelstra merged commit 29a07ab into rust-bitcoin:io-0.1.x Dec 1, 2025
186 of 187 checks passed
@apoelstra
Copy link
Copy Markdown
Member

Tagged and published.

@tcharding
Copy link
Copy Markdown
Member Author

Perhaps we should flesh out a script (or xshell) that does pre-release checks for PRs that have a title Release tracking PR: ... and in that do the docsrs build? (And check TBD and any other stuff we always forget.)

@apoelstra
Copy link
Copy Markdown
Member

Yeah, that'd be nice. It'll be a PITA to do the docsrs build only for the crates that we're releasing, and not other crates which are broken..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-base58 PRs modifying the base58 crate C-bitcoin PRs modifying the bitcoin crate C-hashes PRs modifying the hashes crate C-io PRs modifying the io crate ci doc test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants