-
Notifications
You must be signed in to change notification settings - Fork 67
Filter categories #271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
* make primitive types lowercased * remove part statements * add jset, jlist, jmap and jiterator * add JNumber and JBoolean, JInteger and other boxed types * increase coverage
* make primitive types lowercased * remove part statements * add jset, jlist, jmap and jiterator * add JNumber and JBoolean, JInteger and other boxed types * increase coverage
Putting some numbers on the issue raised in my duplicate issue, where having any reference to |
Blocked on #1259. Once I've implemented transformers, I'll overhaul how categories are implemented. |
Note to self:
|
One unfortunate thing I've noticed is that there are a bunch of methods that the Apple documentation treats as ordinary methods, but are actually methods on a category. For example So when users are missing method, they're going to have to Maybe we need an |
This doesn't always work. If the method returns For example, I think the fix is to copy category methods that return |
If we're changing Obj-C generation to not auto-include all types in methods, I think this would be fine. That would still avoid the problem of 'include any view'->'include NSView'->'include all NSView extensions'->'include every type, transitively, reachable from any method in any extension of NSView' that led to the crazy bloat I hit above. |
Currently filters are applied during parsing. When parsing part of the AST, we check if the node passes the config's filters. Transitive deps are handled using the
ignoreFilters
flag, because if A passes the filters, and depends on B, B should be included even if it doesn't pass the filters.This works ok, but it's a bit complicated, and it means we need stuff like
_CreateTypeFromCursorResult
(see comments on that class). It's also problematic for categories, where the dependency arrow is backwards.Categories are basically extension methods, so if A is an extension of B it should only be included if B is. But in the AST, A points to B. So the
ignoreFilters
approach won't work (if B is included later, how will we know we need to reprocess A?).A more robust approach would be to just parse everything, and then apply the filters afterwards (though this might have a performance impact for huge imports).
The text was updated successfully, but these errors were encountered: