Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
-
93a90e4a
by Simon Jakobi at 2026-10-02T13:37:17-04:00
-
d50b26bc
by Simon Jakobi at 2026-10-02T13:37:18-04:00
-
83d3989a
by Simon Jakobi at 2026-10-02T13:37:18-04:00
-
dcf52c44
by Hannes Siebenhandl at 2026-10-02T13:37:19-04:00
10 changed files:
- .gitlab/ci.sh
- changelog.d/T27455
- changelog.d/semaphore-v2
- changelog.d/unit-index
- compiler/GHC/Unit/External/Wired.hs
- compiler/GHC/Unit/State.hs
- + testsuite/tests/ghci/scripts/T27834.hs
- + testsuite/tests/ghci/scripts/T27834.script
- + testsuite/tests/ghci/scripts/T27834.stdout
- testsuite/tests/ghci/scripts/all.T
Changes:
| ... | ... | @@ -982,23 +982,24 @@ function lint_changelog() { |
| 982 | 982 | exit 0
|
| 983 | 983 | fi
|
| 984 | 984 | |
| 985 | - # Check that the MR adds at least one changelog entry.
|
|
| 985 | + # Check that the MR adds or modifies at least one changelog entry.
|
|
| 986 | 986 | git fetch --depth=1 \
|
| 987 | 987 | "$CI_MERGE_REQUEST_PROJECT_URL" \
|
| 988 | 988 | "$CI_MERGE_REQUEST_DIFF_BASE_SHA"
|
| 989 | 989 | |
| 990 | - local added
|
|
| 991 | - added=$(git diff --name-only --diff-filter=A \
|
|
| 990 | + local entries
|
|
| 991 | + entries=$(git diff --name-only --diff-filter=AM \
|
|
| 992 | 992 | "$CI_MERGE_REQUEST_DIFF_BASE_SHA..$CI_COMMIT_SHA" -- \
|
| 993 | 993 | 'changelog.d/' | grep -v '^changelog.d/config$' || true)
|
| 994 | 994 | |
| 995 | - if [ -z "$added" ]; then
|
|
| 995 | + if [ -z "$entries" ]; then
|
|
| 996 | 996 | error "No changelog entry found in changelog.d/"
|
| 997 | - echo "Please add a changelog entry file describing your user-facing changes."
|
|
| 997 | + echo "Please add a changelog entry file describing your user-facing changes,"
|
|
| 998 | + echo "or add this MR to the 'mrs' field of an existing entry."
|
|
| 998 | 999 | echo "If this MR does not need a changelog entry, apply the 'no-changelog' label."
|
| 999 | 1000 | exit 1
|
| 1000 | 1001 | fi
|
| 1001 | - echo "Found changelog entries: $added"
|
|
| 1002 | + echo "Found changelog entries: $entries"
|
|
| 1002 | 1003 | |
| 1003 | 1004 | # Build changelog-d with the bootstrap compiler and validate all entries
|
| 1004 | 1005 | # (checks required fields, section names, and the MR number).
|
| ... | ... | @@ -4,5 +4,5 @@ mrs: !16274 |
| 4 | 4 | synopsis:
|
| 5 | 5 | Don't drop `ExceptionContext` in `SomeException(toException)`
|
| 6 | 6 | description:
|
| 7 | - Previously the implementation of ``Exception(toException)`` given to `SomeException` would inappropriately drop the carried `ExceptionContext`. Now ``toException = id``, faithfully implementing the semantics proposed in :ref:`CLC Proposal #200 <https://github.com/haskell/core-libraries-committee/issues/200>`.
|
|
| 7 | + Previously the implementation of ``Exception(toException)`` given to `SomeException` would inappropriately drop the carried `ExceptionContext`. Now ``toException = id``, faithfully implementing the semantics proposed in `CLC Proposal #200 <https://github.com/haskell/core-libraries-committee/issues/200>`_.
|
|
| 8 | 8 |
| ... | ... | @@ -12,7 +12,7 @@ description: |
| 12 | 12 | semaphores); its reported protocol version remains v1.
|
| 13 | 13 | |
| 14 | 14 | When GHC receives a ``-jsem`` name whose protocol version it does not
|
| 15 | - support, it now emits a ``-Wsemaphore-version-mismatch`` warning and
|
|
| 15 | + support, it now emits a :ghc-flag:`-Wsemaphore-open-failure` warning and
|
|
| 16 | 16 | falls back to ``-j1`` rather than crashing. ``ghc --info`` exposes the
|
| 17 | 17 | supported version in a new ``"Semaphore version"`` entry so
|
| 18 | 18 | cabal-install can detect a mismatch before invoking GHC.
|
| 1 | 1 | section: compiler
|
| 2 | 2 | synopsis: Use global ``UnitIndex`` to deduplicate ``UnitInfo``s over multiple home units
|
| 3 | -issues: #27500 #26423 #27748
|
|
| 4 | -mrs: !16115 !16598
|
|
| 3 | +issues: #27500 #26423 #27748 #27834
|
|
| 4 | +mrs: !16115 !16598 !16743
|
|
| 5 | 5 | |
| 6 | 6 | description: {
|
| 7 | 7 | The ``UnitState`` used to be duplicated for all ``HomeUnitEnv``, not sharing any of the ``UnitInfo``s.
|
| ... | ... | @@ -5,6 +5,7 @@ module GHC.Unit.External.Wired ( |
| 5 | 5 | isWireMapEmpty,
|
| 6 | 6 | lookupWireMap,
|
| 7 | 7 | listWireMap,
|
| 8 | + nonDetFoldWireMap,
|
|
| 8 | 9 | -- * 'UnwireMap'
|
| 9 | 10 | UnwireMap,
|
| 10 | 11 | emptyUnwireMap,
|
| ... | ... | @@ -48,6 +49,9 @@ lookupWireMap uid (WireMap wmap) = lookupUniqMap wmap uid |
| 48 | 49 | listWireMap :: WireMap -> [(UnitId, UnitId)]
|
| 49 | 50 | listWireMap (WireMap wmap) = nonDetUniqMapToList wmap
|
| 50 | 51 | |
| 52 | +nonDetFoldWireMap :: ((UnitId, UnitId) -> b -> b) -> b -> WireMap -> b
|
|
| 53 | +nonDetFoldWireMap go z (WireMap uniq) = nonDetFoldUniqMap go z uniq
|
|
| 54 | + |
|
| 51 | 55 | -- | The reverse of 'WireMap'.
|
| 52 | 56 | -- Records the mapping from the wired-in 'UnitId' to the on-disk 'UnitId'.
|
| 53 | 57 | newtype UnwireMap =
|
| ... | ... | @@ -286,6 +286,21 @@ trustUnits elements (TrustOverlay to) = TrustOverlay $ foldl' (\ acc uid -> addT |
| 286 | 286 | emptyTrustOverlay :: TrustOverlay
|
| 287 | 287 | emptyTrustOverlay = TrustOverlay emptyUniqMap
|
| 288 | 288 | |
| 289 | +-- | For all values in the 'WireMap', copy the recorded trust/distrust
|
|
| 290 | +-- for the wired-in unit id.
|
|
| 291 | +--
|
|
| 292 | +extendForWireMap :: TrustOverlay -> WireMap -> TrustOverlay
|
|
| 293 | +extendForWireMap to wmap =
|
|
| 294 | + nonDetFoldWireMap go to wmap
|
|
| 295 | + where
|
|
| 296 | + go (onDiskUid, wiredInUid) overlay =
|
|
| 297 | + case lookupTrustOverlay overlay onDiskUid of
|
|
| 298 | + Nothing -> overlay
|
|
| 299 | + Just Trusted ->
|
|
| 300 | + trustUnits [wiredInUid] overlay
|
|
| 301 | + Just Distrusted ->
|
|
| 302 | + distrustUnits [wiredInUid] overlay
|
|
| 303 | + |
|
| 289 | 304 | {-
|
| 290 | 305 | Note [Sharing 'UnitInfo's across the 'UnitEnv']
|
| 291 | 306 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| ... | ... | @@ -957,7 +972,7 @@ mkUnitState logger unit_index cfg = do |
| 957 | 972 | , explicitUnits = explicit_pkgs
|
| 958 | 973 | , homeUnitDepends = home_unit_deps
|
| 959 | 974 | , unitInfoMap = pkg_db
|
| 960 | - , trustedUnits = trustUnitsOverlay
|
|
| 975 | + , trustedUnits = trustUnitsOverlay `extendForWireMap` wired_map
|
|
| 961 | 976 | , moduleNameProvidersMap = mod_map
|
| 962 | 977 | , pluginModuleNameProvidersMap = mkModuleNameProvidersMap logger (unitConfigAllowVirtual cfg) pkg_db plugin_vis_map
|
| 963 | 978 | , packageNameMap = pkgname_map
|
| 1 | +{-# LANGUAGE Haskell2010 #-}
|
|
| 2 | +{-# LANGUAGE Safe #-}
|
|
| 3 | +module Main where
|
|
| 4 | + |
|
| 5 | +-- Importing a wired-in in module should honour trustworthiness
|
|
| 6 | +import GHC.Internal.Char (chr)
|
|
| 7 | + |
|
| 8 | +main :: IO ()
|
|
| 9 | +main = print (chr 120) |
| 1 | +:load T27834
|
|
| 2 | +putStrLn "Can import trusted module from ghc-internal" |
| 1 | +Can import trusted module from ghc-internal |
| ... | ... | @@ -403,3 +403,4 @@ test('GhciPackageRename', |
| 403 | 403 | ['GhciPackageRename.script'])
|
| 404 | 404 | test('T26233', normal, ghci_script, ['T26233.script'])
|
| 405 | 405 | test('T27641', normal, ghci_script, ['T27641.script'])
|
| 406 | +test('T27834', [extra_hc_opts("-fpackage-trust -trust base -trust ghc-internal -package ghc-internal")], ghci_script, ['T27834.script']) |