@@ -140,7 +140,7 @@ descriptor recorder plId =
140
140
whenUriFile :: Uri -> (NormalizedFilePath -> IO () ) -> IO ()
141
141
whenUriFile uri act = whenJust (uriToFilePath uri) $ act . toNormalizedFilePath'
142
142
143
- {- | Helper function to restart the shake session, specifically for modifying . cabal files.
143
+ {- | Helper function to restart the shake session, specifically for modifying cabal.project files.
144
144
No special logic, just group up a bunch of functions you need for the base
145
145
Notification Handlers.
146
146
@@ -158,9 +158,9 @@ restartCabalShakeSession shakeExtras vfs file actionMsg actionBetweenSession = d
158
158
159
159
cabalRules :: Recorder (WithPriority Log ) -> PluginId -> Rules ()
160
160
cabalRules recorder plId = do
161
- -- Make sure we initialise the cabal files-of-interest.
161
+ -- Make sure we initialise the cabal project files-of-interest.
162
162
ofInterestRules recorder
163
- -- Rule to produce diagnostics for cabal files.
163
+ -- Rule to produce diagnostics for cabal project files.
164
164
define (cmapWithPrio LogShake recorder) $ \ ParseCabalProjectFields file -> do
165
165
config <- getPluginConfigAction plId
166
166
if not (plcGlobalOn config && plcDiagnosticsOn config)
@@ -210,29 +210,28 @@ cabalRules recorder plId = do
210
210
pure (warnDiags, Just projCfg)
211
211
212
212
action $ do
213
- -- Run the cabal kick. This code always runs when 'shakeRestart' is run.
213
+ -- Run the cabal project kick. This code always runs when 'shakeRestart' is run.
214
214
-- Must be careful to not impede the performance too much. Crucial to
215
215
-- a snappy IDE experience.
216
216
kick
217
217
where
218
218
log' = logWith recorder
219
219
220
- {- | This is the kick function for the cabal plugin.
220
+ {- | This is the kick function for the cabal project plugin.
221
221
We run this action, whenever we shake session us run/restarted, which triggers
222
- actions to produce diagnostics for cabal files.
222
+ actions to produce diagnostics for cabal project files.
223
223
224
224
It is paramount that this kick-function can be run quickly, since it is a blocking
225
225
function invocation.
226
226
-}
227
227
kick :: Action ()
228
228
kick = do
229
229
files <- HashMap. keys <$> getCabalFilesOfInterestUntracked
230
- -- let keys = map Types.ParseCabalProjectFile files
231
230
Shake. runWithSignal (Proxy @ " kick/start/cabal-project" ) (Proxy @ " kick/done/cabal-project" ) files Types. ParseCabalProjectFile
232
231
233
232
234
233
-- ----------------------------------------------------------------
235
- -- Cabal file of Interest rules and global variable
234
+ -- Cabal project file of Interest rules and global variable
236
235
-- ----------------------------------------------------------------
237
236
238
237
{- | Cabal files that are currently open in the lsp-client.
0 commit comments