From 66d5b258a693bc7e975dd87f6a18e0e3a5497159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Czajka?= <62751+lukaszcz@users.noreply.github.com> Date: Mon, 13 May 2024 23:01:43 +0200 Subject: [PATCH] Remove checking for module fragility (#2777) * Closes #2773 --- src/Juvix/Compiler/Pipeline/Driver.hs | 7 +------ src/Juvix/Compiler/Store/Language.hs | 3 --- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/Juvix/Compiler/Pipeline/Driver.hs b/src/Juvix/Compiler/Pipeline/Driver.hs index fdb2426ba9..d80f74527c 100644 --- a/src/Juvix/Compiler/Pipeline/Driver.hs +++ b/src/Juvix/Compiler/Pipeline/Driver.hs @@ -193,12 +193,8 @@ processModule' (EntryIndex entry) = do && info ^. Store.moduleInfoOptions == opts && info ^. Store.moduleInfoFieldSize == entry ^. entryPointFieldSize -> do (changed, mtab) <- processImports'' entry (info ^. Store.moduleInfoImports) - -- We need to check whether any of the recursive imports is fragile, - -- not only the direct ones, because identifiers may be re-exported - -- (with `open public`). - let fragile = any (^. Store.moduleInfoFragile) (mtab ^. Store.moduleTable) if - | changed && fragile -> + | changed -> recompile sha256 absPath | otherwise -> return @@ -236,7 +232,6 @@ processModule'' sha256 entry = over pipelineResult mkModuleInfo <$> processFileT _moduleInfoCoreTable = fromCore (_coreResultModule ^. Core.moduleInfoTable), _moduleInfoImports = map (^. importModulePath) $ scoperResult ^. Scoper.resultParserResult . Parser.resultParserState . parserStateImports, _moduleInfoOptions = StoredOptions.fromEntryPoint entry, - _moduleInfoFragile = Core.moduleIsFragile _coreResultModule, _moduleInfoSHA256 = sha256, _moduleInfoFieldSize = entry ^. entryPointFieldSize } diff --git a/src/Juvix/Compiler/Store/Language.hs b/src/Juvix/Compiler/Store/Language.hs index 1e5c0279d8..77b914b948 100644 --- a/src/Juvix/Compiler/Store/Language.hs +++ b/src/Juvix/Compiler/Store/Language.hs @@ -14,9 +14,6 @@ data ModuleInfo = ModuleInfo _moduleInfoCoreTable :: Core.InfoTable, _moduleInfoImports :: [TopModulePath], _moduleInfoOptions :: Options, - -- | True if any module depending on this module requires recompilation - -- whenever this module is changed - _moduleInfoFragile :: Bool, _moduleInfoSHA256 :: Text, _moduleInfoFieldSize :: Natural }