<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:518085109;
        mso-list-type:hybrid;
        mso-list-template-ids:-1966566230 -2050430704 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<ul style="margin-top:0in" type="disc">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1"><span style="color:#212121">outputs = &gt; doesn't seem useful to me ?</span><o:p></o:p></li></ul>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">What is the reasoning behind that?<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<ul style="margin-top:0in" type="disc">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">logical-provides&nbsp;=&gt; exported-modules ( there can not be more than 1)<o:p></o:p></li></ul>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">True, but it can provides other files and other languages (e.g. Fortran) allow more than 1 – as Ben explained before.&nbsp; Furthermore, if people decide to have more than one module interface specification per file, the build system will already
 be set.&nbsp; I don’t want us to be repeating this painful discussion again.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Modules &lt;modules-bounces@lists.isocpp.org&gt; <b>On Behalf Of
</b>Corentin<br>
<b>Sent:</b> Monday, March 4, 2019 6:53 PM<br>
<b>To:</b> WG21 Tooling Study Group SG15 &lt;tooling@open-std.org&gt;<br>
<b>Cc:</b> modules@lists.isocpp.org; brad.king@kitware.com<br>
<b>Subject:</b> Re: [isocpp-modules] [Tooling] Dependency information for module-aware build tools<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Quick suggestions:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121">outputs = &gt; doesn't seem useful to me ?</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">logical-provides&nbsp;=&gt; exported-modules ( there can not be more than 1)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121">requires =&gt; required-modules</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121">Version =&gt; only one field should be enough (with a separator)</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121">As for utf8&nbsp;I would maybe not care about it?&nbsp;It would make the file
</span>json<span style="color:#212121">-like rather than </span>json<span style="color:#212121">, but it might be better to system-encode it? It's not meant to be shared</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121">And pretending filename are Unicode consistently leads to pain, unfortunately.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121">I think the TR should address these issues at some point :)</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121">Do we want to add a field for partitions specifically?&nbsp;</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121">I would support multiple files, ie</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121">{</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121">files : [</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121">&quot;foo.cpp&quot;: {</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121">&nbsp; &nbsp; &quot;requires&quot; : ...</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121">}</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121">]</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121">}</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">I would add a field (globally for the file), that gives the basepath for relative paths<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">By default, I would make relatives paths relatives to the JSON&nbsp;file?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Maybe add a global list of include paths since build systems often have to extract that from the compiler?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, 5 Mar 2019 at 02:35 Steve Downey &lt;<a href="mailto:sdowney@gmail.com">sdowney@gmail.com</a>&gt; wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal" style="margin-bottom:12.0pt">I believe the intent is for the compiler to emit where it was told, implicitly or explicitly, where the output is to go, and what it believes are the dependencies. The problem is make, where exact spelling counts.&nbsp;<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">On Mon, Mar 4, 2019, 20:30 Mathias Stearn &lt;<a href="mailto:redbeard0531%2Bisocpp@gmail.com" target="_blank">redbeard0531&#43;isocpp@gmail.com</a>&gt; wrote:<o:p></o:p></p>
</div>
</div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p>&nbsp;</o:p></p>
<div>
<div>
<p class="MsoNormal">On Mon, Mar 4, 2019, 7:09 PM Ben Boeckel &lt;<a href="mailto:ben.boeckel@kitware.com" target="_blank">ben.boeckel@kitware.com</a>&gt; wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><br>
Personally, my gut reaction is that this belongs at the build executor<br>
level, not the compiler. <o:p></o:p></p>
</blockquote>
</div>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">I don't think the build executor should need to know how to tell which changes within a BMI should or should not trigger downstream rebuilds.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">Currently, most of these do mtime-based<br>
detection. Easy to implement at the expense of potential excess work.<br>
Also easy to force the executor to redo something. Smarter executors might do<br>
content hashing detection of changes (I believe that bazel and similar<br>
tools effectively do this). Really smart ones might support a<br>
`content_hash = somecmd` to compute it for any output rule (possibly<br>
with some built-in). This would also potentially work with things like<br>
abidiff for object files and shared libraries too. I don't know how one<br>
would implement `rebuild_hash` semantics without backdating mtimes in<br>
existing executors which seems really finicky.<o:p></o:p></p>
</blockquote>
</div>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">At least for ninja it is easy. You just have an intermediate output.hash file that everything depends on and you have a restat=1 rule that updates it only when needed. I've done this and it works quite well
<a href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FRedBeard0531%2Fmongo_module_ninja%2Fcommit%2Ff19916bbb1d2f7c8b18d39f38559de72ba486cd2%23diff-2955d5257f635de1df53f55a171ca5c7&amp;data=02%7C01%7Cgdr%40microsoft.com%7C45a9da6f16504d4a386d08d6ac8b4d96%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636886111646706313&amp;sdata=3Xy5CS%2Blh5XdzWVDQUVXxqJsAyjnk9ogf09QkBpLN44%3D&amp;reserved=0" target="_blank">
https://github.com/RedBeard0531/mongo_module_ninja/commit/f19916bbb1d2f7c8b18d39f38559de72ba486cd2#diff-2955d5257f635de1df53f55a171ca5c7</a>.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><br>
I don't know that we can shoehorn this information into the output of<br>
the scan step and expect it to actually be implemented before we know<br>
what actually affects BMI output (cf. Clang assuming all flags affect<br>
BMI output and not even &quot;trying&quot; to guess).<o:p></o:p></p>
</blockquote>
</div>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Sure. I was thinking that this would be in the output of every compiler invocation, whether scanning, extracting a BMI, or compiling to an object file. Each stage would output information relevant to itself, and needed for later stages.
 You will need to get deps during compilation, not just the earlier stages, since it is legal to #include in the private module fragment, which hopefully would never even be lexed by earlier invocations.&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Also, I didn't notice this at first, but it looks like your proposed scan output is telling the build system where the compiler will be storing its outputs. It seems better to have it list the logical outputs it will generate, with later
 stages being told *exactly* where each file should be written. We already have a large problem with one case where the compiler decides on its own where to write files (split dwarf .dwo files) so I really don't want to introduce more cases like it. The build
 system tells the compiler where to put its output, not the other way around.<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
Modules mailing list<br>
<a href="mailto:Modules@lists.isocpp.org" target="_blank">Modules@lists.isocpp.org</a><br>
Subscription: <a href="https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.isocpp.org%2Fmailman%2Flistinfo.cgi%2Fmodules&amp;data=02%7C01%7Cgdr%40microsoft.com%7C45a9da6f16504d4a386d08d6ac8b4d96%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636886111646716322&amp;sdata=9uE4r7mMdihTjUfVP8Zo%2B7hMPYW51%2BegqMrefxCjSVg%3D&amp;reserved=0" target="_blank">
http://lists.isocpp.org/mailman/listinfo.cgi/modules</a><o:p></o:p></p>
</blockquote>
</div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">Link to this post: <a href="https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.isocpp.org%2Fmodules%2F2019%2F03%2F0128.php&amp;data=02%7C01%7Cgdr%40microsoft.com%7C45a9da6f16504d4a386d08d6ac8b4d96%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636886111646726330&amp;sdata=anMhUWUvf7TSTw%2B%2FuKTl9FT3ZLLUTIcN8v2fVb9ZIiQ%3D&amp;reserved=0" target="_blank">
http://lists.isocpp.org/modules/2019/03/0128.php</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal">_______________________________________________<br>
Tooling mailing list<br>
<a href="mailto:Tooling@isocpp.open-std.org" target="_blank">Tooling@isocpp.open-std.org</a><br>
<a href="https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.open-std.org%2Fmailman%2Flistinfo%2Ftooling&amp;data=02%7C01%7Cgdr%40microsoft.com%7C45a9da6f16504d4a386d08d6ac8b4d96%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636886111646726330&amp;sdata=DjMfLTtgzUfllgYKYgEUG60ezS6PRhq1SFOGsuupkDM%3D&amp;reserved=0" target="_blank">http://www.open-std.org/mailman/listinfo/tooling</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</body>
</html>