[Git][ghc/ghc][wip/jeltsch/module-graph-reuse-in-downsweep] Add round for testing that 'A' is not reached from 'X'
Wolfgang Jeltsch pushed to branch wip/jeltsch/module-graph-reuse-in-downsweep at Glasgow Haskell Compiler / GHC Commits: 50cb937a by Wolfgang Jeltsch at 2026-05-27T17:58:06+03:00 Add round for testing that 'A' is not reached from 'X' - - - - - 2 changed files: - testsuite/tests/ghc-api/downsweep/IncrementalDownsweep.hs - testsuite/tests/ghc-api/downsweep/IncrementalDownsweep.stdout Changes: ===================================== testsuite/tests/ghc-api/downsweep/IncrementalDownsweep.hs ===================================== @@ -76,18 +76,28 @@ main :: IO () main = do libDir : otherArgs <- getArgs runGhc (Just libDir) $ withSimpleErrorHandler $ do + + -- Setup logger <- getLogger originalDynFlags <- getSessionDynFlags (finalDynFlags, _, _) <- parseDynamicFlags logger originalDynFlags $ map noLoc (["-i", "-i" ++ sourceDirectory] ++ otherArgs) _ <- setSessionDynFlags finalDynFlags - intermediateModuleGraph - <- performDownsweepTurn Nothing "A" - liftIO $ outputModuleNamesInGraph intermediateModuleGraph + + -- Turn 1: From scratch, using 'A' as root + moduleGraph1 <- performDownsweepTurn Nothing "A" + liftIO $ outputModuleNamesInGraph moduleGraph1 + + -- Turn 2: From scratch, using 'X' as root + moduleGraph2 <- performDownsweepTurn Nothing "X" + liftIO $ outputModuleNamesInGraph moduleGraph2 + + -- Deletion of the source files used in turn 1 _ <- liftIO $ mapM_ (((sourceDirectory ++ "/") ++) >>> (++ ".hs") >>> removeFile) ["A", "B", "C", "D"] - finalModuleGraph - <- performDownsweepTurn (Just intermediateModuleGraph) "X" - liftIO $ outputModuleNamesInGraph finalModuleGraph + + -- Turn 3: Based on the result of turn 1, using 'X' as root + moduleGraph3 <- performDownsweepTurn (Just moduleGraph1) "X" + liftIO $ outputModuleNamesInGraph moduleGraph3 ===================================== testsuite/tests/ghc-api/downsweep/IncrementalDownsweep.stdout ===================================== @@ -1,2 +1,3 @@ ["A","B","C","D"] +["B","C","D","X","Y","Z"] ["A","B","C","D","X","Y","Z"] View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/50cb937ac2af88f6c197a110902b962c... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/50cb937ac2af88f6c197a110902b962c... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Wolfgang Jeltsch (@jeltsch)