[Git][ghc/ghc][wip/hls-unload-v2] 2 commits: Make the loader level aware
Zubin pushed to branch wip/hls-unload-v2 at Glasgow Haskell Compiler / GHC Commits: 92861ae2 by Zubin Duggal at 2026-08-12T15:47:20+05:30 Make the loader level aware Only load modules which are required to run the splice, i.e those that have a splice time import from the wanted set - - - - - 5165b8b3 by Zubin Duggal at 2026-08-12T15:51:22+05:30 Record artifact hashes in interfaces - - - - - 11 changed files: - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/Downsweep.hs - compiler/GHC/Driver/Main/Passes.hs - compiler/GHC/Driver/Pipeline.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Iface/Recomp.hs - compiler/GHC/Iface/Recomp/Types.hs - compiler/GHC/Linker/Loader.hs - compiler/GHC/Unit/Module/Graph.hs - compiler/GHC/Unit/Module/ModIface.hs - compiler/GHC/Unit/Module/ModSummary.hs Changes: ===================================== compiler/GHC/Driver/Backpack.hs ===================================== @@ -823,7 +823,6 @@ summariseRequirement pn mod_name = do ms_dyn_obj_date = Nothing, ms_iface_date = hi_timestamp, ms_hie_date = hie_timestamp, - ms_bytecode_date = Nothing, ms_srcimps = [], ms_textual_imps = ((,,) NormalLevel NoPkgQual . noLoc) <$> extra_sig_imports, ms_parsed_mod = Just (HsParsedModule { @@ -940,7 +939,6 @@ hsModuleToModSummary home_keys pn hsc_src modname ms_hs_hash = fingerprint0, ms_obj_date = Nothing, -- TODO do this, but problem: hi_timestamp is BOGUS ms_dyn_obj_date = Nothing, -- TODO do this, but problem: hi_timestamp is BOGUS - ms_bytecode_date = Nothing, ms_iface_date = hi_timestamp, ms_hie_date = hie_timestamp } ===================================== compiler/GHC/Driver/Downsweep.hs ===================================== @@ -1502,7 +1502,6 @@ makeNewModSummary hsc_env MakeNewModSummary{..} = do dyn_obj_timestamp <- modificationTimeIfExists (ml_dyn_obj_file_ospath nms_location) hi_timestamp <- modificationTimeIfExists (ml_hi_file_ospath nms_location) hie_timestamp <- modificationTimeIfExists (ml_hie_file_ospath nms_location) - bytecode_timestamp <- modificationTimeIfExists (ml_bytecode_file_ospath nms_location) extra_sig_imports <- findExtraSigImports hsc_env nms_hsc_src pi_mod_name (implicit_sigs, _inst_deps) <- implicitRequirementsShallow (hscSetActiveUnitId (moduleUnitId nms_mod) hsc_env) pi_theimps @@ -1525,7 +1524,6 @@ makeNewModSummary hsc_env MakeNewModSummary{..} = do , ms_hie_date = hie_timestamp , ms_obj_date = obj_timestamp , ms_dyn_obj_date = dyn_obj_timestamp - , ms_bytecode_date = bytecode_timestamp } data PreprocessedImports ===================================== compiler/GHC/Driver/Main/Passes.hs ===================================== @@ -597,13 +597,13 @@ hscRecompStatus | otherwise -> do -- Check the status of all the linkable types we might need. -- 1. The in-memory linkable we had at hand. - bc_in_memory_linkable <- checkByteCodeInMemory hsc_env mod_summary (homeMod_bytecode old_linkable) + bc_in_memory_linkable <- checkByteCodeInMemory hsc_env checked_iface mod_summary (homeMod_bytecode old_linkable) -- 2. The bytecode object file - bc_obj_linkable <- checkByteCodeFromObject hsc_env mod_summary + bc_obj_linkable <- checkByteCodeFromObject hsc_env checked_iface mod_summary -- 3. Bytecode from an interface's whole core bindings. bc_core_linkable <- checkByteCodeFromIfaceCoreBindings hsc_env checked_iface mod_summary -- 4. The object file. - obj_linkable <- liftIO $ checkObjects lcl_dflags (homeMod_object old_linkable) mod_summary + obj_linkable <- liftIO $ checkObjects lcl_dflags checked_iface (homeMod_object old_linkable) mod_summary trace_if (hsc_logger hsc_env) (vcat [text "BCO linkable", nest 2 (ppr bc_in_memory_linkable) , text "BCO obj linkable", ppr bc_obj_linkable @@ -683,12 +683,11 @@ choose l1 _ = l1 -- | Check that the .o files produced by compilation are already up-to-date -- or not. -checkObjects :: DynFlags -> Maybe Linkable -> ModSummary -> IO (MaybeValidated Linkable) -checkObjects dflags mb_old_linkable summary = do +checkObjects :: DynFlags -> ModIface -> Maybe Linkable -> ModSummary -> IO (MaybeValidated Linkable) +checkObjects dflags iface mb_old_linkable summary = do let dt_enabled = gopt Opt_BuildDynamicToo dflags this_mod = ms_mod summary - mb_obj_date = ms_obj_date summary mb_dyn_obj_date = ms_dyn_obj_date summary mb_if_date = ms_iface_date summary obj_fn = ml_obj_file (ms_location summary) @@ -702,44 +701,39 @@ checkObjects dflags mb_old_linkable summary = do -- Not in dynamic-too mode else k - -- We check by date first, even though we have the hash - -- If a compilation is interupted after writing the .hi - -- but before writing the .o, then we catch this through - -- modtimes. - -- If the object file is newer than the .hi file, and the - -- .hi file is up to date, we also assume the object file - -- is up to date. checkDynamicObj $ - case (,) <$> mb_obj_date <*> mb_if_date of - Just (obj_date, if_date) - | obj_date >= if_date -> do + case mi_sr_object_hash =<< mi_self_recomp_info iface of + Nothing -> return $ outOfDateItemBecause MissingObjectFile Nothing + Just expected_hash -> do + exists <- doesFileExist obj_fn + if not exists + then return $ outOfDateItemBecause MissingObjectFile Nothing + else do disk_hash <- getFileHash obj_fn - case mb_old_linkable of - Just old_linkable - | linkableIsNativeCodeOnly old_linkable - , linkableHash old_linkable == disk_hash - -> return $ UpToDateItem old_linkable - _ -> return $ UpToDateItem (findObjectLinkable this_mod obj_fn disk_hash) - _ -> return $ outOfDateItemBecause MissingObjectFile Nothing + if disk_hash /= expected_hash + then return $ outOfDateItemBecause ObjectsChanged Nothing + else case mb_old_linkable of + Just old_linkable + | linkableIsNativeCodeOnly old_linkable + , linkableHash old_linkable == disk_hash + -> return $ UpToDateItem old_linkable + _ -> return $ UpToDateItem (findObjectLinkable this_mod obj_fn disk_hash) -- | Check to see if we can reuse the old linkable, by this point we will -- have just checked that the old interface matches up with the source hash, so -- no need to check that again here -checkByteCodeInMemory :: HscEnv -> ModSummary -> Maybe (LinkableWith ModuleByteCode) -> IO (MaybeValidated (LinkableWith ModuleByteCode)) -checkByteCodeInMemory hsc_env mod_sum mb_old_linkable = +checkByteCodeInMemory :: HscEnv -> ModIface -> ModSummary -> Maybe (LinkableWith ModuleByteCode) -> IO (MaybeValidated (LinkableWith ModuleByteCode)) +checkByteCodeInMemory hsc_env iface mod_sum mb_old_linkable = case mb_old_linkable of Just old_linkable -> do -- If `-fwrite-byte-code` is enabled, then check that the .gbc file is -- up-to-date with the linkable we have in our hand. - -- If ms_bytecode_date is Nothing, then the .gbc file does not exist yet. - -- Otherwise, check that the hash matches the disk. ok <- if gopt Opt_WriteByteCode (hsc_dflags hsc_env) - then case ms_bytecode_date mod_sum of - Nothing -> pure False - Just _ -> do - disk_hash <- ByteCode.readBinByteCodeHash hsc_env - (ml_bytecode_file (ms_location mod_sum)) - pure (disk_hash == linkableHash old_linkable) + then case mi_sr_bytecode_hash =<< mi_self_recomp_info iface of + Just expected_hash + | expected_hash == linkableHash old_linkable + -> doesFileExist (ml_bytecode_file (ms_location mod_sum)) + _ -> pure False else pure True if ok then return (UpToDateItem old_linkable) @@ -747,22 +741,27 @@ checkByteCodeInMemory hsc_env mod_sum mb_old_linkable = _ -> return $ outOfDateItemBecause MissingBytecode Nothing -- | Load bytecode from a ".gbc" object file if it exists and is up-to-date -checkByteCodeFromObject :: HscEnv -> ModSummary -> IO (MaybeValidated (LinkableWith ModuleByteCode)) -checkByteCodeFromObject hsc_env mod_sum = do +checkByteCodeFromObject :: HscEnv -> ModIface -> ModSummary -> IO (MaybeValidated (LinkableWith ModuleByteCode)) +checkByteCodeFromObject hsc_env iface mod_sum = do let obj_fn = ml_bytecode_file (ms_location mod_sum) - obj_date = ms_bytecode_date mod_sum - if_date = ms_iface_date mod_sum - case (,) <$> obj_date <*> if_date of - Just (obj_date, if_date) - | obj_date >= if_date -> do - -- Don't force this if we reuse the linkable already loaded into memory, but we have to check - -- that the one we have on disk would be suitable as well. - linkable <- unsafeInterleaveIO $ do - bco <- ByteCode.readBinByteCode hsc_env obj_fn - return $ mkOnlyModuleByteCodeLinkable bco - return $ UpToDateItem linkable - _ -> return $ outOfDateItemBecause MissingBytecode Nothing + case mi_sr_bytecode_hash =<< mi_self_recomp_info iface of + Nothing -> return $ outOfDateItemBecause MissingBytecode Nothing + Just expected_hash -> do + exists <- doesFileExist obj_fn + if not exists + then return $ outOfDateItemBecause MissingBytecode Nothing + else do + disk_hash <- ByteCode.readBinByteCodeHash hsc_env obj_fn + if disk_hash /= expected_hash + then return $ outOfDateItemBecause MissingBytecode Nothing + else do + -- Don't force this if we reuse the linkable already loaded into memory, but we have to check + -- that the one we have on disk would be suitable as well. + linkable <- unsafeInterleaveIO $ do + bco <- ByteCode.readBinByteCode hsc_env obj_fn + return $ mkOnlyModuleByteCodeLinkable bco + return $ UpToDateItem linkable -- | Attempt to load bytecode from whole core bindings in the interface if they exist. -- This is a legacy code-path, these days it should be preferred to use the bytecode object linkable. ===================================== compiler/GHC/Driver/Pipeline.hs ===================================== @@ -941,11 +941,27 @@ hscGenBackendPipeline pipe_env hsc_env mod_sum result = do -- Add the object linkable to the potential bytecode linkable which was generated in HscBackend. return (mlinkable { homeMod_object = Just linkable }) + miface' <- case result of + HscRecomp { hscs_old_iface_hash = mb_old_iface_hash } + | backendWritesFiles (backend (hsc_dflags hsc_env)) -> do + let bc_hash = case recompLinkables_bytecode final_linkable of + NormalLinkable mb_bc -> fmap linkableHash mb_bc + WholeCoreBindingsLinkable {} -> Nothing + patched = addIfaceArtifactHashes + (fmap linkableHash (recompLinkables_object final_linkable)) + bc_hash + miface + -- See Note [Writing interface files] + liftIO $ hscMaybeWriteIface (hsc_logger hsc_env) (hsc_dflags hsc_env) + False patched mb_old_iface_hash (ms_location mod_sum) + return patched + _ -> return miface + -- when building ghc-internal with --make (e.g. with cabal-install), we want -- the virtual interface for gHC_PRIM in the cache, not the empty one. let miface_final | ms_mod mod_sum == gHC_PRIM = getGhcPrimIface (hsc_hooks hsc_env) - | otherwise = miface + | otherwise = miface' return (miface_final, final_linkable) asPipeline :: P m => Bool -> PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> m (Maybe ObjFile) ===================================== compiler/GHC/Driver/Pipeline/Execute.hs ===================================== @@ -58,6 +58,8 @@ import GHC.Unit.State import GHC.Unit.Home import GHC.Data.Maybe import GHC.Iface.Make +import GHC.Iface.Recomp (addIfaceArtifactHashes) +import GHC.Linker.Types (linkableHash) import GHC.Driver.Config.Parser import GHC.Parser.Header import GHC.Data.StringBuffer @@ -563,8 +565,6 @@ runHscBackendPhase pipe_env hsc_env mod_name src_flavour location result = do final_iface <- mkFullIface hsc_env partial_iface stg_infos cg_infos iface_stubs iface_files - -- See Note [Writing interface files] - hscMaybeWriteIface logger dflags False final_iface mb_old_iface_hash mod_location mlinkable <- if gopt Opt_ByteCodeAndObjectCode dflags then do @@ -583,9 +583,10 @@ runHscBackendPhase pipe_env hsc_env mod_name src_flavour location result = do -- In interpreted mode the regular codeGen backend is not run so we -- generate a interface without codeGen info. do - final_iface <- mkFullIface hsc_env partial_iface Nothing Nothing NoStubs [] - hscMaybeWriteIface logger dflags True final_iface mb_old_iface_hash location + final_iface0 <- mkFullIface hsc_env partial_iface Nothing Nothing NoStubs [] bc <- generateAndWriteByteCodeLinkable hsc_env (mkCgInteractiveGuts cgguts) mod_location + let final_iface = addIfaceArtifactHashes Nothing (Just (linkableHash bc)) final_iface0 + hscMaybeWriteIface logger dflags True final_iface mb_old_iface_hash location return ([], final_iface, emptyHomeModInfoLinkable { homeMod_bytecode = Just bc } , panic "interpreter") @@ -699,7 +700,6 @@ runHscPhase pipe_env hsc_env0 input_fn src_flavour = do hie_date <- modificationTimeIfExists hie_file o_mod <- modificationTimeIfExists o_file dyn_o_mod <- modificationTimeIfExists dyn_o_file - bytecode_date <- modificationTimeIfExists (ml_bytecode_file_ospath location) -- Tell the finder cache about this module mod <- do @@ -721,7 +721,6 @@ runHscPhase pipe_env hsc_env0 input_fn src_flavour = do ms_parsed_mod = Nothing, ms_iface_date = hi_date, ms_hie_date = hie_date, - ms_bytecode_date = bytecode_date, ms_textual_imps = imps, ms_srcimps = src_imps } ===================================== compiler/GHC/Iface/Recomp.hs ===================================== @@ -13,6 +13,7 @@ module GHC.Iface.Recomp , recompileRequired , addFingerprints , mkSelfRecomp + , addIfaceArtifactHashes ) where @@ -1226,7 +1227,9 @@ mkSelfRecomp hsc_env this_mod src_hash usages = do , mi_sr_opt_hash = opt_hash , mi_sr_plugin_hash = plugin_hash , mi_sr_src_hash = src_hash - , mi_sr_usages = usages }) + , mi_sr_usages = usages + , mi_sr_object_hash = Nothing + , mi_sr_bytecode_hash = Nothing }) -- | Add fingerprints for top-level declarations to a 'ModIface'. -- @@ -1273,6 +1276,20 @@ addFingerprints hsc_env iface0 = do -- return final_iface +addIfaceArtifactHashes :: Maybe Fingerprint -> Maybe Fingerprint -> ModIface -> ModIface +addIfaceArtifactHashes mb_obj mb_bc iface = + case mi_self_recomp_info iface of + Nothing -> iface + Just sr -> + let iface' = set_mi_self_recomp + (Just sr { mi_sr_object_hash = mb_obj, mi_sr_bytecode_hash = mb_bc }) + iface + !iface_hash = computeFingerprint putNameLiterally + (mi_mod_hash iface', + mi_self_recomp_info iface', + mi_deps iface') + in set_mi_iface_hash iface_hash iface' + -- The ABI hash should depend on everything in IfacePublic ===================================== compiler/GHC/Iface/Recomp/Types.hs ===================================== @@ -80,17 +80,23 @@ data IfaceSelfRecomp = -- ^ Hash of hpc flags , mi_sr_plugin_hash :: !Fingerprint -- ^ Hash of plugins + , mi_sr_object_hash :: !(Maybe Fingerprint) + -- ^ Hash of the object file this compilation produced + , mi_sr_bytecode_hash :: !(Maybe Fingerprint) + -- ^ Hash of the bytecode this compilation produced } instance Binary IfaceSelfRecomp where - put_ bh (IfaceSelfRecomp{mi_sr_src_hash, mi_sr_usages, mi_sr_flag_hash, mi_sr_opt_hash, mi_sr_hpc_hash, mi_sr_plugin_hash}) = do + put_ bh (IfaceSelfRecomp{mi_sr_src_hash, mi_sr_usages, mi_sr_flag_hash, mi_sr_opt_hash, mi_sr_hpc_hash, mi_sr_plugin_hash, mi_sr_object_hash, mi_sr_bytecode_hash}) = do put_ bh mi_sr_src_hash lazyPut bh mi_sr_usages put_ bh mi_sr_flag_hash put_ bh mi_sr_opt_hash put_ bh mi_sr_hpc_hash put_ bh mi_sr_plugin_hash + put_ bh mi_sr_object_hash + put_ bh mi_sr_bytecode_hash get bh = do src_hash <- get bh @@ -99,22 +105,26 @@ instance Binary IfaceSelfRecomp where opt_hash <- get bh hpc_hash <- get bh plugin_hash <- get bh - return $ IfaceSelfRecomp { mi_sr_src_hash = src_hash, mi_sr_usages = usages, mi_sr_flag_hash = flag_hash, mi_sr_opt_hash = opt_hash, mi_sr_hpc_hash = hpc_hash, mi_sr_plugin_hash = plugin_hash } + object_hash <- get bh + bytecode_hash <- get bh + return $ IfaceSelfRecomp { mi_sr_src_hash = src_hash, mi_sr_usages = usages, mi_sr_flag_hash = flag_hash, mi_sr_opt_hash = opt_hash, mi_sr_hpc_hash = hpc_hash, mi_sr_plugin_hash = plugin_hash, mi_sr_object_hash = object_hash, mi_sr_bytecode_hash = bytecode_hash } instance Outputable IfaceSelfRecomp where - ppr (IfaceSelfRecomp{mi_sr_src_hash, mi_sr_usages, mi_sr_flag_hash, mi_sr_opt_hash, mi_sr_hpc_hash, mi_sr_plugin_hash}) + ppr (IfaceSelfRecomp{mi_sr_src_hash, mi_sr_usages, mi_sr_flag_hash, mi_sr_opt_hash, mi_sr_hpc_hash, mi_sr_plugin_hash, mi_sr_object_hash, mi_sr_bytecode_hash}) = vcat [text "Self-Recomp" , nest 2 (vcat [ text "src hash:" <+> ppr mi_sr_src_hash , text "flags:" <+> pprFingerprintWithValue missingExtraFlagInfo (fmap pprIfaceDynFlags mi_sr_flag_hash) , text "opt hash:" <+> ppr mi_sr_opt_hash , text "hpc hash:" <+> ppr mi_sr_hpc_hash , text "plugin hash:" <+> ppr mi_sr_plugin_hash + , text "object hash:" <+> ppr mi_sr_object_hash + , text "bytecode hash:" <+> ppr mi_sr_bytecode_hash , text "usages:" <+> ppr (map pprUsage mi_sr_usages) ])] instance NFData IfaceSelfRecomp where - rnf (IfaceSelfRecomp src_hash usages flag_hash opt_hash hpc_hash plugin_hash) - = rnf src_hash `seq` rnf usages `seq` rnf flag_hash `seq` rnf opt_hash `seq` rnf hpc_hash `seq` rnf plugin_hash `seq` () + rnf (IfaceSelfRecomp src_hash usages flag_hash opt_hash hpc_hash plugin_hash object_hash bytecode_hash) + = rnf src_hash `seq` rnf usages `seq` rnf flag_hash `seq` rnf opt_hash `seq` rnf hpc_hash `seq` rnf plugin_hash `seq` rnf object_hash `seq` rnf bytecode_hash `seq` () pprFingerprintWithValue :: SDoc -> FingerprintWithValue SDoc -> SDoc pprFingerprintWithValue missingInfo (FingerprintWithValue fp mflags) ===================================== compiler/GHC/Linker/Loader.hs ===================================== @@ -95,6 +95,7 @@ import GHC.Unit.External (ExternalPackageState (..)) import GHC.Unit.Module import GHC.Unit.Module.ModNodeKey import GHC.Unit.Module.Graph +import GHC.Unit.Module.Stage (ModuleStage (..)) import GHC.Unit.Module.ModIface import GHC.Unit.State as Packages @@ -713,7 +714,9 @@ get_reachable_nodes hsc_env mods go :: ModuleGraph -> IO ([Module], UniqDSet UnitId) go mg = do let mod_keys = map (hmgModKey mg) mods - all_reachable = mod_keys ++ map mkNodeKey (mgReachableLoop mg mod_keys) + reached = mgReachableStage mg [ (k, RunStage) | k <- mod_keys ] + all_reachable = nubOrd $ + mod_keys ++ [ k | (k, RunStage) <- reached ] (mods_s, pkgs_s) <- partitionEithers <$> mapMaybeM get_mod_info all_reachable return (mods_s, mkUniqDSet pkgs_s) ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -79,6 +79,7 @@ module GHC.Unit.Module.Graph -- transitive closure of Z? , mgReachable , mgReachableLoop + , mgReachableStage , mgQuery , ZeroScopeKey(..) , mgQueryZero @@ -191,6 +192,7 @@ data ModuleGraph = ModuleGraph , mg_graph :: (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) , mg_loop_graph :: (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) , mg_zero_graph :: (ReachabilityIndex ZeroSummaryNode, ZeroScopeKey -> Maybe ZeroSummaryNode) + , mg_stage_graph :: (ReachabilityIndex StageSummaryNode, (NodeKey, ModuleStage) -> Maybe StageSummaryNode) -- `mg_graph` and `mg_loop_graph` cached transitive dependency calculations -- so that a lot of work is not repeated whenever the transitive @@ -230,6 +232,7 @@ emptyMG :: ModuleGraph emptyMG = ModuleGraph [] (graphReachability emptyGraph, const Nothing) (graphReachability emptyGraph, const Nothing) (graphReachability emptyGraph, const Nothing) + (cyclicGraphReachability emptyGraph, const Nothing) False emptyUniqMap @@ -588,6 +591,12 @@ mgReachableLoop mg nk = map summaryNodeSummary modules_below where modules_below = allReachableMany td_map (mapMaybe lookup_node nk) +mgReachableStage :: ModuleGraph -> [(NodeKey, ModuleStage)] -> [(NodeKey, ModuleStage)] +mgReachableStage mg nk = map stageSummaryNodeSummary modules_below where + (td_map, lookup_node) = mg_stage_graph mg + modules_below = + allReachableMany td_map (mapMaybe lookup_node nk) + -- | @'mgQueryZero' g root target@ answers the question: can we reach @target@ from @root@ -- in the module graph @g@, only using normal (level 0) imports? @@ -1079,6 +1088,7 @@ extendMG ModuleGraph{..} node = , mg_graph = mkTransDeps new_mss , mg_loop_graph = mkTransLoopDeps new_mss , mg_zero_graph = mkTransZeroDeps new_mss + , mg_stage_graph = mkStageDeps new_mss , mg_has_holes = mg_has_holes || maybe False isHsigFile (moduleNodeInfoHscSource =<< mgNodeIsModule node) , mg_home_module_name_providers_map = mkHomeModuleNameProvidersMap new_mss } ===================================== compiler/GHC/Unit/Module/ModIface.hs ===================================== @@ -43,6 +43,7 @@ module GHC.Unit.Module.ModIface , set_mi_sig_of , set_mi_hsc_src , set_mi_self_recomp + , set_mi_iface_hash , set_mi_hi_bytes , set_mi_deps , set_mi_exports @@ -979,6 +980,9 @@ set_mi_mod_info val iface = clear_mi_hi_bytes $ iface { mi_mod_info_ = val } set_mi_self_recomp :: Maybe IfaceSelfRecomp-> ModIface_ phase -> ModIface_ phase set_mi_self_recomp val iface = clear_mi_hi_bytes $ iface { mi_self_recomp_ = val } +set_mi_iface_hash :: Fingerprint -> ModIface_ phase -> ModIface_ phase +set_mi_iface_hash val iface = clear_mi_hi_bytes $ iface { mi_iface_hash_ = val } + set_mi_hi_bytes :: IfaceBinHandle phase -> ModIface_ phase -> ModIface_ phase set_mi_hi_bytes val iface = iface { mi_hi_bytes_ = val } ===================================== compiler/GHC/Unit/Module/ModSummary.hs ===================================== @@ -75,8 +75,6 @@ data ModSummary -- ^ Timestamp of object, if we have one ms_dyn_obj_date :: !(Maybe UTCTime), -- ^ Timestamp of dynamic object, if we have one - ms_bytecode_date :: Maybe UTCTime, - -- ^ Timestamp of bytecode object, if we have one ms_iface_date :: Maybe UTCTime, -- ^ Timestamp of hi file, if we have one -- See Note [When source is considered modified] and #9243 View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b6d1e11c4483cb3cf64eba716ea406c... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b6d1e11c4483cb3cf64eba716ea406c... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Zubin (@wz1000)