@@ -34,7 +34,6 @@ module Development.IDE.Core.Rules(
3434 getParsedModuleRule ,
3535 getParsedModuleWithCommentsRule ,
3636 getLocatedImportsRule ,
37- getDependencyInformationRule ,
3837 reportImportCyclesRule ,
3938 typeCheckRule ,
4039 getDocMapRule ,
@@ -209,7 +208,7 @@ toIdeResult = either (, Nothing) (([],) . Just)
209208-- Does not include the file itself.
210209getDependencies :: NormalizedFilePath -> Action (Maybe [NormalizedFilePath ])
211210getDependencies file =
212- fmap transitiveModuleDeps . (`transitiveDeps` file) <$> use_ GetDependencyInformation file
211+ fmap transitiveModuleDeps . (`transitiveDeps` file) <$> useNoFile_ GetModuleGraph
213212
214213getSourceFileSource :: NormalizedFilePath -> Action BS. ByteString
215214getSourceFileSource nfp = do
@@ -521,16 +520,10 @@ rawDependencyInformation fs = do
521520 dropBootSuffix :: FilePath -> FilePath
522521 dropBootSuffix hs_src = reverse . drop (length @ [] " -boot" ) . reverse $ hs_src
523522
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-
530523reportImportCyclesRule :: Recorder (WithPriority Log ) -> Rules ()
531524reportImportCyclesRule recorder =
532525 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
534527 let fileId = pathToId depPathIdMap file
535528 case IntMap. lookup (getFilePathId fileId) depErrorNodes of
536529 Nothing -> pure []
@@ -1224,7 +1217,6 @@ mainRule recorder RulesConfig{..} = do
12241217 getParsedModuleRule recorder
12251218 getParsedModuleWithCommentsRule recorder
12261219 getLocatedImportsRule recorder
1227- getDependencyInformationRule recorder
12281220 reportImportCyclesRule recorder
12291221 typeCheckRule recorder
12301222 getDocMapRule recorder
0 commit comments