Skip to content

bitreq: Fix tokio-rustls feature gate#563

Merged
tcharding merged 1 commit intorust-bitcoin:masterfrom
jamillambert:0421-bitreq-async-feature
Apr 23, 2026
Merged

bitreq: Fix tokio-rustls feature gate#563
tcharding merged 1 commit intorust-bitcoin:masterfrom
jamillambert:0421-bitreq-async-feature

Conversation

@jamillambert
Copy link
Copy Markdown
Collaborator

@jamillambert jamillambert commented Apr 21, 2026

The code was gated on the dependency instead of the feature alias which
enables other required dependencies. This caused a build failure when
both std and tokio-rustls features were enabled and not the other
required dependencies.

Change the feature gate to the feature alias instead of the dependency.

Copy link
Copy Markdown
Collaborator

@tnull tnull left a comment

Choose a reason for hiding this comment

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

Thanks, makes sense I think. But if we only now discovered this, it seems we might be lacking test coverage in CI that would have found this? Could we add the missing pieces in this PR?

The code was gated on the dependency instead of the feature alias which
enables other required dependencies. This caused a build failure when
both `std` and `tokio-rustls` features were enabled and not the other
required dependencies.

Change the feature gate to the feature alias instead of the dependency.
@jamillambert jamillambert force-pushed the 0421-bitreq-async-feature branch from 0a20b77 to f4f1c19 Compare April 22, 2026 09:25
@jamillambert jamillambert changed the title bitreq: Fix async feature gate bitreq: Fix tokio-rustls feature gate Apr 22, 2026
@jamillambert
Copy link
Copy Markdown
Collaborator Author

jamillambert commented Apr 22, 2026

Thanks, makes sense I think. But if we only now discovered this, it seems we might be lacking test coverage in CI that would have found this? Could we add the missing pieces in this PR?

I had a further look into this and it only fails to build with the exact feature set of std and tokio-rustls. There is no practical way to check every combination of features in CI, and I think the current method of checking a sub set is a good compromise. It did still catch the issue, just not in every run.

I also changed the fix to gate on the features async-https-rustls and async-https-rustls-probe, instead of adding async.

@jamillambert
Copy link
Copy Markdown
Collaborator Author

Audit / Security audit failure is unrelated to this PR and fixed in #565

Copy link
Copy Markdown
Collaborator

@tnull tnull left a comment

Choose a reason for hiding this comment

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

ACK f4f1c19

Copy link
Copy Markdown

@luisschwab luisschwab left a comment

Choose a reason for hiding this comment

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

ACK f4f1c19

@ton-anywhere
Copy link
Copy Markdown
Contributor

ACK f4f1c19

@tcharding tcharding merged commit 912a557 into rust-bitcoin:master Apr 23, 2026
38 of 42 checks passed
@tcharding
Copy link
Copy Markdown
Member

FTR I don't know what I"m supposed to do about red CI jobs for cargo audit? I just merged right past them.

@tnull
Copy link
Copy Markdown
Collaborator

tnull commented Apr 23, 2026

FTR I don't know what I"m supposed to do about red CI jobs for cargo audit? I just merged right past them.

Yeah, I think that fine on a per-PR basis. The CI checks are mostly there to ensure that no new known vulnerabilities are introduced. But if it annoys you and it's happening too often (in my experience it's rare) maybe we just reduce it to the cronjob?

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.

5 participants