Skip to content

Commit

Permalink
remove the fragile field in stored modules
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcz committed May 13, 2024
1 parent dc8ac00 commit 5ff3f3e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
7 changes: 1 addition & 6 deletions src/Juvix/Compiler/Pipeline/Driver.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down
3 changes: 0 additions & 3 deletions src/Juvix/Compiler/Store/Language.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 5ff3f3e

Please sign in to comment.