This repository was archived by the owner on Oct 7, 2020. It is now read-only.
File tree 3 files changed +22
-1
lines changed
hie-plugin-api/Haskell/Ide/Engine
src/Haskell/Ide/Engine/Transport
3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,12 @@ hie-8.2.2:
18
18
&& cp ~ /.local/bin/hie-8.2.2 ~ /.local/bin/hie-8.2
19
19
.PHONY : hie-8.2.2
20
20
21
+ test :
22
+ stack --stack-yaml=stack-8.0.2.yaml test \
23
+ && stack --stack-yaml=stack-8.2.1.yaml test \
24
+ && stack --stack-yaml=stack.yaml test
25
+ .PHONY : test
26
+
21
27
build-copy-compiler-tool :
22
28
stack --stack-yaml=stack-8.0.2.yaml build --copy-compiler-tool \
23
29
&& stack --stack-yaml=stack-8.2.1.yaml build --copy-compiler-tool \
Original file line number Diff line number Diff line change @@ -130,6 +130,21 @@ withCachedModuleAndData uri noCache callback = do
130
130
cacheModule :: (Monad m , GM. MonadIO m , HasGhcModuleCache m )
131
131
=> FilePath -> CachedModule -> m ()
132
132
cacheModule uri cm = do
133
+ uri' <- liftIO $ canonicalizePath uri
134
+ modifyCache (\ gmc ->
135
+ gmc { uriCaches = Map. insert
136
+ uri'
137
+ (UriCache cm Map. empty)
138
+ (uriCaches gmc)
139
+ }
140
+ )
141
+ where
142
+
143
+ -- | Saves a module to the cache without clearing the associated cache data - use only if you are
144
+ -- sure that the cached data associated with the module doesn't change
145
+ cacheModuleNoClear :: (Monad m , GM. MonadIO m , HasGhcModuleCache m )
146
+ => FilePath -> CachedModule -> m ()
147
+ cacheModuleNoClear uri cm = do
133
148
uri' <- liftIO $ canonicalizePath uri
134
149
modifyCache (\ gmc ->
135
150
gmc { uriCaches = Map. insertWith
Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ updatePositionMap uri changes = pluginGetFile "updatePositionMap: " uri $ \file
257
257
(n2o' <=< newToOld r txt, oldToNew r txt <=< o2n')
258
258
go _ _ = (const Nothing , const Nothing )
259
259
let cm' = cm {newPosToOld = n2o, oldPosToNew = o2n}
260
- cacheModule file cm'
260
+ cacheModuleNoClear file cm'
261
261
return $ IdeResponseOk ()
262
262
Nothing ->
263
263
return $ IdeResponseOk ()
You can’t perform that action at this time.
0 commit comments