-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop 7x #265
Drop 7x #265
Conversation
The simplifications are nice, but I don't currently see sufficient motivation for removing support for all these GHC versions. We could probably use this patch once a good reason for removing support for GHC < 8 comes up though. |
The "good reason" is that with #175 already merged we're no longer backwards compatible with GHC 7.x. Anything that uses |
Lots of packages have features that are unavailable with certain older GHC versions. I've never heard that these would be a particular source of trouble. And any trouble can be safely detected at compile-time too! In other packages that I have contributed to, the usual reason for cutting GHC support for older versions was that continued support would have incurred large maintenance costs. I don't see such problems yet. |
The problem here is that many dependencies may depend on Given even packages that will require > 7.x to use the new |
If a package still suports GHC < 8.0 and depends on
People can either add an upper bound, or drop support of older GHCs, or drop support of older Moreover, there is a lot of packages, which do not rely on internals at all. I guesstimate that the vast majority of BTW I mean, I do not mind to drop support of old GHCs in principle. But it seems that PRs, which we intend to merge in 0.11.0.0, have already bitten the bullet and ironed out all nitty-gritty CPP details to work fine with GHCs back to 7.0. |
Dropping GHC 7.* would enable full migration of CI to GitHub Actions. This might be desirable because of https://www.reddit.com/r/haskell/comments/jvbs49/psa_maintainers_should_think_about_migrating_off/ |
Perhaps needless to say, since I proposed this PR, I agree with this reasoning, and support dropping 7.x in any case, since I see the burden of ongoing support for no-longer supported GHC versions as outweighing the benefit. Supporting 7.x also holds us back from taking full advantage of some key improvements in 8.x and beyond. |
What's the problem with GHC 7.* on GitHub CI? Personally, I still don't feel a large maintenance burden for supporting these old GHC versions in That said, I haven't heard of any demand for continued support for GHC 7 for a while, so I'm not opposed to removing it at this stage. |
The oldest version available there is 7.10. We could probably install older versions by jumping through enough hoops, but I'd rather not. |
Since |
Done. Will attend to CI issues now. |
ed23272
to
9799a96
Compare
Also shed much CPP baggage and a no longer needed FFI helper.
@Bodigrim Looks like CI is going to pass (just FreeBSD left to do), but I'm entirely unfamiliar with GitHub CI, just cargo-culting the prior config. Please suggest changes. In particular is any of the "ghcprep" stuff needed? Can more of the dependency builds be cached? ... Bottom line, feel free to push a fixup commit for the CI bits... |
Thanks for the CI cleanup! |
Once this is merged, only 7 of the source files in |
@sjakobi, in case this saves you some review time, the remaining
Since our minima are |
The odd looking #if (__GLASGOW_HASKELL__ < 802) || (__GLASGOW_HASKELL__ >= 811)
import GHC.Types (Int (..))
#endif should use exactly the same conditions as the associated code? In which case (not due to my PR, but could be improved now), the #if !MIN_VERSION_base(4,10,0)
-- |Advances the given address by the given offset in bytes.
--
-- The new 'ForeignPtr' shares the finalizer of the original,
-- equivalent from a finalization standpoint to just creating another
-- reference to the original. That is, the finalizer will not be
-- called before the new 'ForeignPtr' is unreachable, nor will it be
-- called an additional time due to this call, and the finalizer will
-- be called with the same address that it would have had this call
-- not happened, *not* the new address.
plusForeignPtr :: ForeignPtr a -> Int -> ForeignPtr b
plusForeignPtr (ForeignPtr addr guts) (I# offset) = ForeignPtr (plusAddr# addr offset) guts
{-# INLINE [0] plusForeignPtr #-}
{-# RULES
"ByteString plusForeignPtr/0" forall fp .
plusForeignPtr fp 0 = fp
#-}
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Over 400 lines removed! Awesome! 🎉
@@ -89,7 +55,6 @@ jobs: | |||
run: cabal haddock | |||
|
|||
build-freebsd: | |||
needs: build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can we remove the build
step here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was just a guard to avoid launching the FreeBSD build when other builds fail, it is optional. Not sure why @Bodigrim removed it, but it is optional. Removing it likely makes CI complete faster when all goes well, but this may mean that the FreeBSD build runs even on broken PRs.
Should I open a PR to change the CPP guard for the import of |
Or one of you can do that at your leisure... |
It would be nice, if you have time, but low priority. |
Understood, not sure when I'll get to it, so feel free to bundle the one-liner into any other PR you happen to already be working on, or beat me to opening one just for this change... |
* Drop support for GHC versions before 8.0, base 4.9 Also shed much CPP baggage and a no longer needed FFI helper. * Drop redundant CI jobs * Restore cabal file Co-authored-by: Viktor Dukhovni <[email protected]> Co-authored-by: Bodigrim <[email protected]>
* Drop support for GHC versions before 8.0, base 4.9 Also shed much CPP baggage and a no longer needed FFI helper. * Drop redundant CI jobs * Restore cabal file Co-authored-by: Viktor Dukhovni <[email protected]> Co-authored-by: Bodigrim <[email protected]>
With
bytestring
0.11 no longer fully compatible with GHC prior to 8.0, drop support for GHC 7.x and older, by requiring base >= 4.9.This also makes it possible to shed considerable CPP baggage.