<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<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: -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: -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/recomp-mhu-fixes at <a href="https://gitlab.haskell.org/ghc/ghc" style="color: #1068bf;">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/b627b36ee99e6a6e84e29152b6f65daa8dd90036" style="color: #1068bf;">b627b36e</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2023-01-23T09:11:17+00:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "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: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>Fix recompilation checking for multiple home units
The key part of this change is to store a UnitId in the
`UsageHomeModule` and `UsageHomeModuleInterface`.
* Fine-grained dependency tracking is used if the dependency comes from
any home unit.
* We actually look up the right module when checking whether we need to
recompile in the `UsageHomeModuleInterface` case.
These scenarios are both checked by the new tests (
multipleHomeUnits_recomp and multipleHomeUnits_recomp_th )
Fixes #22675
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/67d2e5d584126caea938dd71299412b18e2dc71c" style="color: #1068bf;">67d2e5d5</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2023-01-23T09:11:17+00:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "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: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>Augment target filepath by working directory when checking if module satisfies target
This fixes a spurious warning in -Wmissing-home-modules.
This is a simple oversight where when looking for the target in the
first place we augment the search by the -working-directory flag but
then fail to do so when checking this warning.
Fixes #22676
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/fcc135c0f0de2334d628a5da0875717206044868" style="color: #1068bf;">fcc135c0</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2023-01-23T09:11:17+00:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "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: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>Use NodeKey rather than ModuleName in pruneCache
The `pruneCache` function assumes that the list of `CachedInfo` all have unique `ModuleName`, this is not true:
* In normal compilation, the same module name can appear for a file and it's boot file.
* In multiple home unit compilation the same ModuleName can appear in different units
The fix is to use a `NodeKey` as the actual key for the interfaces which includes `ModuleName`, `IsBoot` and `UnitId`.
Fixes #22677
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/8db607d03bfbac4b6afc9c6696547e7953311b7d" style="color: #1068bf;">8db607d0</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2023-01-23T09:11:17+00:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "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: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>Recompilation checking: Don't try to find artefacts for Interactive & hs-boot combo
In interactive mode we don't produce any linkables for hs-boot files. So
we also need to not going looking for them when we check to see if we
have all the right objects needed for recompilation.
Ticket #22669
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/8174bdd0cd19562ef7ccc19d470a6f645fe685bf" style="color: #1068bf;">8174bdd0</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2023-01-23T09:11:17+00:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "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: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>Don't write o-boot files in Interactive mode
We should not be producing object files when in interactive mode but we
still produced the dummy o-boot files. These never made it into a
`Linkable` but then confused the recompilation checker.
Fixes #22669
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/9284b0317d039c6b24d502af99f2b8b1559f77df" style="color: #1068bf;">9284b031</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2023-01-23T09:11:17+00:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "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: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>Improve driver diagnostic messages by including UnitId in message
Currently the driver diagnostics don't give any indication about which unit they correspond to.
For example `-Wmissing-home-modules` can fire multiple times for each different home unit and gives no indication about which unit it's actually reporting about.
Perhaps a longer term fix is to generalise the providence information away from a SrcSpan so that these kind of whole project errors can be reported with an accurate provenance. For now we can just include the `UnitId` in the error message.
Fixes #22678
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/4264baf17807a2f6438c304cd9fb2193f91197b1" style="color: #1068bf;">4264baf1</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2023-01-23T09:11:17+00:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "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: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>Key ModSummary cache by UnitId as well as FilePath
Multiple units can refer to the same files without any problem. Just
another assumption which needs to be updated when we may have multiple
home units.
However, there is the invariant that within each unit each file only
maps to one module, so as long as we also key the cache by UnitId then
we are all good.
This led to some confusing behaviour in GHCi when reloading,
multipleHomeUnits_shared distils the essence of what can go wrong.
Fixes #22679
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/cf2443ab225f22ef690fcb316dad0567d0322fef" style="color: #1068bf;">cf2443ab</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2023-01-23T09:11:17+00:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "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: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>Finder: Look in current unit before looking in any home package dependencies
In order to preserve existing behaviour it's important to look within the current component before consideirng a module might come from an external component.
This already happened by accident in `downsweep`, (because roots are used to repopulated the cache) but in the `Finder` the logic was the wrong way around.
Fixes #22680
-------------------------
Metric Decrease:
MultiComponentModules
MultiComponentModulesRecomp
-------------------------p
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/f600c3efdbae82c2e92f19604b407c3922f15604" style="color: #1068bf;">f600c3ef</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2023-01-23T09:11:17+00:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "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: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>Debug: Print full NodeKey when pretty printing ModuleGraphNode
This is helpful when debugging multiple component issues.
</pre>
</li>
</ul>
<h4 style="margin-top: 10px; margin-bottom: 10px;">
30 changed files:
</h4>
<ul>
<li class="file-stats">
<a href="#8d6aef03ed289b00e929572be84eabee2ca66e52" style="color: #1068bf;">
compiler/GHC/Driver/Backend.hs
</a>
</li>
<li class="file-stats">
<a href="#3177183680205a840465ba6b8d33631394cca2d7" style="color: #1068bf;">
compiler/GHC/Driver/Errors/Ppr.hs
</a>
</li>
<li class="file-stats">
<a href="#820a2607941cd6fe77ba25c9a59b3f1ee106bb01" style="color: #1068bf;">
compiler/GHC/Driver/Errors/Types.hs
</a>
</li>
<li class="file-stats">
<a href="#9a679a2680ef6061397f1987091ea9f96ffe095d" style="color: #1068bf;">
compiler/GHC/Driver/Main.hs
</a>
</li>
<li class="file-stats">
<a href="#1dab250036d04cfcf3530f6ff27889f723cc2dda" style="color: #1068bf;">
compiler/GHC/Driver/Make.hs
</a>
</li>
<li class="file-stats">
<a href="#64e68d52c0898049455e20b0d001ffe1dd07ff83" style="color: #1068bf;">
compiler/GHC/Driver/Pipeline/Execute.hs
</a>
</li>
<li class="file-stats">
<a href="#74a7b3677ea9cb2138e0b682ce38fd67dbf57c14" style="color: #1068bf;">
compiler/GHC/HsToCore/Usage.hs
</a>
</li>
<li class="file-stats">
<a href="#7d51edda4fa76a202cce0bca672ef300249ba8ea" style="color: #1068bf;">
compiler/GHC/Iface/Load.hs
</a>
</li>
<li class="file-stats">
<a href="#a8e6b17fc507589522323d8dd20d9713e8c06760" style="color: #1068bf;">
compiler/GHC/Iface/Recomp.hs
</a>
</li>
<li class="file-stats">
<a href="#27f7fa37f7e08bdc4c1189197f04573076ce588f" style="color: #1068bf;">
compiler/GHC/Unit/Env.hs
</a>
</li>
<li class="file-stats">
<a href="#f4993649301794fc2c8cdece491d8b20f37638a6" style="color: #1068bf;">
compiler/GHC/Unit/Finder.hs
</a>
</li>
<li class="file-stats">
<a href="#887e29e8fb42c2e95ced4d97d29913d823a7d72f" style="color: #1068bf;">
compiler/GHC/Unit/Module/Deps.hs
</a>
</li>
<li class="file-stats">
<a href="#8e2fd61802dbf01ed3619fa8bab9f6f81df3de08" style="color: #1068bf;">
compiler/GHC/Unit/Module/Graph.hs
</a>
</li>
<li class="file-stats">
<a href="#07e6f97645f3af349d848d286a12d4713f4e8302" style="color: #1068bf;">
testsuite/tests/driver/Makefile
</a>
</li>
<li class="file-stats">
<a href="#5fa416f1d270030f8507f8c7c9415e996a22417a" style="color: #1068bf;">
<span class="new-file">
+
testsuite/tests/driver/T22669.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#68498d730e6ea745e1db10e39a96d408ec7b25fe" style="color: #1068bf;">
<span class="new-file">
+
testsuite/tests/driver/T22669.hs-boot
</span>
</a>
</li>
<li class="file-stats">
<a href="#f35886f290d7a8814ce6885523ffbdf7a729e6af" style="color: #1068bf;">
testsuite/tests/driver/all.T
</a>
</li>
<li class="file-stats">
<a href="#044316090d524a340c50c690aed2241b33ec0ce1" style="color: #1068bf;">
<span class="new-file">
+
testsuite/tests/driver/multipleHomeUnits/A.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#cf05c2055dad047dfe922327b7e432e4150d31b2" style="color: #1068bf;">
<span class="new-file">
+
testsuite/tests/driver/multipleHomeUnits/Dep.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#d7814f9a15548bdd5a7ad9db3becbd61eff3494e" style="color: #1068bf;">
testsuite/tests/driver/multipleHomeUnits/Makefile
</a>
</li>
<li class="file-stats">
<a href="#12450923c155820dc91e6334f1497ac8d5d6f778" style="color: #1068bf;">
<span class="new-file">
+
testsuite/tests/driver/multipleHomeUnits/Recomp.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#119c13f7a9a59d9c16ce5f16e1a606c6d455d45b" style="color: #1068bf;">
<span class="new-file">
+
testsuite/tests/driver/multipleHomeUnits/RecompTH.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#68f80eecd0dc3d97db1ea598da795e872af72324" style="color: #1068bf;">
testsuite/tests/driver/multipleHomeUnits/all.T
</a>
</li>
<li class="file-stats">
<a href="#c561b42608fbbb3ec837db84370efb9e8817786a" style="color: #1068bf;">
<span class="new-file">
+
testsuite/tests/driver/multipleHomeUnits/multipleHomeUnits_import_order.stderr
</span>
</a>
</li>
<li class="file-stats">
<a href="#55afe73ee985f1e73585ab5948fc88a860cd7dc8" style="color: #1068bf;">
<span class="new-file">
+
testsuite/tests/driver/multipleHomeUnits/multipleHomeUnits_recomp.stdout
</span>
</a>
</li>
<li class="file-stats">
<a href="#45de33180bca0a9c8c5091d18c09eecd71f2877e" style="color: #1068bf;">
<span class="new-file">
+
testsuite/tests/driver/multipleHomeUnits/multipleHomeUnits_recomp_th.stdout
</span>
</a>
</li>
<li class="file-stats">
<a href="#7d360557596b19270746d9e68f63581962318c3f" style="color: #1068bf;">
<span class="new-file">
+
testsuite/tests/driver/multipleHomeUnits/multipleHomeUnits_shared.stderr
</span>
</a>
</li>
<li class="file-stats">
<a href="#b4a228f1d1fe5417db8e17c93ba866ff6b4a57e9" style="color: #1068bf;">
<span class="new-file">
+
testsuite/tests/driver/multipleHomeUnits/multipleHomeUnits_warnings.stderr
</span>
</a>
</li>
<li class="file-stats">
<a href="#d274313605770f3c2074f961f7bffb2443586cc6" style="color: #1068bf;">
<span class="new-file">
+
testsuite/tests/driver/multipleHomeUnits/order-matters1/A.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#cd3b6b5814d43d79948cc08d618a1b86c13dd04d" style="color: #1068bf;">
<span class="new-file">
+
testsuite/tests/driver/multipleHomeUnits/order-matters1/B.hs
</span>
</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: #666;">
—
<br>
<a href="https://gitlab.haskell.org/ghc/ghc/-/compare/a01f5a8a2b52d675a72af37e543cec2451e99831...f600c3efdbae82c2e92f19604b407c3922f15604" style="color: #1068bf;">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" style="color: #1068bf;">gitlab.haskell.org</a>. <a href="https://gitlab.haskell.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link" style="color: #1068bf;">Manage all notifications</a> · <a href="https://gitlab.haskell.org/help" target="_blank" rel="noopener noreferrer" class="help-link" style="color: #1068bf;">Help</a>
</p>
</div>
</body>
</html>