File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
ghcide/src/Development/IDE/Core
plugins/hls-refactor-plugin/test Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ import Development.IDE.Import.DependencyInformation
49
49
import Development.IDE.Types.Diagnostics
50
50
import Development.IDE.Types.Location
51
51
import Development.IDE.Types.Options
52
+ import GHC.Conc.Sync (unsafeIOToSTM )
52
53
import HieDb.Create (deleteMissingRealFiles )
53
54
import Ide.Logger (Pretty (pretty ),
54
55
Priority (Info ),
@@ -246,11 +247,16 @@ typecheckParentsAction recorder nfp = do
246
247
-- independently tracks which files are modified.
247
248
setSomethingModified :: VFSModified -> IdeState -> [Key ] -> String -> IO ()
248
249
setSomethingModified vfs state keys reason = do
250
+ L. logDebug (Shake. ideLogger state) " begin restartShakeSession"
249
251
-- Update database to remove any files that might have been renamed/deleted
250
252
atomically $ do
253
+ unsafeIOToSTM $ L. logDebug (Shake. ideLogger state) " begin writing indexQueue"
251
254
writeTQueue (indexQueue $ hiedbWriter $ shakeExtras state) (\ withHieDb -> withHieDb deleteMissingRealFiles)
255
+ unsafeIOToSTM $ L. logDebug (Shake. ideLogger state) " begin writing dirtyKeys"
252
256
modifyTVar' (dirtyKeys $ shakeExtras state) $ \ x ->
253
257
foldl' (flip insertKeySet) x keys
258
+
259
+ L. logDebug (Shake. ideLogger state) " setSomethingModified before restartShakeSession"
254
260
void $ restartShakeSession (shakeExtras state) vfs reason []
255
261
256
262
registerFileWatches :: [String ] -> LSP. LspT Config IO Bool
Original file line number Diff line number Diff line change @@ -71,9 +71,9 @@ tests :: TestTree
71
71
tests =
72
72
testGroup " refactor"
73
73
[ initializeTests
74
- , codeActionTests
75
- , codeActionHelperFunctionTests
76
- , completionTests
74
+ -- , codeActionTests
75
+ -- , codeActionHelperFunctionTests
76
+ -- , completionTests
77
77
]
78
78
79
79
initializeTests :: TestTree
@@ -99,7 +99,9 @@ initializeTests = withResource acquire release tests
99
99
mapM_ (\ e -> any (\ o -> T. isSuffixOf e o) commands @? show (expected, show commands)) expected
100
100
101
101
acquire :: IO (TResponseMessage Method_Initialize )
102
- acquire = run initializeResponse
102
+ acquire = do
103
+ -- liftIO $ sleep 0.01
104
+ run initializeResponse
103
105
104
106
release :: TResponseMessage Method_Initialize -> IO ()
105
107
release = mempty
You can’t perform that action at this time.
0 commit comments