Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Permit mixed record/namespace search to depth 5
Summary: Due to lack of recursion, we unroll the branches of the cxx1.Scope term as cases in Angle. The pure namespace case is just a flat list, so its fairly easy to handle (e.g. a symbol under a lot of namespaces). We allow these to length 7 (i.e. a search term of length 8, where the prefix is 7 namespaces). For recordWithAccess, there are two inner terms, either the record's parent is a namespace or another record. The various combinations of these lead to some bloat so we only tried to depth 4. This patch adds depth 5, where the prefix at position 5 must be a namespace. `NS::(Rec|NS)::(Rec|NS)::(Rec|NS)::(Rec|NS)::Sym` will work. ## how to solve it long term I think to do this well we need to reindex the type Scope in cxx.angle to be a flat, addressable structure indexed by suffix. Then arbitrary dotted scope terms would work. This would require enumeratnig terms and flattening them (effectivley recursion at deriving time to flatten things) OR we get proper recursion and can express this as a query either in a derived predicate or a query. Reviewed By: josefs Differential Revision: D68193102 fbshipit-source-id: 33c40b4170100cb5ba31b013abc4e0bcc0715f31
- Loading branch information