Skip to content

Commit 10fa6ee

Browse files
authored
Merge branch 'master' into cache-semantic-lookup
2 parents 4614d82 + 3ba3f38 commit 10fa6ee

File tree

3 files changed

+101
-80
lines changed

3 files changed

+101
-80
lines changed

ghcide/src/Development/IDE/Core/Rules.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,16 +1116,16 @@ getLinkableRule recorder =
11161116
HiFileResult{hirModIface, hirModDetails, hirCoreFp} <- use_ GetModIface f
11171117
let obj_file = ml_obj_file (ms_location ms)
11181118
core_file = ml_core_file (ms_location ms)
1119-
-- Can't use `GetModificationTime` rule because the core file was possibly written in this
1120-
-- very session, so the results aren't reliable
1121-
core_t <- liftIO $ getModTime core_file
11221119
case hirCoreFp of
1123-
Nothing -> error "called GetLinkable for a file without a linkable"
1120+
Nothing -> error $ "called GetLinkable for a file without a linkable: " ++ show f
11241121
Just (bin_core, fileHash) -> do
11251122
session <- use_ GhcSessionDeps f
11261123
linkableType <- getLinkableType f >>= \case
1127-
Nothing -> error "called GetLinkable for a file which doesn't need compilation"
1124+
Nothing -> error $ "called GetLinkable for a file which doesn't need compilation: " ++ show f
11281125
Just t -> pure t
1126+
-- Can't use `GetModificationTime` rule because the core file was possibly written in this
1127+
-- very session, so the results aren't reliable
1128+
core_t <- liftIO $ getModTime core_file
11291129
(warns, hmi) <- case linkableType of
11301130
-- Bytecode needs to be regenerated from the core file
11311131
BCOLinkable -> liftIO $ coreFileToLinkable linkableType (hscEnv session) ms hirModIface hirModDetails bin_core (posixSecondsToUTCTime core_t)

haskell-language-server.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ common retrie
532532
cpp-options: -Dhls_retrie
533533

534534
library hls-retrie-plugin
535-
import: defaults, warnings
535+
import: defaults, pedantic, warnings
536536
exposed-modules: Ide.Plugin.Retrie
537537
hs-source-dirs: plugins/hls-retrie-plugin/src
538538
build-depends:
@@ -562,7 +562,7 @@ library hls-retrie-plugin
562562
DataKinds
563563

564564
test-suite hls-retrie-plugin-tests
565-
import: defaults, test-defaults, warnings
565+
import: defaults, pedantic, test-defaults, warnings
566566
type: exitcode-stdio-1.0
567567
hs-source-dirs: plugins/hls-retrie-plugin/test
568568
main-is: Main.hs

0 commit comments

Comments
 (0)