Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove checking for module fragility #2777

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading