unison icon indicating copy to clipboard operation
unison copied to clipboard

deepTerms/deepTypes Megaticket

Open ChrisPenner opened this issue 3 years ago • 0 comments

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:

  • ls uses 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)
  • deepReferents and deepTypeReferents) use deepTerms/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.toNames for 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*
  • find uses deepReferents to 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*

ChrisPenner avatar Aug 15 '22 18:08 ChrisPenner