haskell-streaming / streaming-bytestring

effectful sequences of bytes; an alternative no-lazy-io implementation of Data.ByteString.Lazy
BSD 3-Clause "New" or "Revised" License
16 stars 11 forks source link

GHC 9.4.4 compat and try to also test 9.2 #68

Closed vdukhovni closed 1 year ago

vdukhovni commented 1 year ago
fosskers commented 1 year ago

Ideally we'd like to support down to 7.10 since this is a somewhat low-level library, but when is the right time to say goodbye to such an old version?

vdukhovni commented 1 year ago

Ideally we'd like to support down to 7.10 since this is a somewhat low-level library, but when is the right time to say goodbye to such an old version?

I'd love to drop 7.10 support entirely, but for that I think we'd need a major version bump, so that any remaining 7.10 users don't accidentally use the new package. I was trying to avoid bumping to 0.3.

It should be possible to get 7.10.3 tests to run (Ubuntu 18.04 and hvr ppa GHC, if you know how...)

fosskers commented 1 year ago

I'm a bit nervous about ignoring the 7.10 tests entirely, since this CI is our last line of defence there. I doubt anyone is regularly checking 7.10, otherwise (other than the theoretical N users who actively need it).

vdukhovni commented 1 year ago

I'm a bit nervous about ignoring the 7.10 tests entirely, since this CI is our last line of defence there. I doubt anyone is regularly checking 7.10, otherwise (other than the theoretical N users who actively need it).

Note that I've not removed tests with 7.10, they were already absent. I just dropped the claim in the .cabal file that we're doing the testing.

In terms of 7.10 CI, I got pretty close, with Ubuntu 8.10 and older cabal + stack, GHC actually installed and ran, but failed to interoperate with the linker because of default -fPIE. This can be resolved (either install the hvr ppa when testing 7.10, or perhaps it is possible to use "-fno-pie" in GHC's settings, or command-line. I ran out of energy to pursue this...

fosskers commented 1 year ago

Note that I've not removed tests with 7.10, they were already absent.

Oh geez, you're right. Forgive my accusation. In that case I'm happy with this.

vdukhovni commented 1 year ago

Note that I've not removed tests with 7.10, they were already absent.

Oh geez, you're right. Forgive my accusation. In that case I'm happy with this.

Thanks. I looked over the changes, and while tightening the PVP bounds I had originally dropped the conditional semigroups dependency that seems needed for 7.10. I just put it back. This should be it I hope.

fosskers commented 1 year ago

Let me quickly check manually with LTS-6 (7.10).

fosskers commented 1 year ago

Cool.

ghc: panic! (the 'impossible' happened)
  (GHC version 7.10.3 for x86_64-unknown-linux):
        Prelude.chr: bad argument: 3179719811

Is 7.10 just too ancient by this point?

vdukhovni commented 1 year ago

Cool.

ghc: panic! (the 'impossible' happened)
  (GHC version 7.10.3 for x86_64-unknown-linux):
        Prelude.chr: bad argument: 3179719811

Is 7.10 just too ancient by this point?

It is rather outdated, but it surely used to work, on sufficiently ancient OS versions, ... What were you compiling? This PR? On what OS? ...

The relevant code in 7.10 libraries/base/GHC/Char.hs is:

-- | The 'Prelude.toEnum' method restricted to the type 'Data.Char.Char'.
chr :: Int -> Char
chr i@(I# i#)
 | isTrue# (int2Word# i# `leWord#` 0x10FFFF##) = C# (chr# i#)
 | otherwise
    = error ("Prelude.chr: bad argument: " ++ showSignedInt (I# 9#) i "")

So something tried to create an out-of-range character, but we don't have a stack trace to know what. Many packages have abandoned GHC 7, all that's needed is a major version bump, which then also delays adoption by packages with tight PVP bounds, so best avoided, but sometimes there's no choice...

I think that it would not be too hard to get the CI to go, if you can mimmic a good example of get the hvr ppa ghc installed, but it also could be another dead end...

fosskers commented 1 year ago

I was trying to compile this PR.

I'm personally fine with dropping official 7.10 support. Should we first do a quick call-out to the various communication channels to see who would be affected?

vdukhovni commented 1 year ago

We could ask on haskell-cafe. Mostly, nobody should be affected if we bump the major number, presumably they've learned to set PVP bounds to ensure they'll still use an older release. So I don't think we need to bother anyone really. It just means that users pinned to 0.2 will not get the GHC 9.4.4 compat fixes until they switch to 0.3. Such is life.

I would also suggest reaching opening a pull request against stackage to bump the version of streaming-bytestring there, once this PR lands.

Or, if you're truly inspired, figure out how to make github CI go with GHC 7.10 on Ubuntu 18, with an oldish stack + cabal, and the hvr ppas.

fosskers commented 1 year ago

Let's:

vdukhovni commented 1 year ago

Sure, no objections. The lower bounds for various packages were chosen to be compatible with the stack LTS for GHC 7.10.3. Indeed base and a few others could be raised.

fosskers commented 1 year ago

Alright, I'll ask around. Thanks for doing the testing for this.