Skip to content

fix: enable hyper-rustls/ring for the https feature - #229

Merged
FalkWoldmann merged 2 commits into
httpmock:masterfrom
danieleades:ci-overhaul/01-fix-https-ring
Jul 6, 2026
Merged

FalkWoldmann merged 2 commits into
httpmock:masterfrom
danieleades:ci-overhaul/01-fix-https-ring

Conversation

@danieleades

Copy link
Copy Markdown
Contributor

The https feature pulled in hyper-rustls but not its ring crypto backend, so building --features https,remote failed to compile. The pairwise cargo hack check in the CI overhaul surfaced this.

Independent of the other CI-overhaul PRs.

The https feature pulled in hyper-rustls but not its ring crypto
backend, so building --features https,remote failed to compile. Adds
hyper-rustls/ring so every feature combination that touches HTTPS links
a crypto provider.
@danieleades
danieleades force-pushed the ci-overhaul/01-fix-https-ring branch from c21d797 to 22ce6c9 Compare July 5, 2026 13:43
@danieleades

Copy link
Copy Markdown
Contributor Author

@FalkWoldmann have started splitting into separate PRs. This is the starting point

@FalkWoldmann

Copy link
Copy Markdown
Member

Running cargo c --features https,remote still causes some compile errors due to some imports missing. Could you please add these here? :)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a feature-flag combination build failure by ensuring the https feature enables the correct crypto backend for hyper-rustls, so cargo build --features https,remote compiles successfully.

Changes:

  • Add hyper-rustls/ring to the https feature so hyper-rustls has its Ring-based crypto provider enabled when https is selected.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Two latent name-resolution failures surfaced by the restructured CI, both
in `#[cfg(feature = "https")]` code that isn't exercised by the default
feature build:

- `src/server/server.rs`: the `IOError` and `TlsError` variants of
  `server::Error` were used unqualified but omitted from the `Error::{...}`
  import list, so `--all-features` failed with E0425. Qualify both call
  sites with `Error::` (and collapse the redundant `IOError` closure).

- `src/server/builder.rs`: `use std::path::PathBuf` was gated on the
  `record` feature alone, but `PathBuf` is also used throughout the
  `https` code paths. Any feature set with `https` but without `record`
  (e.g. the MSRV job) failed with E0412. Widen the guard to
  `any(feature = "record", feature = "https")`.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BA7JYiqBPfFxRLKjMk2V62
@danieleades
danieleades force-pushed the ci-overhaul/01-fix-https-ring branch from c2b2245 to 3d49370 Compare July 6, 2026 06:25
@FalkWoldmann
FalkWoldmann merged commit f0203bf into httpmock:master Jul 6, 2026
1 check passed
@FalkWoldmann

Copy link
Copy Markdown
Member
image @danieleades I think your author attribution got swallowed :( should I revert this so we can re-add these commits, now with you correctly being stated as author?

@danieleades

Copy link
Copy Markdown
Contributor Author
image @danieleades I think your author attribution got swallowed :( should I revert this so we can re-add these commits, now with you correctly being stated as author?

I'm not too fussed to be honest. If you squash merge does that provide the right attribution? No need to rewrite history

@danieleades
danieleades deleted the ci-overhaul/01-fix-https-ring branch July 6, 2026 07:23
@FalkWoldmann

Copy link
Copy Markdown
Member

Not sure. I think i rebased the changes, so maybe that caused the issue? I will just merge them normally in the future. Sorry about that!

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