Skip to content

Commit 57121eb

Browse files
committed
Fix Eval plugin to use GhcSessionDeps
1 parent b2d45e8 commit 57121eb

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/Ide/Plugin/Eval.hs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -172,25 +172,10 @@ runEvalCmd lsp state EvalParams {..} = response' $ do
172172
contents <- liftIO $ getVirtualFileFunc lsp $ toNormalizedUri _uri
173173
text <- handleMaybe "contents" $ virtualFileText <$> contents
174174

175-
{- Note: GhcSessionDeps
176-
177-
Depending on GhcSession means we do need to reload all the module
178-
dependencies in the GHC session(from interface files, hopefully).
179-
180-
The GhcSessionDeps dependency would allow us to reuse a GHC session preloaded
181-
with all the dependencies. Unfortunately, the ModSummary objects that
182-
GhcSessionDeps puts in the GHC session are not suitable for reuse since they
183-
clear out the timestamps; this is done to avoid internal ghcide bugs and
184-
can probably be relaxed so that plugins like Eval can reuse them. Once that's
185-
done, we want to switch back to GhcSessionDeps:
186-
187-
-- https://github.com/digital-asset/ghcide/pull/694
188-
189-
-}
190175
session <-
191176
liftIO $
192177
runAction "runEvalCmd.ghcSession" state $
193-
use_ GhcSession $ -- See the note on GhcSessionDeps
178+
use_ GhcSessionDeps $
194179
toNormalizedFilePath' $
195180
fp
196181

0 commit comments

Comments
 (0)