xmonad / xmonad-contrib

Contributed modules for xmonad

Home Page:https://xmonad.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build errors with ghc-9.6.1 (wrong/redundant imports)

jwaldmann opened this issue · comments

Hi. I am trying cabal install --allow-newer=base --lib with ghc-9.6.1, and I am getting errors due to some exports moving (from Prelude to Control.Monad?). I see that you don't have 9.6 in the CI matrix, so perhaps it's too early. On the other hand, I saw that xmonad/master (not published on hackage) is build-able with 9.6. (NB: I should stay on 9.4 for a while, but I am thinking, if no-one's testing 9.6, then GHC HQ will quickly release 9.8, 9.10, ...)

[ 12 of 310] Compiling XMonad.Actions.CycleRecentWS ( XMonad/Actions/CycleRecentWS.hs, dist/build/XMonad/Actions/CycleRecentWS.o, dist/build/XMonad/Actions/CycleRecentWS.dyn_o )

XMonad/Actions/CycleRecentWS.hs:47:35: error:
    Module ‘Control.Monad.State’ does not export ‘when’
   |
47 | import Control.Monad.State (lift, when)
   |                                   ^^^^

...
[ 92 of 310] Compiling XMonad.Actions.MessageFeedback ( XMonad/Actions/MessageFeedback.hs, dist/build/XMonad/Actions/MessageFeedback.o, dist/build/XMonad/Actions/MessageFeedback.dyn_o )

XMonad/Actions/MessageFeedback.hs:50:39: warning: [-Wunused-imports]
    The import of ‘liftA2’ from module ‘XMonad.Prelude’ is redundant
   |
50 | import XMonad.Prelude       ( isJust, liftA2, void )
   |                                       ^^^^^^
...
[105 of 310] Compiling XMonad.Hooks.DebugEvents ( XMonad/Hooks/DebugEvents.hs, dist/build/XMonad/Hooks/DebugEvents.o, dist/build/XMonad/Hooks/DebugEvents.dyn_o )

XMonad/Hooks/DebugEvents.hs:36:1: warning: [-Wunused-imports]
    The import of ‘Control.Monad.Fail’ is redundant
      except perhaps to import instances from ‘Control.Monad.Fail’
    To import instances alone, use: import Control.Monad.Fail()
   |
36 | import           Control.Monad.Fail
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
[138 of 310] Compiling XMonad.Actions.MostRecentlyUsed ( XMonad/Actions/MostRecentlyUsed.hs, dist/build/XMonad/Actions/MostRecentlyUsed.o, dist/build/XMonad/Actions/MostRecentlyUsed.dyn_o )

XMonad/Actions/MostRecentlyUsed.hs:40:1: warning: [-Wunused-imports]
    The import of ‘Control.Applicative’ is redundant
      except perhaps to import instances from ‘Control.Applicative’
    To import instances alone, use: import Control.Applicative()
   |
40 | import Control.Applicative (liftA2)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...

(and more instances of these)

It's definitely our intention to add 9.6 to the CI matrix ASAP, it's just life that keeps interfering 🙂

Now that setlocale got revbumped, I've added 9.6.1 to the CI.

@jwaldmann contrib should now at least build on 9.6 if you specify --allow-newer=base. All that's left is to cherry-pick the relevant commits, and release 0.17.2 on Hackage.

Oh, interesting, xmonad-contrib 0.17.1 builds for me with 9.6. The changes that made HEAD break were only introduced after the release, which would mean we only have to release xmonad 0.17.2. @jwaldmann can you confirm?

yes, I can cabal install --lib for 635711e

Closing in tandem with xmonad/xmonad#443

https://hackage.haskell.org/package/xmonad-contrib no new releases here, why did you close it?

https://hackage.haskell.org/package/xmonad-contrib no new releases here, why did you close it?

#805 (comment) says that the latest release builds with 9.6 fine and therefore new release isn't strictly necessary. Is that not the case?

Building xmonad-contrib-0.17.1 with ghc-9.6.2 results in this for me:

[ 72 of 308] Compiling XMonad.Hooks.WorkspaceByPos ( XMonad/Hooks/WorkspaceByPos.hs, dist/build/XMonad/Hooks/WorkspaceByPos.o, dist/build/XMonad/Hooks/WorkspaceByPos.dyn_o )

XMonad/Hooks/WorkspaceByPos.hs:29:30: error:
    Module ‘Control.Monad.Except’ does not export ‘lift’
   |
29 | import Control.Monad.Except (lift, runExceptT, throwError)
   |                              ^^^^
[119 of 308] Compiling XMonad.Util.PureX ( XMonad/Util/PureX.hs, dist/build/XMonad/Util/PureX.o, dist/build/XMonad/Util/PureX.dyn_o )

XMonad/Util/PureX.hs:153:10: error: [GHC-88464]
    Variable not in scope: void :: X Any -> X ()
    Suggested fix:
      Perhaps you want to add ‘void’ to the import list in the import of
      ‘XMonad.Prelude’ (XMonad/Util/PureX.hs:56:1-54).
    |
153 | defile = void . windowBracket' getAny
    |          ^^^^

XMonad/Util/PureX.hs:197:15: error: [GHC-88464]
    Variable not in scope: join :: f0 (m a) -> m a
    Suggested fix:
      Perhaps you want to add ‘join’ to the import list in the import of
      ‘XMonad.Prelude’ (XMonad/Util/PureX.hs:56:1-54).
    |
197 | withFocii f = join $ (whenJust' <$> peek) <*> (f <$> curTag)
    |               ^^^^

FWIW I get no errors or warnings with xmonad-contrib-0.17.1 and ghc 9.6.2.

Those aren't GHC 9.6 issues. Those are mtl 2.3 issues, and the deps of xmonad-contrib 0.17.1 were revised to disallow mtl 2.3: https://hackage.haskell.org/package/xmonad-contrib-0.17.1/revisions/
But yeah, it's a good argument for pushing a release I suppose.

I wouldn't be opposed to doing a release soon (a lot has changed!), but—as others have said—this should have been resolved by the revbump

It sounds like they downloaded the tarball from Hackage so they could build offline? But Hackage has this weird immutability thing, you need to manually look for and download the latest revision cabal file (there's a link but it's not that obvious) because it never updates an artifact once uploaded.