Skip to content
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

cryptohash-sha1 doesn't allow building with ghc 9.0 or newer #305

Closed
cartazio opened this issue May 13, 2021 · 13 comments
Closed

cryptohash-sha1 doesn't allow building with ghc 9.0 or newer #305

cartazio opened this issue May 13, 2021 · 13 comments

Comments

@cartazio
Copy link
Member

No description provided.

@cartazio cartazio changed the title cryptohash-sha1 doesn't allow building with ghc 8.10 or newer cryptohash-sha1 doesn't allow building with ghc 9.0 or newer May 13, 2021
@sjakobi
Copy link

sjakobi commented May 13, 2021

Indeed. See haskell-hvr/cryptohash-sha1#10.

@ysangkok
Copy link

ysangkok commented Jun 8, 2021

same goes for cryptohash-md5, cryptohash-sha256, cryptohash-sha512. I tried bumping cryptohash-md5/sha1 manually and they built fine. So a revision would be sufficient for them to work on GHC 9.

@sjakobi
Copy link

sjakobi commented Jun 8, 2021

same goes for cryptohash-md5, cryptohash-sha256, cryptohash-sha512.

Related issues and PRs are haskell-hvr/cryptohash-md5#5 (haskell-hvr/cryptohash-md5#6, cc @swamp-agr), haskell-hvr/cryptohash-sha256#12, haskell-hvr/cryptohash-sha512#7.

My main question is whether the GHC changes around optimizing withForeignPtr result in significantly reduced performance compared to GHC 8.10.

If the performance is significantly reduced, should the trustees relax the bounds, anyway? The policy document doesn't say what to do in this case – maybe @gbaz, @phadej, etc. can weigh in.

Personally, I probably won't perform a bounds relaxation, anyway, because I don't have much experience with cryptographic code. Other trustees may be more comfortable with this.

@cartazio
Copy link
Member Author

cartazio commented Jun 8, 2021 via email

@gbaz
Copy link
Contributor

gbaz commented Jun 8, 2021

Our policies don't cover performance regressions between versions of GHC, or really address performance in general. In this case I think that it means that they approve of revisions even when there may be performance regressions on new versions of GHC. PVP semantics are supposed to cover buildability and correctness, and trustee revisions are supposed to abide by pvp semantics. That's really the only sane way to proceed, so I give bounds bumps a 👍

@Bodigrim
Copy link

We can bump bounds, but it does not feel right to depend on abandoned packages for cryptographic applications. Is there any alternative to them?

@cartazio
Copy link
Member Author

cartazio commented Jun 13, 2021 via email

@Bodigrim
Copy link

Trustees can intervene in a short term, but clearly this situation needs a sustainable solution. Trustees are not well-positioned to semi-maintain a package for a long time.

To follow the policy I would expect someone a) to raise PRs for cryptohash-sha{256,512}, b) to remind maintainers about existing PRs for cryptohash-{sha1,md5}. Feel free checking these packages against base changelog and leaving reviews as well. Trustees need a clear evidence that maintaners were notified about changes and proved unresponsive for a long time, and that changes are indeed safe.

@ysangkok
Copy link

Existing PRs:

@sjakobi
Copy link

sjakobi commented Jun 15, 2021

We can bump bounds, but it does not feel right to depend on abandoned packages for cryptographic applications. Is there any alternative to them?

AFAIK the hnix packages are currently switching to cryptonite although its maintainer hasn't always been as responsive as could be desired. See e.g. https://mail.haskell.org/pipermail/haskell-cafe/2021-March/133636.html.

There's also the new Z-Botan package, which however operates on data structures from the Z-Data package, so it's not as easy to use from existing Haskell packages.

If the cryptohash-* packages should live on it would be great to find some new and active maintainers for it.

@cartazio
Copy link
Member Author

cartazio commented Jun 15, 2021 via email

@Bodigrim
Copy link

cryptonite will be massively broken by sized primitives in GHC 9.2, see https://gitlab.haskell.org/ghc/head.hackage/-/blob/master/patches/basement-0.0.12.patch
AFAIR cryptohash-* packages used to compile with GHC 9.2 last time I checked.

@gbaz
Copy link
Contributor

gbaz commented Jun 15, 2021

Performed base bumps on the four cryptohash-* packages.

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

No branches or pull requests

5 participants