unison
unison copied to clipboard
deepTerms/deepTypes Megaticket
Usages of deepTerms and deepTypes require forcing all names of everything under a given namespace, which is just infeasible and slow on large codebases. Also, it's infeasible to load everything like this in Enlil, so reducing these usages is just universally a GoodThing™
Here are some of the known usages:
lsuses it for computing number of contained definitions within namespaces. Even if we remove the definition count, we still need a way to filter for non-empty namespaces.- Used by non-empty-branch determination to filter out branches with empty contents but non-empty children. (We can fix this by keeping metadata about number of sub-definitions on the branch itself)
deepReferentsanddeepTypeReferents) usedeepTerms/deepTypes` and are used in propagation for computing dependency graphs- Used in computing branch diffs, this can probably just compute these on-demand rather than keeping them around on the type.
- Used in
Branch.toNamesfor computing all names for a branch, which is used all over the place. - ...
Uses for relational namespaces:
- Compute all referents/references used within a branch (need this for propagation without
deep* findusesdeepReferentsto determine which refs found in a type search have names in the branch; relational namespaces can help here.- Can ease building all names for a given branch.
- Can be used to filter out empty child-namespaces in ls without needing deep*