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

Support for ghc-9.0.1 #378

Closed
jneira opened this issue Aug 26, 2021 · 19 comments · Fixed by #389
Closed

Support for ghc-9.0.1 #378

jneira opened this issue Aug 26, 2021 · 19 comments · Fixed by #389
Assignees

Comments

@jneira
Copy link
Member

jneira commented Aug 26, 2021

@Ailrun
Copy link
Member

Ailrun commented Dec 12, 2021

@jaspervdj, is there any news on this? It would be appreciated if we can hear some plans or difficulties.

@jaspervdj jaspervdj self-assigned this Dec 13, 2021
@michaelpj
Copy link
Contributor

Even better if we could get 9.2.1 support as well!

@jaspervdj
Copy link
Member

jaspervdj commented Dec 17, 2021

I started a branch for the jump to 9.2. There's been a fair amount of changes that impact how we use the API. Overall they're improvements so they'll give me an opportunity to clean up some stuff. I expect to finish this in a couple of weeks.

@jaspervdj
Copy link
Member

Currently, all but two of the larger steps (data and module_header) have been ported and seem to work fine using the GHC 9.2 (compiled with GHC 9.0), so getting close. Sorry to take such a long time on this but other stuff (Job/GSoC/ZuriHac/Snowboarding) is keeping me quite busy.

@Mikolaj
Copy link
Member

Mikolaj commented Mar 4, 2022

Is there a branch one compile to have stylish-haskell work with GHC 9.2.1/2?

@jaspervdj
Copy link
Member

Is there a branch one compile to have stylish-haskell work with GHC 9.2.1/2?

@Mikolaj You can try the ghc-9.2 branch. Everything should work fine except the data step which will be skipped.

@Mikolaj
Copy link
Member

Mikolaj commented Mar 7, 2022

Thank you for the hint. I've just tried it, with GHC 9.2.2 and got:

After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: stylish-haskell, ghc-lib-parser-ex,
text, template-haskell, base, ghc-boot, ghc-lib-parser-ex:auto

Not 100% sure it's stylish-haskell's fault. I haven't tried with GHC 9.2.1.

@Mikolaj
Copy link
Member

Mikolaj commented Mar 16, 2022

Thank you! But something weird happened --- newest commits are now from 2013.

@Mikolaj
Copy link
Member

Mikolaj commented Mar 16, 2022

And on branch ghc-9.2 with GHC 9.2.2 I'm still having

~/r/stylish-haskell$ cabal install --minimize-conflict-set
Error: cabal: Could not resolve dependencies:
[__0] trying: stylish-haskell-0.13.0.0 (user goal)
[__1] next goal: text (dependency of stylish-haskell)
[__1] rejecting: text-1.2.5.0/installed-1.2.5.0 (conflict: stylish-haskell =>
bytestring>=0.9 && <0.11, text => bytestring==0.11.3.0/installed-0.11.3.0)
[__1] rejecting: text-2.0 (conflict: stylish-haskell => text>=1.2 && <1.3)
[__1] trying: text-1.2.5.0
[__2] trying: template-haskell-2.18.0.0/installed-2.18.0.0 (dependency of
text)
[__3] trying: ghc-lib-parser-ex-9.2.0.3 (dependency of stylish-haskell)
[__4] trying: ghc-lib-parser-ex:+auto
[__5] next goal: ghc-boot (dependency of ghc-lib-parser-ex +auto)
[__5] rejecting: ghc-boot-9.2.2/installed-9.2.2 (conflict: stylish-haskell =>
bytestring>=0.9 && <0.11, ghc-boot => bytestring==0.11.3.0/installed-0.11.3.0)
[__5] rejecting: ghc-boot-9.2.1 (conflict: template-haskell =>
ghc-boot-th==9.2.2/installed-9.2.2, ghc-boot => ghc-boot-th==9.2.1)
[__5] rejecting: ghc-boot-9.0.1 (conflict: template-haskell =>
base==4.16.1.0/installed-4.16.1.0, ghc-boot => base>=4.7 && <4.16)
[__5] rejecting: ghc-boot-8.8.3, ghc-boot-8.8.1 (conflict: template-haskell =>
base==4.16.1.0/installed-4.16.1.0, ghc-boot => base>=4.11 && <4.14)
[__5] rejecting: ghc-boot-8.6.5, ghc-boot-8.6.4, ghc-boot-8.6.1 (conflict:
template-haskell => base==4.16.1.0/installed-4.16.1.0, ghc-boot => base>=4.10
&& <4.13)
[__5] rejecting: ghc-boot-8.4.4, ghc-boot-8.4.3, ghc-boot-8.4.2,
ghc-boot-8.4.1 (conflict: template-haskell =>
base==4.16.1.0/installed-4.16.1.0, ghc-boot => base>=4.8 && <4.12)
[__5] rejecting: ghc-boot-8.2.2, ghc-boot-8.2.1 (conflict: template-haskell =>
base==4.16.1.0/installed-4.16.1.0, ghc-boot => base>=4.8 && <4.11)
[__5] rejecting: ghc-boot-8.0.2, ghc-boot-8.0.1 (conflict: template-haskell =>
base==4.16.1.0/installed-4.16.1.0, ghc-boot => base>=4.7 && <4.10)
[__5] fail (backjumping, conflict set: ghc-boot, ghc-lib-parser-ex,
stylish-haskell, template-haskell, ghc-lib-parser-ex:auto)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: stylish-haskell, ghc-lib-parser-ex,
template-haskell, text, ghc-boot, base, ghc-lib-parser-ex:auto

@Mikolaj
Copy link
Member

Mikolaj commented Mar 16, 2022

And indeed

~/r/stylish-haskell$ cabal install --minimize-conflict-set --allow-newer

fails with

[ 4 of 26] Compiling Language.Haskell.Stylish.GHC ( lib/Language/Haskell/Stylish/GHC.hs, dist/build/Language/Haskell/Stylish/GHC.o, dist/build/Language/Haskell/Stylish/GHC.dyn_o )

lib/Language/Haskell/Stylish/GHC.hs:71:32: error:
    • Couldn't match expected type ‘GHC.Settings’
                  with actual type ‘ghc-9.2.2:GHC.Settings.Settings’
      NB: ‘GHC.Settings’
            is defined in ‘GHC.Settings’
                in package ‘ghc-lib-parser-9.2.2.20220307’
          ‘ghc-9.2.2:GHC.Settings.Settings’
            is defined in ‘GHC.Settings’ in package ‘ghc-9.2.2’
    • In the first argument of ‘defaultDynFlags’, namely
        ‘GHCEx.fakeSettings’
      In the expression:
        defaultDynFlags GHCEx.fakeSettings GHCEx.fakeLlvmConfig
      In an equation for ‘baseDynFlags’:
          baseDynFlags
            = defaultDynFlags GHCEx.fakeSettings GHCEx.fakeLlvmConfig
   |
71 | baseDynFlags = defaultDynFlags GHCEx.fakeSettings GHCEx.fakeLlvmConfig
   |                                ^^^^^^^^^^^^^^^^^^

@jaspervdj
Copy link
Member

cabal install is working for me. What version of ghc are you using?

@Mikolaj
Copy link
Member

Mikolaj commented Mar 16, 2022

GHC 9.2.2

@jaspervdj
Copy link
Member

@Mikolaj I've published a metadata revision to hackage (and the main branch) that allows bytestring-0.11. Would you mind trying again with that? I got it working using GHC-9.2.1, I haven't been able to try GHC-9.2.2 yet.

@jaspervdj jaspervdj reopened this Mar 17, 2022
@Mikolaj
Copy link
Member

Mikolaj commented Mar 17, 2022

@jaspervdj: but the error #378 (comment) is not a dep version problem, right?

@jaspervdj
Copy link
Member

@Mikolaj correct, but I think the error there is the result of using --allow-newer, which seems to result in a bad mix of ghc-lib-parser and ghc-lib-parser-ex. Can you try it without --allow-newer? I'll look into using the newer versions of those libraries, they should be compatible.

@Mikolaj
Copy link
Member

Mikolaj commented Mar 17, 2022

Makes sense, but sadly I'm getting

~/waste$ cabal update
Downloading the latest package list from hackage.haskell.org
Updated package list of hackage.haskell.org to the index-state 2022-03-17T11:10:50Z
To revert to previous state run:
    cabal v2-update 'hackage.haskell.org,2022-03-16T15:54:09Z'
~/waste$ cabal install stylish-haskell
...
[ 4 of 26] Compiling Language.Haskell.Stylish.GHC ( lib/Language/Haskell/Stylish/GHC.hs, dist/build/Language/Haskell/Stylish/GHC.o, dist/build/Language/Haskell/Stylish/GHC.dyn_o )

lib/Language/Haskell/Stylish/GHC.hs:71:32: error:
    • Couldn't match expected type ‘GHC.Settings’
                  with actual type ‘ghc-9.2.2:GHC.Settings.Settings’
      NB: ‘GHC.Settings’
            is defined in ‘GHC.Settings’
                in package ‘ghc-lib-parser-9.2.2.20220307’
          ‘ghc-9.2.2:GHC.Settings.Settings’
            is defined in ‘GHC.Settings’ in package ‘ghc-9.2.2’
    • In the first argument of ‘defaultDynFlags’, namely
        ‘GHCEx.fakeSettings’
      In the expression:
        defaultDynFlags GHCEx.fakeSettings GHCEx.fakeLlvmConfig
      In an equation for ‘baseDynFlags’:
          baseDynFlags
            = defaultDynFlags GHCEx.fakeSettings GHCEx.fakeLlvmConfig
   |
71 | baseDynFlags = defaultDynFlags GHCEx.fakeSettings GHCEx.fakeLlvmConfig
   |                                ^^^^^^^^^^^^^^^^^^

lib/Language/Haskell/Stylish/GHC.hs:71:51: error:
    • Couldn't match expected type ‘GHC.LlvmConfig’
                  with actual type ‘ghc-9.2.2:GHC.Driver.Session.LlvmConfig’
      NB: ‘GHC.LlvmConfig’
            is defined in ‘GHC.Driver.Session’
                in package ‘ghc-lib-parser-9.2.2.20220307’
          ‘ghc-9.2.2:GHC.Driver.Session.LlvmConfig’
            is defined in ‘GHC.Driver.Session’ in package ‘ghc-9.2.2’
    • In the second argument of ‘defaultDynFlags’, namely
        ‘GHCEx.fakeLlvmConfig’
      In the expression:
        defaultDynFlags GHCEx.fakeSettings GHCEx.fakeLlvmConfig
      In an equation for ‘baseDynFlags’:
          baseDynFlags
            = defaultDynFlags GHCEx.fakeSettings GHCEx.fakeLlvmConfig
   |
71 | baseDynFlags = defaultDynFlags GHCEx.fakeSettings GHCEx.fakeLlvmConfig
   |                                                   ^^^^^^^^^^^^^^^^^^^^

@Mikolaj
Copy link
Member

Mikolaj commented Mar 17, 2022

And the same on a branch called "main", after pulling.

@jaspervdj
Copy link
Member

@Mikolaj I've uploaded a new version that picks dependencies based on what hlint does. Would you mind trying again? I verified this works on a blank ubuntu image with ghc-9.2.2.

@Mikolaj
Copy link
Member

Mikolaj commented Mar 17, 2022

It works. \o/

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

Successfully merging a pull request may close this issue.

5 participants