jwiegley / async-pool

Other
21 stars 13 forks source link

Build failure with GHC 9.4 (please make a metadata revision) #30

Closed chris-martin closed 7 months ago

chris-martin commented 1 year ago

This package fails to build with GHC 9.4.

Building library for async-pool-0.9.1..
[1 of 3] Compiling Control.Concurrent.Async.Pool.Async ( Control/Concurrent/Async/Pool/Async.hs, dist/build/Control/Concurrent/Async/Pool/Async.o, dist/build/Control/Concurrent/Async/Pool/Async.dyn_o )

Control/Concurrent/Async/Pool/Async.hs:714:16: error:
    • Couldn't match expected type: State# RealWorld
                                    -> (# State# RealWorld, a1 #)
                  with actual type: IO ()
    • In the first argument of ‘fork#’, namely ‘action’
      In the expression: fork# action s
      In the expression:
        case (fork# action s) of (# s1, tid #) -> (# s1, ThreadId tid #)
    |
714 |    case (fork# action s) of (# s1, tid #) -> (# s1, ThreadId tid #)
    |                ^^^^^^

Control/Concurrent/Async/Pool/Async.hs:719:22: error:
    • Couldn't match expected type: State# RealWorld
                                    -> (# State# RealWorld, a0 #)
                  with actual type: IO ()
    • In the second argument of ‘forkOn#’, namely ‘action’
      In the expression: forkOn# cpu action s
      In the expression:
        case (forkOn# cpu action s) of
          (# s1, tid #) -> (# s1, ThreadId tid #)
    |
719 |    case (forkOn# cpu action s) of (# s1, tid #) -> (# s1, ThreadId tid #)
    |                      ^^^^^^

Please make a metadata revision on async-pool-9.0.1 to correct the upper bound on base from < 5 to < 4.17.

TristanCacqueray commented 1 year ago

Dear @jwiegley, could you please make a new release with HEAD to fix compatibility with ghc > 9.4. Thank you in advance.

jwiegley commented 1 year ago

@TristanCacqueray I have released it to Hackage as 0.9.2. Please confirm.

TristanCacqueray commented 1 year ago

@jwiegley Thank you. I confirm the last release works, here is the nix override I used:

           async-pool = pkgs.haskell.lib.overrideCabal hpPrev.async-pool {
              version = "0.9.2";
              sha256 = "sha256-cu0zgAN+bJLkL6hOyC6BTcsVaqLEPkHeuQlxUJC0FoM=";
              revision = null;
              editedCabalFile = null;
            };
vst commented 7 months ago

I think that this can be closed now. Right?

PS: nixpkgs (v23.11) comes with async-pool v0.9.2, the default GHC is v9.4.8 and it compiles well.

jwiegley commented 7 months ago

With that report I'll close it, thanks @vst!