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

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

Closed
jwaldmann opened this issue Mar 20, 2023 · 12 comments
Closed

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

jwaldmann opened this issue Mar 20, 2023 · 12 comments
Assignees
Labels
dependencies Pull requests that update a dependency file

Comments

@jwaldmann
Copy link

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)

@liskin
Copy link
Member

liskin commented Mar 20, 2023

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

@slotThe slotThe self-assigned this Mar 22, 2023
@slotThe slotThe added the dependencies Pull requests that update a dependency file label Mar 22, 2023
slotThe added a commit that referenced this issue Mar 27, 2023
Technically, contrib still does not build with stack, as it forces
xmonad-0.17.0, while only HEAD builds with newer mtl versions.  However,
until our dependencies are at least revbumped, this may be the best we
can do.

Related: #805
slotThe added a commit to slotThe/xmonad-contrib that referenced this issue Mar 28, 2023
+ Regenerate haskell-ci and adjust relevant patches.
  - Remove haskell-ci-dependabot.patch, as it is no longer necessary.

Related: xmonad#805
@slotThe
Copy link
Member

slotThe commented Mar 28, 2023

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.

@slotThe
Copy link
Member

slotThe commented Mar 28, 2023

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?

@jwaldmann
Copy link
Author

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

@slotThe
Copy link
Member

slotThe commented Apr 2, 2023

Closing in tandem with xmonad/xmonad#443

@slotThe slotThe closed this as completed Apr 2, 2023
@l29ah
Copy link
Contributor

l29ah commented Aug 10, 2023

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

@liskin
Copy link
Member

liskin commented Aug 10, 2023

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?

@l29ah
Copy link
Contributor

l29ah commented Aug 10, 2023

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)
    |               ^^^^

@geekosaur
Copy link
Contributor

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

@liskin
Copy link
Member

liskin commented Aug 10, 2023

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.

@slotThe
Copy link
Member

slotThe commented Aug 11, 2023

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

@geekosaur
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

5 participants