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

Add support for ghc 9.2.5 #88

Merged

Conversation

polemius
Copy link
Contributor

Resolve #87

  • Increase the upper base bound to allow GHC 9.2.4
  • Build on CI with 9.2.4 (but only GHC 9.2.4)
  • Update the instructions
  • Keep the old lower bound so people who forked the course earlier could still build it with GHC 8.10.7
  • Test locally that it still builds with GHC 8.10.7 just in case

@chshersh could you please help me how I could keep the old lower bound for 8.10.7 because with this changes it works only with 9.2.4

Copy link
Member

@chshersh chshersh left a comment

Choose a reason for hiding this comment

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

Looks nice 👍🏻

There's one more remaining change and I'd like to double check this as well but looks solid so far 👌🏻

exercises.cabal Outdated

source-repository head
type: git
location: https://github.com/haskell-beginners-2022/exercises.git

common common-options
build-depends: base ^>= 4.14
build-depends: base ^>= 4.16
Copy link
Member

Choose a reason for hiding this comment

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

This should be a wider constraint to test with both GHC 8.10 and GHC 9.2 (and GHC 9.0 as a consequence)

Suggested change
build-depends: base ^>= 4.16
build-depends: base >= 4.14 && < 4.17

The ^>= 4.16 is syntax sugar for >= 4.16 && < 4.17

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the comment. I have update the versions and checked builds with both 8.10.7 and 9.2.4 versions.

@chshersh chshersh added CI hackotberfest-accepted https://hacktoberfest.com/participation/ labels Oct 21, 2022
@chshersh
Copy link
Member

chshersh commented Nov 9, 2022

From the recent discussion on /r/haskell, it seems that GHC 9.2.4 doesn't really work on Apple Silicon chips with the latest macOS version. And instead, we should use GHC 9.2.5 instead.

I'm not sure if the Haskell GitHub Action automatically supports GHC 9.2.5 but we can try to update and see.

I wasn't aware that GHC 9.2.4 doesn't work everywhere 😞
So I'd prefer to have this course working for everyone to provide smooth experience 🙂

@polemius Would you like to update this PR to support GHC 9.2.5 instead or would you prefer to not invest more of your time into this (which would be totally understandable)?

@chshersh
Copy link
Member

Hey @polemius 👋🏻

Looks GHC 9.2.5 is better supported on various systems and is now even supported by HLS so it should be safe to migrate to it instead.

Would you be still interested in updating this PR to update to GHC 9.2.5?

@polemius
Copy link
Contributor Author

@chshersh Sorry it takes so long. I have updated my PR with 9.2.5 version instead of 9.2.4.

Copy link
Member

@chshersh chshersh left a comment

Choose a reason for hiding this comment

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

Thanks for getting back to this and updating the PR! 🙏🏻

We also need to change stack.yaml here for an LTS that uses GHC 9.2.5. We can take lts-20.9 (and after that we'll also need to cleanup extra-deps in stack.yaml)

resolver: lts-18.21

Otherwise, it's nice to see CI building with GHC 9.2.5 without any code changes 🚀
And don't worry about taking the time 👍🏻

@@ -1,8 +1 @@
packages: .

constraints: hedgehog-classes -aeson -semirings -comonad -vector -primitive
Copy link
Member

Choose a reason for hiding this comment

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

Let's keep this line with constraints. It disables some heavy dependencies and makes the course compilation much faster for the first time 🚀

@@ -62,7 +62,7 @@ jobs:
strategy:
matrix:
stack: ["2.7.5"]
Copy link
Member

Choose a reason for hiding this comment

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

Let's use 2.9.3 here for stack

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@@ -17,7 +17,7 @@ jobs:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
cabal: ["3.6.2.0"]
Copy link
Member

Choose a reason for hiding this comment

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

Let's also update cabal to 3.8.1.0 everywhere

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@chshersh chshersh changed the title Add support for ghc 9.2.4 Add support for ghc 9.2.5 Feb 10, 2023
Copy link
Member

@chshersh chshersh left a comment

Choose a reason for hiding this comment

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

Thanks for the work, @polemius!

I don't know why CI on Windows fails, probably an instance of the following recent incident:

The CI on stack fails with the following error. Some dependencies need to be adjusted.

Error: [S-4804]
       Stack failed to construct a build plan.
       
       While constructing the build plan, Stack encountered the following errors:
       
       In the dependencies for hedgehog-classes-0.2.5.3(-aeson
       -comonad
       -primitive
       -semirings
       -vector):
           hedgehog-1.1.2 from Stack configuration does not match >=1 && <1.1 (latest matching
                          version is 1.0.5)
       needed due to exercises-0.0.0.0 -> hedgehog-classes-0.2.5.3
       
       Some different approaches to resolving this:
       
         * Set 'allow-newer: true'
           in /home/runner/.stack/config.yaml to ignore all version constraints and build anyway.
       
         * Recommended action: try adding the following to your extra-deps
           in /home/runner/work/exercises/exercises/stack.yaml:
       
       - hedgehog-1.0.5@sha256:a14356de69470b7e3966a65cd887c15b168d76ec7892c45cf0e23fea788fdbdc,4533

Also, GHC 9.2.6 was just released which caught me off-guard 😮

In any case, I'll merge this PR and probably move to GHC 9.2.6 later when HLS is available (and when the CI issue will be fixed).

Thanks a lot again! 👏🏻

@chshersh chshersh merged commit 34eed23 into haskell-beginners-2022:main Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI hackotberfest-accepted https://hacktoberfest.com/participation/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support GHC 9.2.5
2 participants