-
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
[master] Don't fill ForeignPtrContents field with bottom #284
Conversation
As noted in GHC #17290, ForeignPtrContents really should be strict. With the addition of the FinalPtr constructor we now have a sensible value to use in nullForeignPtr other than bottom. Moreover, another unrelated GHC change (#17760) recently forced the application of strictness for ForeignPtr's ForeignPtrContents field. Consequently, we are making this change now. Unfortunately this means that all earlier versions of bytestring will be unbuilable with GHC >=9.0.
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.
Unfortunately this
means that all earlier versions of bytestring will be unbuilable with
GHC >=9.0.
This doesn't sound very problematic to me. The vast majority of users probably just use the bytestring
version that is bundled with GHC. A few others may use a more recent version. I don't see why anyone would want to use an older bytestring
version.
LGTM. |
Would it be possible to backport this change of few lines and making a minor release This would at least make this transition 0.10 -> 0.11 a bit less painful. |
I think this could be done. It takes just a bit of effort.
Can you say more about the pain? Why do you need to build an old |
Thanks to PVP there are a whole bunch of packages on hackage that have dependencies along those lines:
If I depend on such a package I will no longer be able to use it together with ghc-9 despite that it would work just fine with new base. I am just being realistic, it will take on the order of months or even years for many packages to update their upper bounds on But, if we allow building older bytestring with newer ghc, we will at least let those packages to still be usable. |
@lehins good idea! I think it can even go as a patch release 0.10.12.1, because there is no behaviour change for GHC < 9.0. But let's postpone it until GHC 9.0 is certainly released, just in case of any additional breaking changes. |
Yeah, postponing is a good idea, it will also give a bit more motivation for library maintainers to actually put some effort into updating bounds for their packages ;)
Only thing against that version I have is inability to specify such version difference with CPP with respect to 0.10.12.0, which can be very useful in this particular situation that deals with compatibility. |
A minor compat release after GHC 9.0 sounds like a reasonable idea to me. 👍 |
As noted in GHC #17290, ForeignPtrContents really should be strict.
With the addition of the FinalPtr constructor we now have a
sensible value to use in nullForeignPtr other than bottom.
Moreover, another unrelated GHC change (#17760) recently forced
the application of strictness for ForeignPtr's ForeignPtrContents
field. Consequently, we are making this change now. Unfortunately this
means that all earlier versions of bytestring will be unbuilable with
GHC >=9.0.