Skip to content
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

Installation fails with GHC < 8 #80

Closed
ivanperez-keera opened this issue Oct 2, 2021 · 8 comments
Closed

Installation fails with GHC < 8 #80

ivanperez-keera opened this issue Oct 2, 2021 · 8 comments

Comments

@ivanperez-keera
Copy link

ivanperez-keera commented Oct 2, 2021

I recently had to go to GHC 7.10* to compile a game that uses X11, and installation failed due to the change from -fno-warn-unused-binds to -Wno-unused-binds.

This is probably very low priority, but it would be great if the cabal files of X11-1.10* prevented installation with older GHCs so cabal picked X11-1.9.2, which was the latest version that used a flag compatible with GHC 7.10. Alternatively, you could also do:

  if impl(ghc >= 8)
    ghc-options: -Wno-unused-binds
  else
    ghc-options: -fno-warn-unused-binds

although you may not want to have to keep that around for very old, unsupported versions of GHC, which would be perfectly understandable.

*There was an outstanding bug in the GHC 8.* series that made some games break with GHC 8.*.

@slotThe
Copy link
Member

slotThe commented Oct 3, 2021

I think this was bumped because we dropped support for these older GHC versions in xmonad and -contrib. If the name of the flag is really the only reason why X11 does not compile in 7.10 right now, I don't see a reason why we shouldn't make that distinction in the cabal file

@ivanperez-keera
Copy link
Author

With the change above, X11-1.10.1 compiles with GHC 7.10.3 and the game I mentioned above works.

@liskin
Copy link
Member

liskin commented Oct 4, 2021

We can either add the condition or just switch back to only using -fno-warn-* if that's still supported in GHC 9. Would be nice to open a PR that does either and also adds GHC 7.10 to the test matrix. The X11 library is unlikely to see significant changes, so supporting older GHCs shouldn't be a problem.

@ivanperez-keera
Copy link
Author

ivanperez-keera commented Oct 4, 2021

I don't have GHC 9 to try it, but everything in the docs seems to suggest that the syntax is with -W. I see no reference to -fno-warn-* flags anymore.

I can submit a PR including the condition and GHC 7.10 in the matrix.

Does anything need to change in https://github.com/xmonad/X11/blob/master/.github/workflows/haskell-ci.yml#L47-L48? (note: I have zero experience with github actions, which I guess it's what that's for).

@liskin
Copy link
Member

liskin commented Oct 4, 2021

I don't have GHC 9 to try it, but everything in the docs seems to suggest that the syntax is with -W. I see no reference to -fno-warn-* flags anymore.

Those references weren't there in 8.10 docs either and I vaguely remember it still worked, so I'd say the easiest way is to just let the CI check it for us. :-)

Does anything need to change in https://github.com/xmonad/X11/blob/master/.github/workflows/haskell-ci.yml#L47-L48? (note: I have zero experience with github actions, which I guess it's what that's for).

This one's generated automatically from tested-with in .cabal by running haskell-ci regenerate. I can regenerate that for you now that I'm back home with proper internet access.

liskin added a commit to liskin/X11 that referenced this issue Oct 24, 2021
liskin added a commit to liskin/X11 that referenced this issue Oct 24, 2021
-fno-warn still works in current GHC versions and the rest of the X11
package works just fine with GHC <8, at least for now, so let's revert
this to make some users happy.

This reverts commit ec5ccda.

Fixes: xmonad#80
liskin added a commit to liskin/X11 that referenced this issue Oct 24, 2021
This should give us a warning that we need to bump the base lower bounds
if we ever break old GHCs again.

Related: xmonad#80
liskin added a commit to liskin/X11 that referenced this issue Oct 24, 2021
This should give us a warning that we need to bump the base lower bounds
if we ever break old GHCs again.

Related: xmonad#80
@liskin liskin closed this as completed in 2234b1f Oct 24, 2021
@liskin
Copy link
Member

liskin commented Oct 24, 2021

I made a revision on Hackage for both 1.10 and 1.10.1 that bounds base to GHC8+ and I'll now release 1.10.2 that restores compat with GHC7.

@ivanperez-keera
Copy link
Author

Awesome! Thanks!

Sorry that I couldn't submit even a simple PR. It's been a crazy time.

@liskin
Copy link
Member

liskin commented May 5, 2024

FYI: we're dropping GHC 7.10 support at last, but base bound should correctly be bumped now - #105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants