haskell-infra / hackage-trustees

Issue tracker for Hackage maintainance and trustee operations
https://hackage.haskell.org/packages/trustees/
42 stars 7 forks source link

Windows: Win32 >= 2.12.0.0 (for GHC > 9.0.1) breaks foundation #330

Closed Release-Candidate closed 2 years ago

Release-Candidate commented 2 years ago

A version of Win32 > 2.10.0.0 is needed to support GHC 9.0.2 (2.10.0.0 works with GHC 9.0.1), see: https://github.com/commercialhaskell/stackage/issues/6400

Win32 changed to explicit exports with version 2.12.0.0 https://github.com/haskell/win32/releases/tag/v2.12.0.0 https://github.com/haskell/win32/commit/fbc49f8bb694a276da49a70166bed1e6a85b9cf4#diff-3c294c5dd8b170586cad01c72d6ffd35225608811de64b538677cfde2c0b7d64 which breaks the usage of the C bindings.

See https://github.com/haskell-foundation/foundation/issues/557 from the 14th of January (2022)

Solution

Error message

> Foundation\Time\StopWatch.hs:73:9: error:
>     * Variable not in scope:
>         c_QueryPerformanceCounter :: Ptr a0 -> IO a1
>     * Perhaps you meant `queryPerformanceCounter' (imported from System.Win32.Time)
>    |
> 73 |         c_QueryPerformanceCounter (castPtr p `ptrPlus` 8)
>    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
>
andreasabel commented 2 years ago
* Use an upper bound of `Win32 < 2.12` for foundation >= 0.0.10

We can easily help with making the necessary revisions on hackage.

  • use the exported functions without c_

This requires modification of the code, thus either a NMU (non-maintainer upload) or a package takeover. (Please google the relevant procedures.)

sjakobi commented 2 years ago

It would be nice if a Windows user could check which foundation versions need to be revised. So far the assumption that v0.0.10 and up require revisions is based on looking at the code – it would be good to have more certainty.

phadej commented 2 years ago

This requires modification of the code, thus either a NMU (non-maintainer upload) or a package takeover. (Please google the relevant procedures.)

Given that there is takeover of cryptonite and memory in flight, I think foundation and basement will either dropped from the dependency tree or taken over as well. (I assume that's the motivation to make foundation compile/work).

EDIT: a link https://mail.haskell.org/pipermail/libraries/2022-January/031582.html

So I'd suggest that we, Hackage Trustees, stay away from engaging into NMU. (Also that change doesn't sound like very simple one).

sjakobi commented 2 years ago

I have performed the revisions for foundation-0.0.10 and up, see e.g. https://hackage.haskell.org/package/foundation-0.0.10/revisions/.

The build failure in v0.0.26.1 and the usage of the same c_QueryPerformanceCounter function in v0.0.10 and up seemed like sufficient evidence that these revisions are necessary.

I did not check whether foundation < 0.0.10 is compatible with Win32 >= 2.12.

juhp commented 2 years ago

I am not Windows user myself but feel for them... in the short term it would be great if https://github.com/haskell-foundation/foundation/pull/558 could be merge and released IMO.

gbaz commented 2 years ago

Vincent has informed the HF board that he's still around, does not authorize a package takeover, or any trustee actions on his packages, and will make releases when he wants to. Trustees are therefore unable to act in this situation. The job of trustees is to help maintainers and at times to supplement when maintainers fall away or are unresponsive. When there is an author and maintainer who says they are active, we are not in a position to judge if they are genuinely active or not, nor is it in the remit of trustees to act against maintainers wishes in terms of NMUs, etc.

In such a situation, the ecosystem will have to find another mechanism to adapt.

phadej commented 2 years ago

or any trustee actions on his packages

This is very sad, as it includes revisions as well. I don't see any way forward other then migrating to something else™.

andreasabel commented 2 years ago

Vincent's message is here: https://groups.google.com/a/haskell.foundation/g/board/c/68K8jlYChFQ/m/sWj_s96HBQAJ?pli=1