Skip to content

Commit da65845

Browse files
committed
surface the problem
1 parent 3668683 commit da65845

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import Development.IDE.Import.DependencyInformation
4949
import Development.IDE.Types.Diagnostics
5050
import Development.IDE.Types.Location
5151
import Development.IDE.Types.Options
52+
import GHC.Conc.Sync (unsafeIOToSTM)
5253
import HieDb.Create (deleteMissingRealFiles)
5354
import Ide.Logger (Pretty (pretty),
5455
Priority (Info),
@@ -246,11 +247,16 @@ typecheckParentsAction recorder nfp = do
246247
-- independently tracks which files are modified.
247248
setSomethingModified :: VFSModified -> IdeState -> [Key] -> String -> IO ()
248249
setSomethingModified vfs state keys reason = do
250+
L.logDebug (Shake.ideLogger state) "begin restartShakeSession"
249251
-- Update database to remove any files that might have been renamed/deleted
250252
atomically $ do
253+
unsafeIOToSTM $ L.logDebug (Shake.ideLogger state) "begin writing indexQueue"
251254
writeTQueue (indexQueue $ hiedbWriter $ shakeExtras state) (\withHieDb -> withHieDb deleteMissingRealFiles)
255+
unsafeIOToSTM $ L.logDebug (Shake.ideLogger state) "begin writing dirtyKeys"
252256
modifyTVar' (dirtyKeys $ shakeExtras state) $ \x ->
253257
foldl' (flip insertKeySet) x keys
258+
259+
L.logDebug (Shake.ideLogger state) "setSomethingModified before restartShakeSession"
254260
void $ restartShakeSession (shakeExtras state) vfs reason []
255261

256262
registerFileWatches :: [String] -> LSP.LspT Config IO Bool

plugins/hls-refactor-plugin/test/Main.hs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ tests :: TestTree
7171
tests =
7272
testGroup "refactor"
7373
[ initializeTests
74-
, codeActionTests
75-
, codeActionHelperFunctionTests
76-
, completionTests
74+
-- , codeActionTests
75+
-- , codeActionHelperFunctionTests
76+
-- , completionTests
7777
]
7878

7979
initializeTests :: TestTree
@@ -99,7 +99,9 @@ initializeTests = withResource acquire release tests
9999
mapM_ (\e -> any (\o -> T.isSuffixOf e o) commands @? show (expected, show commands)) expected
100100

101101
acquire :: IO (TResponseMessage Method_Initialize)
102-
acquire = run initializeResponse
102+
acquire = do
103+
-- liftIO $ sleep 0.01
104+
run initializeResponse
103105

104106
release :: TResponseMessage Method_Initialize -> IO ()
105107
release = mempty

0 commit comments

Comments
 (0)