-
-
Notifications
You must be signed in to change notification settings - Fork 389
Fix ghc source plugins for GHC 9.2 #3311
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
Conversation
This is supposed to fix ghc source plugins for GHC 9.4 as well, but I couldn't prove that locally. After GHC 9.0, plugins no longer live in DynFlags, but in HscEnv. Thus, we need to make sure to pass the modified HscEnv to the subsequent typechecking and renaming phase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks!
@@ -172,18 +172,18 @@ typecheckModule :: IdeDefer | |||
typecheckModule (IdeDefer defer) hsc tc_helpers pm = do | |||
let modSummary = pm_mod_summary pm | |||
dflags = ms_hspp_opts modSummary | |||
mmodSummary' <- catchSrcErrors (hsc_dflags hsc) "typecheck (initialize plugins)" | |||
(mmodSummary') <- catchSrcErrors (hsc_dflags hsc) "typecheck (initialize plugins)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(mmodSummary') <- catchSrcErrors (hsc_dflags hsc) "typecheck (initialize plugins)" | |
mmodSummary' <- catchSrcErrors (hsc_dflags hsc) "typecheck (initialize plugins)" |
Indeed, I did not see it! Closing this in favour of #3309 |
I'm dying to have this fix and that other PR is stalled. Any chance you can merge this one? |
@m4dc4p In the meantime you can |
This is supposed to fix ghc source plugins for GHC 9.4 as well, but I couldn't prove that locally.
After GHC 9.0, plugins no longer live in DynFlags, but in HscEnv. Thus, we need to make sure to pass the modified HscEnv to the subsequent typechecking phase.
Supposed to fix #2989, let's see whether it works out.
This is likely to have been introduced by #2128 (my bad!)
EDIT:
I am going to write a regression test for thisJust needed to enable the test.