@@ -34,7 +34,6 @@ module Development.IDE.Core.Rules(
34
34
getParsedModuleRule ,
35
35
getParsedModuleWithCommentsRule ,
36
36
getLocatedImportsRule ,
37
- getDependencyInformationRule ,
38
37
reportImportCyclesRule ,
39
38
typeCheckRule ,
40
39
getDocMapRule ,
@@ -209,7 +208,7 @@ toIdeResult = either (, Nothing) (([],) . Just)
209
208
-- Does not include the file itself.
210
209
getDependencies :: NormalizedFilePath -> Action (Maybe [NormalizedFilePath ])
211
210
getDependencies file =
212
- fmap transitiveModuleDeps . (`transitiveDeps` file) <$> use_ GetDependencyInformation file
211
+ fmap transitiveModuleDeps . (`transitiveDeps` file) <$> useNoFile_ GetModuleGraph
213
212
214
213
getSourceFileSource :: NormalizedFilePath -> Action BS. ByteString
215
214
getSourceFileSource nfp = do
@@ -521,16 +520,10 @@ rawDependencyInformation fs = do
521
520
dropBootSuffix :: FilePath -> FilePath
522
521
dropBootSuffix hs_src = reverse . drop (length @ [] " -boot" ) . reverse $ hs_src
523
522
524
- getDependencyInformationRule :: Recorder (WithPriority Log ) -> Rules ()
525
- getDependencyInformationRule recorder =
526
- define (cmapWithPrio LogShake recorder) $ \ GetDependencyInformation file -> do
527
- rawDepInfo <- rawDependencyInformation [file]
528
- pure ([] , Just $ processDependencyInformation rawDepInfo)
529
-
530
523
reportImportCyclesRule :: Recorder (WithPriority Log ) -> Rules ()
531
524
reportImportCyclesRule recorder =
532
525
define (cmapWithPrio LogShake recorder) $ \ ReportImportCycles file -> fmap (\ errs -> if null errs then ([] , Just () ) else (errs, Nothing )) $ do
533
- DependencyInformation {.. } <- use_ GetDependencyInformation file
526
+ DependencyInformation {.. } <- useNoFile_ GetModuleGraph
534
527
let fileId = pathToId depPathIdMap file
535
528
case IntMap. lookup (getFilePathId fileId) depErrorNodes of
536
529
Nothing -> pure []
@@ -1224,7 +1217,6 @@ mainRule recorder RulesConfig{..} = do
1224
1217
getParsedModuleRule recorder
1225
1218
getParsedModuleWithCommentsRule recorder
1226
1219
getLocatedImportsRule recorder
1227
- getDependencyInformationRule recorder
1228
1220
reportImportCyclesRule recorder
1229
1221
typeCheckRule recorder
1230
1222
getDocMapRule recorder
0 commit comments