haskus / packages

Haskus packages
https://haskus.org/
24 stars 11 forks source link

`hakus-utils-variant` fails to build with GHC-9.8 #62

Closed hasufell closed 2 months ago

hasufell commented 2 months ago

I think https://github.com/haskus/packages/commit/299c9f0804829ce6bf186745e69c74025569d30d#diff-ef5adfab5a89adb3c485b2974f20d76501000eb9e4c044e6a998f5a0b40fc03f broke it.

Reproduce:

  1. cabal unpack haskus-utils-variant-3.5
  2. cd haskus-utils-variant-3.5
  3. cabal build -w ghc-9.8.2

Result:

[1 of 9] Compiling Haskus.Utils.ContFlow ( src/lib/Haskus/Utils/ContFlow.hs, /home/hasufell/tmp/haskus-utils-variant-3.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/haskus-utils-variant-3.5/build/Haskus/Utils/ContFlow.o, /home/hasufell/tmp/haskus-utils-variant-3.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/haskus-utils-variant-3.5/build/Haskus/Utils/ContFlow.dyn_o ) [Source file changed]

src/lib/Haskus/Utils/ContFlow.hs:88:29: error: [GHC-88464]
    Data constructor not in scope: MkSolo :: (a -> r) -> Solo (a -> r)
    Suggested fix:
      Perhaps use ‘Solo’ (imported from Haskus.Utils.Tuple)
   |
88 | (>:-:>) (ContFlow f) c = f (MkSolo c)
   |                             ^^^^^^
Error: cabal: Failed to build haskus-utils-variant-3.5.

Why it cannot find MkSolo escapes me... since Haskus.Utils.Tuple re-exports Data.Tuple.

hsyl20 commented 2 months ago

On CI it works , but it's using an unreleased haskus-utils-data. I'll release it soon (https://github.com/haskus/packages/pull/63).

I'm very tempted to make a new package for variants that would have a minimalist set of dependencies (e.g. boot libs only).

hsyl20 commented 2 months ago

I went ahead and created a new package: https://hackage.haskell.org/package/variant

hsyl20 commented 2 months ago

Fixed with the new release:

❯ cabal build -w ghc-9.8.2
Resolving dependencies...
Build profile: -w ghc-9.8.2 -O1
In order, the following will be built (use -v for more details):
 - haskus-utils-data-1.5 (lib) (requires download & build)
 - haskus-utils-variant-3.5 (lib) (configuration changed)
Downloading  haskus-utils-data-1.5
Downloaded   haskus-utils-data-1.5
Starting     haskus-utils-data-1.5 (lib)
Building     haskus-utils-data-1.5 (lib)
Installing   haskus-utils-data-1.5 (lib)
Completed    haskus-utils-data-1.5 (lib)
Configuring library for haskus-utils-variant-3.5...
Preprocessing library for haskus-utils-variant-3.5...
Building library for haskus-utils-variant-3.5...
[1 of 9] Compiling Haskus.Utils.ContFlow ( src/lib/Haskus/Utils/ContFlow.hs, /home/hsyl20/scratch/hu/haskus-utils-variant-3.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/haskus-utils-variant-3.5/build/Haskus/Utils/ContFlow.o, /home/hsyl20/scratch/hu/haskus-utils-variant-3.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/haskus-utils-variant-3.5/build/Haskus/Utils/ContFlow.dyn_o )
[2 of 9] Compiling Haskus.Utils.Variant ( src/lib/Haskus/Utils/Variant.hs, /home/hsyl20/scratch/hu/haskus-utils-variant-3.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/haskus-utils-variant-3.5/build/Haskus/Utils/Variant.o, /home/hsyl20/scratch/hu/haskus-utils-variant-3.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/haskus-utils-variant-3.5/build/Haskus/Utils/Variant.dyn_o )
[3 of 9] Compiling Haskus.Utils.Variant.Syntax ( src/lib/Haskus/Utils/Variant/Syntax.hs, /home/hsyl20/scratch/hu/haskus-utils-variant-3.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/haskus-utils-variant-3.5/build/Haskus/Utils/Variant/Syntax.o, /home/hsyl20/scratch/hu/haskus-utils-variant-3.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/haskus-utils-variant-3.5/build/Haskus/Utils/Variant/Syntax.dyn_o )
[4 of 9] Compiling Haskus.Utils.Variant.VEither ( src/lib/Haskus/Utils/Variant/VEither.hs, /home/hsyl20/scratch/hu/haskus-utils-variant-3.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/haskus-utils-variant-3.5/build/Haskus/Utils/Variant/VEither.o, /home/hsyl20/scratch/hu/haskus-utils-variant-3.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/haskus-utils-variant-3.5/build/Haskus/Utils/Variant/VEither.dyn_o )
[5 of 9] Compiling Haskus.Utils.Variant.Excepts ( src/lib/Haskus/Utils/Variant/Excepts.hs, /home/hsyl20/scratch/hu/haskus-utils-variant-3.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/haskus-utils-variant-3.5/build/Haskus/Utils/Variant/Excepts.o, /home/hsyl20/scratch/hu/haskus-utils-variant-3.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/haskus-utils-variant-3.5/build/Haskus/Utils/Variant/Excepts.dyn_o )
[6 of 9] Compiling Haskus.Utils.VariantF ( src/lib/Haskus/Utils/VariantF.hs, /home/hsyl20/scratch/hu/haskus-utils-variant-3.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/haskus-utils-variant-3.5/build/Haskus/Utils/VariantF.o, /home/hsyl20/scratch/hu/haskus-utils-variant-3.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/haskus-utils-variant-3.5/build/Haskus/Utils/VariantF.dyn_o )
[7 of 9] Compiling Haskus.Utils.EGADT ( src/lib/Haskus/Utils/EGADT.hs, /home/hsyl20/scratch/hu/haskus-utils-variant-3.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/haskus-utils-variant-3.5/build/Haskus/Utils/EGADT.o, /home/hsyl20/scratch/hu/haskus-utils-variant-3.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/haskus-utils-variant-3.5/build/Haskus/Utils/EGADT.dyn_o )
[8 of 9] Compiling Haskus.Utils.EADT ( src/lib/Haskus/Utils/EADT.hs, /home/hsyl20/scratch/hu/haskus-utils-variant-3.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/haskus-utils-variant-3.5/build/Haskus/Utils/EADT.o, /home/hsyl20/scratch/hu/haskus-utils-variant-3.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/haskus-utils-variant-3.5/build/Haskus/Utils/EADT.dyn_o )
[9 of 9] Compiling Haskus.Utils.EADT.TH ( src/lib/Haskus/Utils/EADT/TH.hs, /home/hsyl20/scratch/hu/haskus-utils-variant-3.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/haskus-utils-variant-3.5/build/Haskus/Utils/EADT/TH.o, /home/hsyl20/scratch/hu/haskus-utils-variant-3.5/dist-newstyle/build/x86_64-linux/ghc-9.8.2/haskus-utils-variant-3.5/build/Haskus/Utils/EADT/TH.dyn_o )

But I encourage you to switch to the variant package. I'll deprecate the other one.

hsyl20 commented 2 months ago

Why it cannot find MkSolo escapes me... since Haskus.Utils.Tuple re-exports Data.Tuple.

It was an upstream bug that was detected today: https://gitlab.haskell.org/ghc/ghc/-/issues/25182#note_579863

hasufell commented 2 months ago

But I encourage you to switch to the variant package

That doesn't seem possible, because it has very tight base bounds, ruling out support for anything before GHC 9.8.

hsyl20 commented 2 months ago

But I encourage you to switch to the variant package

That doesn't seem possible, because it has very tight base bounds, ruling out support for anything before GHC 9.8.

I don't understand. I'm testing it on CI with all GHCs between 8.10 and 9.10 included.

hasufell commented 2 months ago

But I encourage you to switch to the variant package

That doesn't seem possible, because it has very tight base bounds, ruling out support for anything before GHC 9.8.

I don't understand. I'm testing it on CI with all GHCs between 8.10 and 9.10 included.

Ah sorry... I misread base 4.9 as 4.19 :)

All good.