[cfe-commits] [PATCH] Add Python bindings to comment AST introspection APIs

Gregory Szorc gregory.szorc at gmail.com
Thu Dec 20 17:13:37 PST 2012


On 12/20/12 5:01 PM, Dmitri Gribenko wrote:
> On Fri, Dec 21, 2012 at 2:58 AM, Gregory Szorc <gregory.szorc at gmail.com> wrote:
>> On 12/20/12 4:37 PM, Douglas Gregor wrote:
>>> I'm fine with removing the comment AST traversal routines. The XML is far
>>> better for clients.
>>>
>> XML is arguably a decent interchange format. But, I'd much prefer a more
>> native and low-level API like we have today. I think it's terrific that
>> comment XML is available. But, I think it is silly to force the incurred the
>> cost for serialization and deserialization just to pass data through
>> libclang.
>>
>> If you want to refactor the comment API so it isn't traversal based, I say
>> go for it. But please don't force libclang consumers to use XML.
> What should happen to these APIs when the comment AST on the C++ side
> of Clang changes?

What should happen to the XML when the comment AST on the C++ side of 
Clang changes?

We're going to have API compatibility issues one way or another I think. 
Perhaps the right thing to do is clearly mark all comment APIs 
"experimental - use at your own risk" until things have stabilized?

Also, going back to the root of this thread - it sounds like the comment 
API will soon change. As much as I would like to see the Python bindings 
gain this feature, perhaps its best to hold off on landing until things 
have stabilized?



More information about the cfe-commits mailing list