1
1
mirror of https://github.com/anoma/juvix.git synced 2024-11-30 05:42:26 +03:00

Remove checking for module fragility (#2777)

* Closes #2773
This commit is contained in:
Łukasz Czajka 2024-05-13 23:01:43 +02:00 committed by GitHub
parent dc8ac00e0a
commit 66d5b258a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 9 deletions

View File

@ -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
}

View File

@ -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
}