[cfe-dev] JSONCompilationDB Parser

Stephen Kelly steveire at gmail.com
Thu Nov 29 11:38:44 PST 2012

Manuel Klimek wrote:

> On Thu, Nov 29, 2012 at 11:25 AM, Tobias Grosser
> <tobias at grosser.es> wrote:
>> On 11/29/2012 06:44 PM, Manuel Klimek wrote:
>>> Hi Ramneek,
>>> On Thu, Nov 29, 2012 at 7:19 AM, Ramneek Handa
>>> <ramneekhanda at gmail.com
>>> <mailto:ramneekhanda at gmail.com**>> wrote:
>>>     Why is it so strict? I am trying to write an ide backend would like
>>>     to use the compilation commands file to contain some extra
>>>     information so that i don't have to keep multiple files. the
>>>     following code in parse message doesn't allow me to keep any other
>>>     key but directory, command and file.
>>>     else {
>>>              ErrorMessage = ("Unknown key: \"" +
>>>                              KeyString->getRawValue() + "\"").str();
>>>              return false;
>>>            }
>>>     Could this be removed?
>>> In my experience being strict is better in the long run. It allows us to
>>> extend the format without the need to worry about clashing names with
>>> other mixed formats, and it surfaces errors early instead of hiding
>>> them.
>>> Is there a reason why having multiple files is a problem?
>> Hi Manuel,
>> I see your point. However, being strict has one large problem. If we at
>> some point decide to add additional information to the compilation
>> database, all previously released libclang tools will break. This means,
>> this restriction makes it even for ourselves unnecessarily hard and
>> disruptive to extend the compilation db format.
>> If possible, I would be very much in favor of removing this restriction
>> even before clang 3.2.
> If multiple people vote for it, I can most certainly be convinced
> otherwise...

I agree with Manuel.

Actually I don't see how previously released clang tools would break if the 
format was extended. Could you say how?



More information about the cfe-dev mailing list