-
Notifications
You must be signed in to change notification settings - Fork 4
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 #31
Conversation
Thanks! It"s pretty difficult to maintain backwards compatibility in a ghc plugin because the code is so tightly coupled to ghc's api, which can change a lot between versions. I was planning to only support one ghc version until I get enough users that the extra effort starts to seem worthwhile. But if you're willing to do the work to support more than one version, be my guest! In any case, before I can merge this PR, CI must be updated so it tests with ghc-9; and if you want to do the work to support more than one ghc version, then CI should be updated to test both versions. The CI configuration is in https://github.com/gelisam/typelevel-rewrite-rules/blob/main/.github/workflows/ci.yml, and as you can see, it is testing twice using stack and once using cabal. I do that for all my projects; the idea is to use If we start using |
Thx! |
1746b04
to
8b7955c
Compare
I'm trying to figure out why GitHub isn't automatically running CI on this branch. I remember that GitHub is not running actions automatically on all PRs in order to avoid attacks in which a contributor opens a PR which modifies the .github file to make it mine some bitcoins it something. But how do I tell GitHub that this PR is legitimate? |
I don't see the dialog mentioned in GitHub's announcement of the cryptomining protection measures, so that's not the problem. My next hypothesis is that maybe all the github actions are disabled on this repo? On July 1st I received an email telling me that the "CI" GitHub action had been disabled due to inactivity. I assumed this referred to the cron job which I run every month (I specifically run it every month rather than every day so that GitHub doesn't feel pressured to shut it down, but oh well), that PRs would be unaffected, and that the monthly runs would be reactivated next time I merge something in |
As I suspected, Only scheduled workflows are automatically disabled, so that's not it either. I'm running out of ideas... |
For now, ci runs on pr's repo. |
Thanks for finding the CI run. It makes a lot of sense that the error-messages test would fail when switching to a new version of ghc. Those tests are intended to detect regressions in the quality of the error messages, but it's hard to write a predicate which quantifies quality, so in practice I just use a golden file to detect when the error message changes, to make a human read the new error message and confirm that it's as clear as the old error message. In this case, ghc is now splitting the old
Which is obviously fine. To make the test pass, we should thus change the |
@gelisam |
@tscholak do you have time to look at and possibly merge this PR? As you know, I'm quite busy these days :) |
What about |
This PR should be updated for ghc-9.2. |
Thanks for reminding me about this! I'll take a look now. |
It would help, but it only covers a tiny fraction of the GHC API, so it would not eliminate the issue. Looking at the CPP macros in the PR, I don't think it would have helped all that much. The GHC team has already promised to keep the plugins portion of the GHC API more stable than the rest, but since plugins do a wide variety of things, it is common for plugins to reach outside of that stable API. As a result, it is not a surprise that plugins need more work between GHC versions than most libraries. For this reason, I am especially grateful to @junjihashimoto for this PR! |
Unfortunately, there is a regression: https://github.com/gelisam/typelevel-rewrite-rules/pull/35/files#r1136519429 |
Oh wait, the regression only affects ghc-9.2, so I should be able to make a release which supports ghc-9.0! |
Released as typelevel-rewrite-rules-1.0.0.1! |
Thanks! |
We can test this pr with ghc-9, but it breaks backwards compatibility, so I will add
ifdef
ofCPP
-extenstion.