File tree 1 file changed +11
-10
lines changed
ghcide/session-loader/Development/IDE
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
135
135
`catch` \ IncompatibleSchemaVersion {} -> removeFile fp
136
136
withHieDb fp $ \ writedb -> do
137
137
initConn writedb
138
- -- Clear the index of any files that might have been deleted since the last run
139
- deleteMissingRealFiles writedb
140
- _ <- garbageCollectTypeNames writedb
141
138
chan <- newTQueueIO
142
139
withAsync (writerThread writedb chan) $ \ _ -> do
143
140
withHieDb fp (flip k chan)
144
141
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
152
153
153
154
154
155
getHieDbLoc :: FilePath -> IO FilePath
You can’t perform that action at this time.
0 commit comments