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 GHC 9.6.4 #203

Merged
merged 4 commits into from
May 15, 2024
Merged

Support GHC 9.6.4 #203

merged 4 commits into from
May 15, 2024

Conversation

istathar
Copy link
Member

@istathar istathar commented Feb 7, 2024

Bump resolver to lts-22.9 which builds against GHC 9.6.4 for testing. Testing with VS Code and haskell-language-server 2.6.0.0 via GHCup.

@istathar istathar self-assigned this Feb 7, 2024
@istathar
Copy link
Member Author

istathar commented Feb 8, 2024

@guaraqe not sure if you're still using core-effect-effectful but when I attempted to upgrade to GHC 9.6.4 and the current Stackage snapshot we got a build error,

core-effect-effectful        > /home/runner/work/unbeliever/unbeliever/core-effect-effectful/lib/Core/Effect/Effectful.hs:204:5: error: [GHC-83865]
core-effect-effectful        >     • Couldn't match expected type: Effect.Eff es α
core-effect-effectful        >                   with actual type: ((forall r. Effect.Eff es0 r -> IO r) -> IO a0)
core-effect-effectful        >                                     -> Effect.Eff es0 a0
core-effect-effectful        >     • Probable cause: ‘($)’ is applied to too few arguments
core-effect-effectful        >       In a stmt of a 'do' block:
core-effect-effectful        >         Effect.withEffToIO
core-effect-effectful        >           $ \ runInIO -> subProgram context1 $ do action $ \ inner -> ...
core-effect-effectful        >       In the expression:
core-effect-effectful        >         do ProgramE context1 <- Effect.getStaticRep
core-effect-effectful        >            Effect.withEffToIO $ \ runInIO -> subProgram context1 $ do ...
core-effect-effectful        >       In an equation for ‘withProgram’:
core-effect-effectful        >           withProgram action
core-effect-effectful        >             = do ProgramE context1 <- Effect.getStaticRep
core-effect-effectful        >                  Effect.withEffToIO $ \ runInIO -> subProgram context1 $ ...
core-effect-effectful        >     • Relevant bindings include
core-effect-effectful        >         action :: (forall β. Effect.Eff es β -> Program τ β) -> Program τ α
core-effect-effectful        >           (bound at lib/Core/Effect/Effectful.hs:198:13)
core-effect-effectful        >         withProgram :: ((forall β. Effect.Eff es β -> Program τ β)
core-effect-effectful        >                         -> Program τ α)
core-effect-effectful        >                        -> Effect.Eff es α
core-effect-effectful        >           (bound at lib/Core/Effect/Effectful.hs:198:1)
core-effect-effectful        >     |
core-effect-effectful        > 204 |     Effect.withEffToIO $ \runInIO ->
core-effect-effectful        >     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
core-effect-effectful        > 

if you have an immediate understanding of what might have broken then a fix would be welcome! Otherwise we'll just comment out the [testing] dependency for now and you can return to if you ever need to.

Disable core-effect-effectful as it is blocking builds at the moment.
@istathar
Copy link
Member Author

I've removed core-effect-effectful from the default build. It's not part of the core set so it can wait on the side until someone has a chance to look into this.

@istathar
Copy link
Member Author

Now it's failing because of HsOpenSSL having an "incompatible pointer type"

HsOpenSSL             > /tmp/stack-3146af9db5b21892/HsOpenSSL-0.11.7.6//tmp/ghc136953_0/ghc_178.c:18:175: error:
HsOpenSSL             >      error: passing argument 4 of ‘DSA_get0_pqg’ from incompatible pointer type [-Wincompatible-pointer-types]
HsOpenSSL             >        18 | void ghczuwrapperZC3ZCHsOpenSSLzm0zi11zi7zi6zmIjQSlutIIqFJA1gCaYa4XgZCOpenSSLziDSAZCDSAzuget0zupqg(void* a1, BIGNUM** a2, BIGNUM** a3, BIGNUM** a4) {DSA_get0_pqg(a1, a2, a3, a4);}
HsOpenSSL             >           |                                                                                                                                                                               ^~
HsOpenSSL             >           |                                                                                                                                                                               |
HsOpenSSL             >           |                                                                                                                                                                               BIGNUM ** {aka struct bignum_st **}
HsOpenSSL             >    |
HsOpenSSL             > 18 | void ghczuwrapperZC3ZCHsOpenSSLzm0zi11zi7zi6zmIjQSlutIIqFJA1gCaYa4XgZCOpenSSLziDSAZCDSAzuget0zupqg(void* a1, BIGNUM** a2, BIGNUM** a3, BIGNUM** a4) {DSA_get0_pqg(a1, a2, a3, a4);}
HsOpenSSL             >    |                                                                                                                                                                               ^
HsOpenSSL             > 

what on earth do we do about that one?

@istathar
Copy link
Member Author

istathar commented May 15, 2024

Looks like this is the issue:

Annoyingly we have to put

ghc-options:
  HsOpenSSL: -optc=-Wno-incompatible-pointer-types

in the stack.yaml of any project that uses our libraries in order for the dependencies to build.

@istathar istathar merged commit ee33ad6 into aesiniath:main May 15, 2024
1 check passed
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 this pull request may close these issues.

1 participant