Skip to content

Use cryptohash-md5, not crypton & memory, for MD5 hashes#572

Closed
mpilgrem wants to merge 1 commit intosnoyberg:masterfrom
mpilgrem:md5
Closed

Use cryptohash-md5, not crypton & memory, for MD5 hashes#572
mpilgrem wants to merge 1 commit intosnoyberg:masterfrom
mpilgrem:md5

Conversation

@mpilgrem
Copy link
Contributor

@mpilgrem mpilgrem commented Mar 5, 2026

Also bumps Stack GHC 9.10 snapshot to LTS-24.33 (latest).

See:

My own motivation is to reduce Stack's dependencies on unmaintained memory and basement. However, cryptohash-md5 and base16 are lightweight and performative ways for http-client-tls to obtain MD5 hashes in a Base16 format.

Also bumps Stack GHC 9.10 snapshot to LTS-24.33 (latest).
@kazu-yamamoto kazu-yamamoto self-requested a review March 10, 2026 09:18
@kazu-yamamoto
Copy link
Collaborator

kazu-yamamoto commented Mar 10, 2026

This PR does not change http-client at all but tests of http-client fail. Why?
EDIT: For GHC >= 9.4.

@kazu-yamamoto
Copy link
Collaborator

@mpilgrem Build fails for GHC < 9.4.

@Yuras
Copy link
Collaborator

Yuras commented Mar 10, 2026

This PR does not change http-client at all but tests of http-client fail. Why?

@kazu-yamamoto As far as I can see it's http-conduit, not http-client. It fails for the exactly same reason as #573 - warp doesn't support non-threaded runtime:

GHC.Event.Thread.getSystemTimerManager: the TimerManager requires linking against the threaded runtime

My understanding is that we either enable threaded runtime, or, as you suggested, use time-manager < 0.3. Feel free to ping me if you need any help.

@kazu-yamamoto
Copy link
Collaborator

@Yuras Ah! Thanks!

@kazu-yamamoto
Copy link
Collaborator

latest is GHC 9.14.1 whose base is 4.22.
serialisedoes not allow base 4.22.
well-typed/cborg#373

@kazu-yamamoto
Copy link
Collaborator

@mpilgrem Build fails for GHC < 9.4.
I finally identified the source of this problem but I cannot reproduce it on my local machine.

Network/HTTP/Client/TLS.hs:46:1: error:
    Could not find module ‘Data.Base16.Types’

@Yuras
Copy link
Collaborator

Yuras commented Mar 10, 2026

I cannot reproduce it on my local machine.

@kazu-yamamoto Most likely you have base16-1.0 installed locally, so cabal chooses it right away. On CI it's not installed, and cabal chooses older version (because it prefers the installed text-1 over text-2.) Note that Data.Base16.Types doesn't exist in base16 < 1.0.
The fix is trivial, just put the lower bound for base16 to reflect the reality.

This PR is blocked on serialise, the rest seems to be clear.

@kazu-yamamoto
Copy link
Collaborator

http-client-tls v0.4.0 is now on Hackage.
Thank you all for your contributions!

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.

3 participants