File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
ghcide/session-loader/Development/IDE Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -135,20 +135,21 @@ runWithDb fp k = do
135135 `catch` \ IncompatibleSchemaVersion {} -> removeFile fp
136136 withHieDb fp $ \ writedb -> do
137137 initConn writedb
138- -- Clear the index of any files that might have been deleted since the last run
139- deleteMissingRealFiles writedb
140- _ <- garbageCollectTypeNames writedb
141138 chan <- newTQueueIO
142139 withAsync (writerThread writedb chan) $ \ _ -> do
143140 withHieDb fp (flip k chan)
144141 where
145- writerThread db chan = forever $ do
146- k <- atomically $ readTQueue chan
147- k db
148- `catch` \ e@ SQLError {} -> do
149- hPutStrLn stderr $ " SQLite error in worker, ignoring: " ++ show e
150- `catchAny` \ e -> do
151- hPutStrLn stderr $ " Uncaught error in database worker, ignoring: " ++ show e
142+ writerThread db chan = do
143+ -- Clear the index of any files that might have been deleted since the last run
144+ deleteMissingRealFiles db
145+ _ <- garbageCollectTypeNames db
146+ forever $ do
147+ k <- atomically $ readTQueue chan
148+ k db
149+ `catch` \ e@ SQLError {} -> do
150+ hPutStrLn stderr $ " SQLite error in worker, ignoring: " ++ show e
151+ `catchAny` \ e -> do
152+ hPutStrLn stderr $ " Uncaught error in database worker, ignoring: " ++ show e
152153
153154
154155getHieDbLoc :: FilePath -> IO FilePath
You can’t perform that action at this time.
0 commit comments