-
-
Notifications
You must be signed in to change notification settings - Fork 390
Two recompilation avoidance related bug fixes #3452
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
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.
Can't really judge the change itself, but one comment
Do we definitely want to include the mitigation for issue 2? would it be better to just fix in GHC and let it be in the next minor 9.4 release? |
It is unlikely to be fixed in a minor GHC release because the simplest way to perform the fix involves an API change. |
That's a shame :( |
filePathMap = unsafePerformIO $ newIORef HashMap.empty | ||
{-# NOINLINE filePathMap #-} | ||
|
||
shareFilePath :: FilePath -> FilePath |
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.
This and shareUsages
are actually called in IO
, so we could just have them be in IO
and have slightly less unsafety.
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.
I moved shareFilePath
to a different module, and I think it makes sense for it to be pure so that it can be used in other places in the future.
I've tried this MR and I can confirm that HLS is way faster and seems to not rebuild multiple files at each changes. However, some files are failing with:
Because And any change in any file which appears in my workspace error log with such error does not seem to be taken into account anymore in files which are depending on them. |
d7efbc3
to
ff7d8ed
Compare
Thanks, I've fixed this. |
Thank you. I've tested and it is fast like it had never been before AND it does not fail like described above. I'm pushing the fix in production tomorrow, I'll tell you if developers are happy or grumpy ;) |
ff7d8ed
to
c918470
Compare
1. Recompilation avoidance regresses in GHC 9.4 due to interactions between GHC and HLS's implementations. Avoid this by filtering out the information that causes the conflict See https://gitlab.haskell.org/ghc/ghc/-/issues/22744. 2. The recompilation avoidance info GHC stores in interfaces can blow up to be extremely large when deserialised from disk. See https://gitlab.haskell.org/ghc/ghc/-/issues/22744 Deduplicate these filepaths.
1c6601d
to
ae6ea9b
Compare
1. Recompilation avoidance regresses in GHC 9.4 due to interactions between GHC and HLS's implementations. Avoid this by filtering out the information that causes the conflict See https://gitlab.haskell.org/ghc/ghc/-/issues/22744. 2. The recompilation avoidance info GHC stores in interfaces can blow up to be extremely large when deserialised from disk. See https://gitlab.haskell.org/ghc/ghc/-/issues/22744 Deduplicate these filepaths. (cherry picked from commit 00f4e61)
1. Recompilation avoidance regresses in GHC 9.4 due to interactions between GHC and HLS's implementations. Avoid this by filtering out the information that causes the conflict See https://gitlab.haskell.org/ghc/ghc/-/issues/22744. 2. The recompilation avoidance info GHC stores in interfaces can blow up to be extremely large when deserialised from disk. See https://gitlab.haskell.org/ghc/ghc/-/issues/22744 Deduplicate these filepaths.
Recompilation avoidance regresses in GHC 9.4 due to interactions between GHC and HLS's implementations.
Avoid this by filtering out the information that causes the conflict
See Recompilation avoidance in GHC 9.4 conflicts with recompilation avoidance in HLS #3450.
The recompilation avoidance info GHC stores in interfaces can blow up to be
extremely large when deserialised from disk. See https://gitlab.haskell.org/ghc/ghc/-/issues/22744
Deduplicate these filepaths.