kamahen / pykythe

Generate code Python source cross-reference facts in Kythe format
Other
21 stars 3 forks source link

Unknown attr added to ${TYPESHED_FQN}.stdlib.2and3.builtins.object #18

Open kamahen opened 5 years ago

kamahen commented 5 years ago

It's not clear whether this is a bug or a feature.

As a feature, it means that all attrs that we can't resolve can be found. As a bug, it's probably too broad a grouping, and there should be some mechanism for defining a more limited per-"package" or per-"project" <unknown-...> rather than builtins.object; however defining this automatically could be tricky and defining it manually could be painful.

kamahen commented 5 years ago

We can circumscribe the possibilities to all the (recursive) imports. One possibility would be to add ref/possible to the Kythe data model, and then generate ref/possible for all entries in the symtab that match .attr ( a simple scan for all items ending with the attr should suffice).