streamly icon indicating copy to clipboard operation
streamly copied to clipboard

GHC 9.12 compatiblity

Open locallycompact opened this issue 1 year ago • 1 comments

Trying to build streamly against the 9.12 pre-release here:

https://gitlab.horizon-haskell.net/package-sets/horizon-platform/-/jobs/1466085

Fails with:

streamly-core>     • No instance for ‘Enum IoSubSystem’ arising from a use of ‘toEnum’
streamly-core>     • In the first argument of ‘(<$>)’, namely ‘toEnum’
streamly-core>       In the second argument of ‘(>>)’, namely ‘toEnum <$> peekAt i arr’
streamly-core>       In the expression:
streamly-core>         checkBounds
streamly-core>           "peek IoSubSystem" (i + sizeOf (Proxy :: Proxy IoSubSystem)) arr
streamly-core>           >> toEnum <$> peekAt i arr
streamly-core>     |
streamly-core> 466 |         >> toEnum <$> peekAt i arr
streamly-core>     |            ^^^^^^
streamly-core> src/Streamly/Internal/Data/Unbox.hs:472:26: error: [8;;https://errors.haskell.org/messages/GHC-39999GHC-399998;;]
streamly-core>     • No instance for ‘Enum IoSubSystem’
streamly-core>         arising from a use of ‘fromEnum’
streamly-core>     • In the third argument of ‘pokeAt’, namely ‘(fromEnum a)’
streamly-core>       In the second argument of ‘(>>)’, namely
streamly-core>         ‘pokeAt i arr (fromEnum a)’
streamly-core>       In the expression:
streamly-core>         checkBounds
streamly-core>           "poke IoSubSystem" (i + sizeOf (Proxy :: Proxy IoSubSystem)) arr
streamly-core>           >> pokeAt i arr (fromEnum a)
streamly-core>     |
streamly-core> 472 |         >> pokeAt i arr (fromEnum a)
streamly-core>     |                          ^^^^^^^^
streamly-core> [ 30 of 103] Compiling Streamly.Internal.Data.Unfold.Type ( src/Streamly/Internal/Data/Unfold/Type.hs, dist/build/Streamly/Internal/Data/Unfold/Type.o, dist/build/Streamly/Internal/Data/Unfold/Type.dyn_o )
streamly-core> [ 31 of 103] Compiling Streamly.Internal.Data.Unfold.Enumeration ( src/Streamly/Internal/Data/Unfold/Enumeration.hs, dist/build/Streamly/Internal/Data/Unfold/Enumeration.o, dist/build/Streamly/Internal/Data/Unfold/Enumeration.dyn_o )
streamly-core> [ 40 of 103] Compiling Streamly.Internal.System.IO ( src/Streamly/Internal/System/IO.hs, dist/build/Streamly/Internal/System/IO.o, dist/build/Streamly/Internal/System/IO.dyn_o )
streamly-core> <<ghc: 10084587640 bytes, 23 GCs, 20829616/58044144 avg/max bytes residency (4 samples), 1218M in use, 0.001 INIT (0.001 elapsed), 6.001 MUT (4.377 elapsed), 1.165 GC (0.165 elapsed) :ghc>>
error: build of '/nix/store/l0rx5s2vnapz8kb5zfbzixbyzidd4p81-streamly-core-0.2.2.drv' on 'ssh://[email protected]' failed: builder for '/nix/store/l0rx5s2vnapz8kb5zfbzixbyzidd4p81-streamly-core-0.2.2.drv' failed with exit code 1;
       last 10 log lines:
       >           "poke IoSubSystem" (i + sizeOf (Proxy :: Proxy IoSubSystem)) arr
       >           >> pokeAt i arr (fromEnum a)
       >     |
       > 472 |         >> pokeAt i arr (fromEnum a)
       >     |                          ^^^^^^^^
       >
       > [ 30 of 103] Compiling Streamly.Internal.Data.Unfold.Type ( src/Streamly/Internal/Data/Unfold/Type.hs, dist/build/Streamly/Internal/Data/Unfold/Type.o, dist/build/Streamly/Internal/Data/Unfold/Type.dyn_o )
       > [ 31 of 103] Compiling Streamly.Internal.Data.Unfold.Enumeration ( src/Streamly/Internal/Data/Unfold/Enumeration.hs, dist/build/Streamly/Internal/Data/Unfold/Enumeration.o, dist/build/Streamly/Internal/Data/Unfold/Enumeration.dyn_o )
       > [ 40 of 103] Compiling Streamly.Internal.System.IO ( src/Streamly/Internal/System/IO.hs, dist/build/Streamly/Internal/System/IO.o, dist/build/Streamly/Internal/System/IO.dyn_o )
       > <<ghc: 10084587640 bytes, 23 GCs, 20829616/58044144 avg/max bytes residency (4 samples), 1218M in use, 0.001 INIT (0.001 elapsed), 6.001 MUT (4.377 elapsed), 1.165 GC (0.165 elapsed) :ghc>>
       For full logs, run 'nix log /nix/store/l0rx5s2vnapz8kb5zfbzixbyzidd4p81-streamly-core-0.2.2.drv'.
error: builder for '/nix/store/l0rx5s2vnapz8kb5zfbzixbyzidd4p81-streamly-core-0.2.2.drv' failed with exit code 1;
       last 25 log lines:
       >         checkBounds
       >           "peek IoSubSystem" (i + sizeOf (Proxy :: Proxy IoSubSystem)) arr
       >           >> toEnum <$> peekAt i arr
       >     |
       > 466 |         >> toEnum <$> peekAt i arr
       >     |            ^^^^^^
       >
       > src/Streamly/Internal/Data/Unbox.hs:472:26: error: [8;;https://errors.haskell.org/messages/GHC-39999GHC-399998;;]
       >     • No instance for ‘Enum IoSubSystem’
       >         arising from a use of ‘fromEnum’
       >     • In the third argument of ‘pokeAt’, namely ‘(fromEnum a)’
       >       In the second argument of ‘(>>)’, namely
       >         ‘pokeAt i arr (fromEnum a)’
       >       In the expression:
       >         checkBounds
       >           "poke IoSubSystem" (i + sizeOf (Proxy :: Proxy IoSubSystem)) arr
       >           >> pokeAt i arr (fromEnum a)
       >     |
       > 472 |         >> pokeAt i arr (fromEnum a)
       >     |                          ^^^^^^^^
       >
       > [ 30 of 103] Compiling Streamly.Internal.Data.Unfold.Type ( src/Streamly/Internal/Data/Unfold/Type.hs, dist/build/Streamly/Internal/Data/Unfold/Type.o, dist/build/Streamly/Internal/Data/Unfold/Type.dyn_o )
       > [ 31 of 103] Compiling Streamly.Internal.Data.Unfold.Enumeration ( src/Streamly/Internal/Data/Unfold/Enumeration.hs, dist/build/Streamly/Internal/Data/Unfold/Enumeration.o, dist/build/Streamly/Internal/Data/Unfold/Enumeration.dyn_o )
       > [ 40 of 103] Compiling Streamly.Internal.System.IO ( src/Streamly/Internal/System/IO.hs, dist/build/Streamly/Internal/System/IO.o, dist/build/Streamly/Internal/System/IO.dyn_o )
       > <<ghc: 10084587640 bytes, 23 GCs, 20829616/58044144 avg/max bytes residency (4 samples), 1218M in use, 0.001 INIT (0.001 elapsed), 6.001 MUT (4.377 elapsed), 1.165 GC (0.165 elapsed) :ghc>>
       For full logs, run 'nix log /nix/store/l0rx5s2vnapz8kb5zfbzixbyzidd4p81-streamly-core-0.2.2.drv'.
error: 1 dependencies of derivation '/nix/store/jkjk9nlimqfj9p2zgyv58bwanqqajfvd-streamly-0.10.1.drv' failed to build

locallycompact avatar Oct 04 '24 11:10 locallycompact

See: https://github.com/composewell/streamly/pull/2872 Also, see: https://github.com/composewell/streamly/issues/2873

adithyaov avatar Oct 17 '24 21:10 adithyaov

@locallycompact The master branch of streamly now builds with 9.12-alpha. See the 9.12-alpha CI.

adithyaov avatar Nov 01 '24 07:11 adithyaov

Great! Thanks.

locallycompact avatar Nov 01 '24 08:11 locallycompact

Reopening this issue to track the release of 0.10.2 This change will be a part of the 0.10.2 release.

adithyaov avatar Nov 04 '24 10:11 adithyaov

streamly was just removed from Stackage because v0.10.1 isn't compatible with the boot libs of ghc 9.10:

        - streamly < 0 # tried streamly-0.10.1, but its *library* requires hashable >=1.3 && < 1.5 and the snapshot contains hashable-1.5.0.0
        - streamly < 0 # tried streamly-0.10.1, but its *library* requires template-haskell >=2.14 && < 2.22 and the snapshot contains template-haskell-2.22.0.0

ysangkok avatar Dec 10 '24 23:12 ysangkok

Yeah. Also facing the template Haskell issue. As an aside when we'll 0.10 be pushed to package?

mchav avatar Jan 17 '25 14:01 mchav

streamly-0.11.0 which will release shortly will be compatible with all ghc <= 9.12 I can however revise some constraints on hackage for streamly-0.10

adithyaov avatar Jan 17 '25 15:01 adithyaov

I can however revise some constraints on hackage for streamly-0.10

That would be great. I've just had to add allow-newer: streamly:template-haskell, streamly-core:template-haskell to get Streamly to build with GHC 9.10.1.

georgefst avatar Jan 18 '25 19:01 georgefst

streamly on hackage now supports ghc 9.10 and 9.12 .

harendra-kumar avatar Feb 19 '25 11:02 harendra-kumar