[Git][ghc/ghc][wip/fendor/external-unit-db-cache] Fixup: force UnitInfo to avoid retaining the old UnitInfo
Hannes Siebenhandl pushed to branch wip/fendor/external-unit-db-cache at Glasgow Haskell Compiler / GHC Commits: 97fad109 by fendor at 2026-07-21T17:12:56+02:00 Fixup: force UnitInfo to avoid retaining the old UnitInfo - - - - - 1 changed file: - compiler/GHC/Unit/External/Index.hs Changes: ===================================== compiler/GHC/Unit/External/Index.hs ===================================== @@ -301,7 +301,10 @@ updateWiredInUnitIndex wired_map pkgs unit_index = do ui <- readUnitIndex unit_index let all_pkgs = updateWiredInUnits wired_map (ui_unitInfoMap ui) pkgs - (new_pkgs, _pkgs_set) = partitionEithers all_pkgs + (new_pkgs', _pkgs_set) = partitionEithers all_pkgs + -- Make sure we force the 'UnitInfo' here. + -- Otherwise, we will retain a reference to the old 'UnitInfo' + new_pkgs <- traverse evaluateUnitInfoLists new_pkgs' modifyUnitIndexCache unit_index (addUnitInfoMap $ mkUnitInfoMap new_pkgs) pure (map (either id id) all_pkgs) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/97fad109104262f5bf28581a38cec678... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/97fad109104262f5bf28581a38cec678... 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)
-
Hannes Siebenhandl (@fendor)