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.4 #1592

Merged
merged 7 commits into from Oct 27, 2022
Merged

Support GHC-9.4 #1592

merged 7 commits into from Oct 27, 2022

Conversation

TeofilC
Copy link
Contributor

@TeofilC TeofilC commented May 30, 2022

This is an early attempt to get this working with GHC-9.4.1.

At the moment we need to use some patched versions of libraries taken from yesodweb/yesod#1769

There's also an issue with changes to the constraint solver and TypeErrors (upstream issue: https://gitlab.haskell.org/ghc/ghc/-/issues/21677). I've worked around it by applying some TypeApplications.

This is mostly just here to save work for others who want to try using 9.4

@TeofilC TeofilC marked this pull request as draft May 30, 2022 14:01
@TeofilC
Copy link
Contributor Author

TeofilC commented Aug 8, 2022

Now that 9.4 has been released I'll try to tidy this up in the next couple of days

@TeofilC
Copy link
Contributor Author

TeofilC commented Aug 9, 2022

Currently everything builds except servant-auth-swagger and servant-auth-docs as they require doctest to build and afaik that's not been updated to work with 9.4. All the tests that can be compiled pass though.

I feel like the changes to cabal.project should be dropped before merging, but I've left them there for now to ease testing.

@TeofilC TeofilC marked this pull request as ready for review August 9, 2022 10:09
@TeofilC TeofilC force-pushed the ghc-9.4 branch 2 times, most recently from bc792fa to 9c36606 Compare August 9, 2022 10:23
cabal.project Outdated Show resolved Hide resolved
cabal.project Outdated Show resolved Hide resolved
@alpmestan
Copy link
Contributor

@TeofilC Thanks a lot for this. I just allowed CI to run for this branch. I'll try to keep an eye on this PR, let me know when you consider this ready (i.e the doctest business is sorted out etc).

Cheers!

@TeofilC
Copy link
Contributor Author

TeofilC commented Aug 23, 2022

Still waiting on some things but I've updated the overrides and listed the allow-newers

@benz0li
Copy link

benz0li commented Sep 5, 2022

Cross reference: #1608

@ysangkok ysangkok mentioned this pull request Sep 6, 2022
cabal.project Outdated Show resolved Hide resolved
@TeofilC
Copy link
Contributor Author

TeofilC commented Oct 7, 2022

Just a quick update on this. We are still waiting on sol/doctest to support 9.4 as well as the postgresql packages to bump bounds.

@TeofilC
Copy link
Contributor Author

TeofilC commented Oct 18, 2022

I've rebased on top of master and updated the cabal.project to use sol/doctest HEAD, which supports 9.4. I have the doctests passing locally now. We are waiting on some hackage releases/ version bumps in order to be able to drop stuff from the cabal.project.

It looks like there is a genuine failure on the ghcjs 8.6 test suite because it doesn't seem to support the type applications syntax that I'm using to fix stuff for 9.4. There's several ways we could fix this:

  1. drop support for ghcjs 8.6
  2. hide the type applications behind CPP, so, it only occurs for GHC 9.4+
  3. try to figure out some way of avoiding this issue without using type applications

@tchoutri
Copy link
Contributor

After some thought, I vote in favour of 2.

@TeofilC
Copy link
Contributor Author

TeofilC commented Oct 18, 2022

I've added a commit that implements that option.

@maksbotan
Copy link
Contributor

I've merged servant-multipart and servant-js PRs, please update this one.

cabal.project Outdated Show resolved Hide resolved
@TeofilC
Copy link
Contributor Author

TeofilC commented Oct 26, 2022

I'll take a look at the doctest failures tomorrow

Copy link
Contributor

@maksbotan maksbotan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like CI for 9.4 failed

@TeofilC
Copy link
Contributor Author

TeofilC commented Oct 27, 2022

The doctest failures are caused by GHC's error output changing.

It used to produce message that start with Could not deduce but now they start with Could not solve.

I'm going to update the tests to just expect Could not as that's common to both and still ensures that some sort of error's been triggered. See 86c61c6

@maksbotan maksbotan merged commit d5b9cbf into haskell-servant:master Oct 27, 2022
@maksbotan
Copy link
Contributor

Thanks!

Published Hackage revisions:

  • servant-client-core
  • servant-client
  • servant-auth-client
  • servant-auth-docs
  • servant-auth-server
  • servant-auth-swagger
  • servant-docs
  • servant-foreign
  • servant-http-streams

New versions:

  • servant-server 0.19.2
  • servant 0.19.1

@benz0li
Copy link

benz0li commented Oct 28, 2022

Thank you @TeofilC

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.

None yet

7 participants