<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style='--code-editor-font: var(--default-mono-font, "Menlo"), DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>
<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>
<style>img {
max-width: 100%; height: auto;
}
body {
font-size: 0.875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,0.01) 0 0 1px;
}
body {
font-family: var(--default-regular-font, -apple-system),BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,0.01) 0 0 1px; font-family: var(--default-regular-font, -apple-system),BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";'>
<div class="content">
<h3 style="margin-top: 20px; margin-bottom: 10px;">
Matthew Pickering pushed to branch wip/romes/hardwire-ghc-unit-id at <a href="https://gitlab.haskell.org/ghc/ghc">Glasgow Haskell Compiler / GHC</a>
</h3>
<h4 style="margin-top: 10px; margin-bottom: 10px;">
Commits:
</h4>
<ul>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b8123b2c38e5d2ee005990c568baaeea9e9cffb1">b8123b2c</a></strong>
<div>
<span> by romes </span> <i> at 2023-04-03T10:20:02+01:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.875rem; color: #333238; position: relative; font-family: var(--default-mono-font, "Menlo"),"DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>Hardwire a better unit-id for ghc
Previously, the unit-id of ghc-the-library was fixed as `ghc`.
This was done primarily because the compiler must know the unit-id of
some packages (including ghc) a-priori to define wired-in names.
However, as seen in #20742, a reinstallable `ghc` whose unit-id is fixed
to `ghc` might result in subtle bugs when different ghc's interact.
A good example of this is having GHC_A load a plugin compiled by GHC_B,
where GHC_A and GHC_B are linked to ghc-libraries that are ABI
incompatible. Without a distinction between the unit-id of the ghc library
GHC_A is linked against and the ghc library the plugin it is loading was
compiled against, we can't check compatibility.
This patch gives a slightly better unit-id to ghc (ghc-version) by
(1) Not setting -this-unit-id to ghc, but rather to the new unit-id (modulo stage0)
(2) Adding a definition to `GHC.Settings.Config` whose value is the new unit-id.
(2.1) `GHC.Settings.Config` is generated by Hadrian
(2.2) and also by cabal through `compiler/Setup.hs`
This unit-id definition is imported by `GHC.Unit.Types` and used to
set the wired-in unit-id of "ghc", which was previously fixed to "ghc"
The commits following this one will improve the unit-id with a
cabal-style package hash and check compatibility when loading plugins.
Note that we also ensure that ghc's unit key matches unit id both when
hadrian or cabal builds ghc, and in this way we no longer need to add
`ghc` to the WiringMap.
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/f939dfc127562ab5c94435e6505b819f294ec5ad">f939dfc1</a></strong>
<div>
<span> by romes </span> <i> at 2023-04-03T10:20:02+01:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.875rem; color: #333238; position: relative; font-family: var(--default-mono-font, "Menlo"),"DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>Validate compatibility of ghcs when loading plugins
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/c9b48a23dd9c15ca51edff637add9c7c318f696d">c9b48a23</a></strong>
<div>
<span> by romes </span> <i> at 2023-04-03T10:20:02+01:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.875rem; color: #333238; position: relative; font-family: var(--default-mono-font, "Menlo"),"DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>Add hashes to unit-ids created by hadrian
Co-author: @mpickering
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/6e7abf19ab8ce23fb2ee63d4095e0163e78dd41c">6e7abf19</a></strong>
<div>
<span> by GHC GitLab CI </span> <i> at 2023-04-03T10:20:02+01:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.875rem; color: #333238; position: relative; font-family: var(--default-mono-font, "Menlo"),"DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>Fix sed command in install makefile
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/13824cd5c871bd11e802ae157eee010fa40580e6">13824cd5</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2023-04-03T17:14:10+01:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.875rem; color: #333238; position: relative; font-family: var(--default-mono-font, "Menlo"),"DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>fixes
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/104c2b4c265725bc8fd5a182e8b2112376c97955">104c2b4c</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2023-04-03T17:31:17+01:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.875rem; color: #333238; position: relative; font-family: var(--default-mono-font, "Menlo"),"DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>add flag
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/5d179c5d73e643dd8457457b95f4666e288eaf5d">5d179c5d</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2023-04-03T17:33:33+01:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.875rem; color: #333238; position: relative; font-family: var(--default-mono-font, "Menlo"),"DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>Use hash-unit-ids in release jobs
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/8efe61f3714e20bc32cefdd5f69a74c28220a441">8efe61f3</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2023-04-04T10:38:52+01:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.875rem; color: #333238; position: relative; font-family: var(--default-mono-font, "Menlo"),"DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>Fix passing opts to toolargs
</pre>
</li>
</ul>
<h4 style="margin-top: 10px; margin-bottom: 10px;">
30 changed files:
</h4>
<ul>
<li class="file-stats">
<a href="#a6883fe5ffe69ebc49b16c7e553faba405221f57">
.gitlab/gen_ci.hs
</a>
</li>
<li class="file-stats">
<a href="#4f7fc727dfc06c2591e6043f44b9602eddfc3673">
.gitlab/jobs.yaml
</a>
</li>
<li class="file-stats">
<a href="#774d88050336ef660c7a219fb06c480c2fc639bc">
compiler/GHC/Driver/Session.hs
</a>
</li>
<li class="file-stats">
<a href="#f5bf08d06298fee515f928eacddd8f46477717d9">
compiler/GHC/Runtime/Loader.hs
</a>
</li>
<li class="file-stats">
<a href="#5938b47c4cbf0df07fe6b3b3771017f306a32634">
compiler/GHC/Unit/Types.hs
</a>
</li>
<li class="file-stats">
<a href="#ff19f0c26c34d35d69e7f869fdfc3900f633b3ae">
compiler/Setup.hs
</a>
</li>
<li class="file-stats">
<a href="#0f33fd88c617246c7f89c4477d2d1d24f942df23">
compiler/ghc.cabal.in
</a>
</li>
<li class="file-stats">
<a href="#9e40ce816c93f9c0eeee92bd3c4e5b3701e7679a">
hadrian/bindist/Makefile
</a>
</li>
<li class="file-stats">
<a href="#2eeb40f0acd6cb433ebe65e34262040b618908a7">
hadrian/hadrian.cabal
</a>
</li>
<li class="file-stats">
<a href="#5c7e93589da23c93a226ca545d584a21e5c8b87a">
hadrian/src/CommandLine.hs
</a>
</li>
<li class="file-stats">
<a href="#75cacc4ac88e6417ff1b69b1c18dd8a26fc845a0">
hadrian/src/Context.hs
</a>
</li>
<li class="file-stats">
<a href="#1655041cfd1add79e4c335c656405ee3eb3bd0dd">
hadrian/src/Flavour.hs
</a>
</li>
<li class="file-stats">
<a href="#52e62b9e1b2c983f9072b9b5a8011e1169e33619">
hadrian/src/Flavour/Type.hs
</a>
</li>
<li class="file-stats">
<a href="#9a5dafa247c537b41aaa05de7e89406c072a446d">
hadrian/src/Hadrian/BuildPath.hs
</a>
</li>
<li class="file-stats">
<a href="#b8d466ae003701daa0c642dfadbec8b7ac9a65b4">
hadrian/src/Hadrian/Builder/Git.hs
</a>
</li>
<li class="file-stats">
<a href="#56d869a2dd72303b436aba7cf78afcbf5c3cb4ff">
hadrian/src/Hadrian/Haskell/Cabal.hs
</a>
</li>
<li class="file-stats">
<a href="#579888c35e9965d115a2349ac57e4ff79e87518f">
hadrian/src/Hadrian/Haskell/Cabal/Parse.hs
</a>
</li>
<li class="file-stats">
<a href="#928e63b951266c996d45788f553df0298ded4a05">
<span class="new-file">
+
hadrian/src/Hadrian/Haskell/Hash.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#c7fc5ad277614c0d15ba3f6b06d60cbb73ef4cb0">
<span class="new-file">
+
hadrian/src/Hadrian/Haskell/Hash.hs-boot
</span>
</a>
</li>
<li class="file-stats">
<a href="#f3a3f09d388a7f4606fcec138c51e846b63759ca">
hadrian/src/Hadrian/Package.hs
</a>
</li>
<li class="file-stats">
<a href="#2b9c6614fcb1a7e344408671cf3f4c652fd8d917">
hadrian/src/Rules.hs
</a>
</li>
<li class="file-stats">
<a href="#d54febd1e7f96d85cda6ae682efa3ddb77fddedc">
hadrian/src/Rules/BinaryDist.hs
</a>
</li>
<li class="file-stats">
<a href="#7e709d26c44c7734d63c0043097e073a8d325901">
hadrian/src/Rules/CabalReinstall.hs
</a>
</li>
<li class="file-stats">
<a href="#6c93025dd021b74dda705f36d078e02bcda0ccfe">
hadrian/src/Rules/Documentation.hs
</a>
</li>
<li class="file-stats">
<a href="#2d11d70063aa1378e9323caad80c7d9116ef4520">
hadrian/src/Rules/Generate.hs
</a>
</li>
<li class="file-stats">
<a href="#fb6173313439af46b3054cb59d8b9287eaae035c">
hadrian/src/Rules/Library.hs
</a>
</li>
<li class="file-stats">
<a href="#ea44ae2bf75a7ad281e1a9eae011461c5487ed17">
hadrian/src/Rules/Register.hs
</a>
</li>
<li class="file-stats">
<a href="#704958036ebddd9058fb1367e440b2ea1abb53e9">
hadrian/src/Settings.hs
</a>
</li>
<li class="file-stats">
<a href="#88aba3facfb6ad447031cb0f794a80fa9edef072">
hadrian/src/Settings/Builders/Cabal.hs
</a>
</li>
<li class="file-stats">
<a href="#52ac3fb9d79a975886f930e407b4c98c993e9e8e">
hadrian/src/Settings/Builders/Ghc.hs
</a>
</li>
</ul>
<h5 style="margin-top: 10px; margin-bottom: 10px; font-size: 0.875rem;">
The diff was not included because it is too large.
</h5>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #737278;">
—
<br>
<a href="https://gitlab.haskell.org/ghc/ghc/-/compare/4ab30288e9fc996c8ef4add845e77aaa14fbe4ed...8efe61f3714e20bc32cefdd5f69a74c28220a441">View it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.haskell.org">gitlab.haskell.org</a>. <a href="https://gitlab.haskell.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.haskell.org/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
</p>
</div>
</body>
</html>