<div>If I recall the reasoning that went into it, it had to do with some of the build system limitations.</div><div><br></div><div>If the build system doesn't have an array, and instead has a string which happens to be properly quoted for the system's shell to expand, I wouldn't want the producer of the JSON database to be responsible for correctly parsing this into an array. Essentially, we didn't want produces to have to have a working parser for a line of shell. Sadly, I think there are quite a few systems in this category where there isn't a clear argument array intrinsically available.</div>
<div><br></div><div>I see three options:</div><div>1) Keep this as it is. What use cases would you have for changing it? What does it hurt the way it is now? Just that you have to run the string through the shell?</div><div>
<br></div><div>2) Allow either form -- a string or an array. I don't really like this because people would want to take advantage of the array form but it wouldn't always be there.</div><div><br></div><div>3) Require the array form. Maybe it's easier than I'm imagining to parse the strings into an array for each build system. If so, we could just go all the way here.</div>


<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 6, 2012 at 12:39 AM, Florian Weimer <span dir="ltr"><<a href="mailto:fweimer@redhat.com" target="_blank">fweimer@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">According to <a href="http://clang.llvm.org/docs/JSONCompilationDatabase.html" target="_blank">http://clang.llvm.org/docs/JSONCompilationDatabase.html</a>,<br>

the JSON Compilation Database uses a single string to describe the<br>
actual compile command, and not an array.  Is this string subject to any<br>
kind of shell expansion?  How is it supposed to be parsed into an argv<br>
array?<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Florian Weimer / Red Hat Product Security Team<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>
</font></span></blockquote></div><br></div>