<div dir="ltr">On Wed, Sep 11, 2013 at 12:41 PM, Nicholas Gill <span dir="ltr"><<a href="mailto:mythagel@gmail.com" target="_blank">mythagel@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello cfe-dev,<div><br></div><div>At present unknown keys in the compile_commands.json file will cause the JSONCompilationDatabase parser to reject the file.</div>
<div><br></div><div>1. Would a patch to relax this constraint be accepted?</div>
<div>2. Would other consumers of the compile_commands.json be negatively impacted by unknown keys?</div></div></blockquote><div><br></div><div>Yes. This can be rather big, and being able to quickly parse it is important for interactive use cases.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>The motivating example (somewhat contrived) involves a single TU built with a different environment in two different targets </div>

<div><br></div><div>int main()</div><div>{</div><div>    TYPE i = -1;</div><div>    return i < 0;</div><div>}</div><div><br></div><div>cc -DTYPE=int source.c -o bin1</div><div>cc -DTYPE=uint16_t source.c -o bin2</div>
<div>
<br></div><div>So for my use case I'd like to add a (purely optional) target name to the compilation database (generated via cmake) - in order to be able to provide more accurate diagnostics to the user.</div></div></blockquote>
<div><br></div><div>I'd say that if we really want something more elaborate, we should try to design it first instead of randomly allowing to add fields in ways that might later break.</div><div><br></div><div>I'd be curious about other opinions though. (+Edwin, Daniel)</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br>
</div><div>Cheers,</div><div><br></div><div>-nick</div></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div></div>