[cfe-dev] Removal of the AST XML printer (r127141)
Douglas Gregor
dgregor at apple.com
Thu Mar 10 08:48:18 PST 2011
On Mar 10, 2011, at 5:05 AM, Anton Lokhmotov wrote:
> [Continuing a discussion started in cfe-commits. Please see below.]
>
> Hi Doug,
>
> We believe that the AST XML printer is very useful even in its current
> state, so its removal is not warranted. Yes, it represents Clang's internal
> AST but that's exactly why it is useful: there's simply no other way to dump
> Clang's AST in a form that other tools can parse. For example, we have
> developed a number of automatic AST tests based on the XML printer, which,
> if the printer is unavailable, we have to throw away (potentially
> compromising the quality of our compiler). It may be argued that potential
> future improvements will actually make it less suitable for such uses.
>
> If the problem is that a potential user can be let down by its
> incompleteness or instability, I can propose two alternatives. First,
> remove the XML printer from the Clang driver but otherwise leave it in the
> library (with a number of caveats). Second, allow us to come up with a
> cut-down version of the XML printer that will only be able, say, to output
> info for declarations. This will be easier to maintain, while not set up
> user expectations too high.
>
> Please let me know what you think.
This feature is not polished enough to be shipped. It is *very* incomplete, untested, undocumented, and unstable from version to version. It is irresponsible to ship features in this state.
Whenever a feature in this state is removed, there are always a few complaints that "it works for me". That may be an argument for those individuals, but it's not good enough for the project as a whole. Those individuals don't represent the potential users whom we lose because they see this unpolished feature and assume that it's indicative of the project as a whole.
The other common comment is that we should leave the feature in and improve it in the tree. It's a good argument in general, and *many* features have improved this way, but development on the AST XML printer has been stagnant for many, many months.
The solution is the same as it always is in the LLVM community: contribute patches to bring this feature up to a level of quality that we can be proud of.
- Doug
More information about the cfe-dev
mailing list