GNOME Bugzilla – Bug 660698
scanner: remove backcompat copies more safely
Last modified: 2015-02-07 17:01:25 UTC
Instead of modifying the namespace while we are iterating over it, which leads to nodes not being tested, set a 'prune' property on the function and read it in the GIR writer.
Created attachment 198018 [details] [review] scanner: remove backcompat copies more safely Instead of modifying the namespace while we are iterating over it, which leads to nodes not being tested, set a 'prune' property on the function and read it in the GIR writer.
Review of attachment 198018 [details] [review]: How about "internal_skipped" or "was_moved"? I guess we could also just do the test directly in girwriter.py.
I don't care much about the actual name of the attribute. But I do prefer the conceptual separation between 'moved_to' and 'prune' (or whatever we end up calling it). With this patch, 'prune' is equivalent to 'moved_to && !introspectable'. But with the current patch set attached to bug 646742, 'prune' is also used for another case. So I think this should stay in IntrospectablePass as opposed to GIRWriter.
(In reply to comment #3) > I don't care much about the actual name of the attribute. Ok. Would you mind using 'internal_skipped' then? > But I do prefer the > conceptual separation between 'moved_to' and 'prune' (or whatever we end up > calling it). With this patch, 'prune' is equivalent to 'moved_to && > !introspectable'. But with the current patch set attached to bug 646742, > 'prune' is also used for another case. So I think this should stay in > IntrospectablePass as opposed to GIRWriter. I see - yes, makes sense.
Created attachment 222068 [details] [review] scanner: remove backcompat copies more safely Instead of modifying the namespace while we are iterating over it, which leads to nodes not being tested, set an 'internal_skipped' property on the function and read it in the GIR writer.
Above is an updated patch implementing the name change you suggested.
Created attachment 235449 [details] [review] scanner: remove backcompat copies more safely Instead of modifying the namespace while we are iterating over it, which leads to nodes not being tested, set an 'internal_skipped' property on the function and read it in the GIR writer.
Above is a rebased patch. I think it should be applied irregardless of the outcome of bug 646742.
Review of attachment 235449 [details] [review]: This looks good to me, thanks!
Committed with a small tweak to make the new code more closely match the old code. Thanks for the review.
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]