@@ -876,28 +876,22 @@ newComponentCache recorder exts _cfp hsc_env old_cis new_cis = do
876876 hscEnv' <- -- Set up a multi component session with the other units on GHC 9.4
877877 Compat. initUnits dfs hsc_env
878878
879- #if MIN_VERSION_ghc(9,6,1)
880879 let closure_errs = maybeToList $ checkHomeUnitsClosed' (hsc_unit_env hscEnv') (hsc_all_home_unit_ids hscEnv')
881880 closure_err_to_multi_err err =
882881 ideErrorWithSource
883882 (Just " cradle" ) (Just DiagnosticSeverity_Warning ) _cfp
884883 (T. pack (Compat. printWithoutUniques (singleMessage err)))
884+ #if MIN_VERSION_ghc(9,6,1)
885885 (Just (fmap GhcDriverMessage err))
886- multi_errs = map closure_err_to_multi_err closure_errs
887- bad_units = OS. fromList $ concat $ do
888- x <- map errMsgDiagnostic closure_errs
889- DriverHomePackagesNotClosed us <- pure x
890- pure us
891- isBad ci = (homeUnitId_ (componentDynFlags ci)) `OS.member` bad_units
892886#else
893- let closure_errs = maybeToList $ checkHomeUnitsClosed' (hsc_unit_env hscEnv') (hsc_all_home_unit_ids hscEnv')
894- multi_errs = map (\ diag -> ideErrorWithSource (Just " cradle" ) (Just DiagnosticSeverity_Warning ) _cfp (T. pack (Compat. printWithoutUniques (singleMessage diag))) Nothing ) closure_errs
887+ Nothing
888+ #endif
889+ multi_errs = map closure_err_to_multi_err closure_errs
895890 bad_units = OS. fromList $ concat $ do
896891 x <- map errMsgDiagnostic closure_errs
897892 DriverHomePackagesNotClosed us <- pure x
898893 pure us
899894 isBad ci = (homeUnitId_ (componentDynFlags ci)) `OS.member` bad_units
900- #endif
901895 -- Whenever we spin up a session on Linux, dynamically load libm.so.6
902896 -- in. We need this in case the binary is statically linked, in which
903897 -- case the interactive session will fail when trying to load
0 commit comments