<div dir="auto"><div dir="auto">Hi Andrey, </div><div dir="auto"><br></div><div dir="auto">I'm not sure what the original issue here is (should probably find the original message) but</div><div dir="auto"><div dir="auto"><br></div><div dir="auto">> <span style="font-family:sans-serif;font-size:12.8px">The Make build system happens to do the right thing, somehow. I believe we should be able to express the same logic in Shake, but it's not easy.</span></div><div dir="auto"><font face="sans-serif"><span style="font-size:12.8px"><br></span></font></div><div dir="auto"><font face="sans-serif"><span style="font-size:12.8px">I believe this typically works because GCC and GHC support dumping the dependencies that a command would have caused to a file. So your dynamic dependencies don't matter as their static to the build system after this invocation. </span></font></div><div dir="auto"><font face="sans-serif"><span style="font-size:12.8px"><br></span></font></div><div dir="auto"><font face="sans-serif"><span style="font-size:12.8px">See <br></span></font><a href="https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/separate_compilation.html#dependency-generation">https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/separate_compilation.html#dependency-generation</a></div><div dir="auto"><br></div><div dir="auto">These Compilers are able to dump out make rules which enabled better dependency handling.. </div><div dir="auto"><br></div><div dir="auto">Kind regards, </div><div dir="auto">Tamar </div><div dir="auto"><br><div data-smartmail="gmail_signature" dir="auto">Sent from my Mobile</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 10, 2019, 00:58 Andrey Mokhov <<a href="mailto:andrey.mokhov@newcastle.ac.uk" target="_blank" rel="noreferrer">andrey.mokhov@newcastle.ac.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-GB" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal">Hi Simon,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">(Re-sending from the email address that’s allowed on the mailing list.)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">> Ugh.  That's not a very happy state of affairs, is it?  It didn't happen with 'make'.
<u></u><u></u></p>
<p class="MsoNormal">> Is it a fundamental problem, or just not yet fixed?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I think this is not a fundamental problem, but the problem of getting dependencies right.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">In this case, the complexity comes from the fact that a single invocation of GHC produces a set of files, and which set depends on the command line flags, which are in turn determined dynamically by reading environment settings (specifically,
 `platformSupportsSharedLibs`). <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Such rules are hard to describe precisely, because build systems are tuned to the typical case where we statically know, for every output file, which rule produces it -- recall the Tasks = k -> Maybe Task function from our paper. In this
 case, we deal with something like k -> f (Maybe Task) instead, i.e. with `f` around the Maybe.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">The Make build system happens to do the right thing, somehow. I believe we should be able to express the same logic in Shake, but it's not easy.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">(I never really had a chance to look at dynamic builds, since they are not supported on Windows. I guess I should finally find a Linux box for Hadrian.)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Cheers,<u></u><u></u></p>
<p class="MsoNormal">Andrey<u></u><u></u></p>
</div>
</div>

_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" rel="noreferrer noreferrer" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div></div>