<!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/9c73022aa34ce2c858b9f129dad3e438fb3baa55" style="color: #1068bf;">9c73022a</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2022-12-27T13:31:43+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/bbd5e8bc810f4635f3bf7bd7797308da2fe7f892" style="color: #1068bf;">bbd5e8bc</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2022-12-27T13:31:43+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/75c3875ddfcde448eaa3ea12fde157f5aec00bbf" style="color: #1068bf;">75c3875d</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2022-12-27T13:31:43+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/dab752020bcb2efbee66a8b3a5c4a44f3b8a56cc" style="color: #1068bf;">dab75202</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2022-12-27T13:31:43+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/e89968f57f141e2a70eccf9d119bc764cc295f74" style="color: #1068bf;">e89968f5</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2022-12-27T13:31:43+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/6fcb40c05d0a94bc83958b173b7ab6820ca965db" style="color: #1068bf;">6fcb40c0</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2022-12-27T13:31:43+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/fee57fa50b5087890394cb0e42219c52e2158719" style="color: #1068bf;">fee57fa5</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2022-12-27T13:31:43+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/38f578ba43e87afec2abe101652cbbed9b00fafa" style="color: #1068bf;">38f578ba</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2022-12-27T13:31:44+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
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/117378b9a101ffad62e7309c851b39a346169225" style="color: #1068bf;">117378b9</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2022-12-27T13:31:44+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/a415a312c629de4214db05264530fdccd8fe9a89...117378b9a101ffad62e7309c851b39a346169225" 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>