<div dir="ltr"><div><br></div><div>Quick suggestions:</div><div><br></div><div><span style="color:rgb(33,33,33)">outputs = > doesn't seem useful to me ?</span></div><div>logical-provides => exported-modules ( there can not be more than 1)</div><div><span style="color:rgb(33,33,33)">requires => required-modules</span><br></div><div><span style="color:rgb(33,33,33)">Version => only one field should be enough (with a separator)</span></div><div><span style="color:rgb(33,33,33)"><br></span></div><div><span style="color:rgb(33,33,33)">As for utf8 </span><span style="color:rgb(33,33,33)">I would maybe not care about it? </span><span style="color:rgb(33,33,33)">It would make the file </span>json<span style="color:rgb(33,33,33)">-like rather than </span>json<span style="color:rgb(33,33,33)">, but it might be better to system-encode it? It's not meant to be shared</span></div><div><span style="color:rgb(33,33,33)">And pretending filename are Unicode consistently leads to pain, unfortunately.</span></div><div><span style="color:rgb(33,33,33)">I think the TR should address these issues at some point :)</span></div><div><span style="color:rgb(33,33,33)"><br></span></div><div><span style="color:rgb(33,33,33)"><br></span></div><div><font color="#212121">Do we want to add a field for partitions specifically? </font></div><div><font color="#212121">I would support multiple files, ie</font></div><div><font color="#212121"><br></font></div><div><font color="#212121"><br></font></div><div><font color="#212121">{</font></div><div><font color="#212121">files : [</font></div><div><font color="#212121">"foo.cpp": {</font></div><div><font color="#212121"> "</font><span style="color:rgb(33,33,33)">requires" : ...</span></div><div><font color="#212121">}</font></div><div><font color="#212121">]</font></div><div><font color="#212121">}</font></div><div><font color="#212121"><br></font></div><div>I would add a field (globally for the file), that gives the basepath for relative paths</div><div>By default, I would make relatives paths relatives to the JSON file?</div><div><br></div><div>Maybe add a global list of include paths since build systems often have to extract that from the compiler?</div><div><font color="#212121"><br></font></div><div><span style="color:rgb(33,33,33)"><br></span></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 5 Mar 2019 at 02:35 Steve Downey <<a href="mailto:sdowney@gmail.com">sdowney@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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. <br><br><div class="gmail_quote"></div><div class="gmail_quote"><div dir="ltr">On Mon, Mar 4, 2019, 20:30 Mathias Stearn <<a href="mailto:redbeard0531%2Bisocpp@gmail.com" target="_blank">redbeard0531+isocpp@gmail.com</a>> wrote:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 4, 2019, 7:09 PM Ben Boeckel <<a href="mailto:ben.boeckel@kitware.com" rel="noreferrer noreferrer noreferrer" target="_blank">ben.boeckel@kitware.com</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Personally, my gut reaction is that this belongs at the build executor<br>
level, not the compiler. </blockquote></div></div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">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://github.com/RedBeard0531/mongo_module_ninja/commit/f19916bbb1d2f7c8b18d39f38559de72ba486cd2#diff-2955d5257f635de1df53f55a171ca5c7" rel="noreferrer noreferrer" target="_blank">https://github.com/RedBeard0531/mongo_module_ninja/commit/f19916bbb1d2f7c8b18d39f38559de72ba486cd2#diff-2955d5257f635de1df53f55a171ca5c7</a>.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<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 "trying" to guess).<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">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. </div><div dir="auto"><br></div><div dir="auto">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.</div></div>
_______________________________________________<br>
Modules mailing list<br>
<a href="mailto:Modules@lists.isocpp.org" target="_blank">Modules@lists.isocpp.org</a><br>
Subscription: <a href="http://lists.isocpp.org/mailman/listinfo.cgi/modules" rel="noreferrer" target="_blank">http://lists.isocpp.org/mailman/listinfo.cgi/modules</a><br></blockquote></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Link to this post: <a href="http://lists.isocpp.org/modules/2019/03/0128.php" rel="noreferrer" target="_blank">http://lists.isocpp.org/modules/2019/03/0128.php</a><br>
</blockquote></div>
_______________________________________________<br>
Tooling mailing list<br>
<a href="mailto:Tooling@isocpp.open-std.org" target="_blank">Tooling@isocpp.open-std.org</a><br>
<a href="http://www.open-std.org/mailman/listinfo/tooling" rel="noreferrer" target="_blank">http://www.open-std.org/mailman/listinfo/tooling</a><br>
</blockquote></div>