Issue was that it was unilaterally deleting the D2 dimension for whatever type was being unlinked (this is the dimension that supports efficient lookup by metadata type - "find me all the docs"). Correct behavior is to only delete from this dimension when there are no more metadata values for a metadata type - for instance, if you delete the last `Doc`, you can delete the index that lets you find all the docs.
- Revamped LinkI and UnlinkI - the md value is a HashQualified, so you can unlink by hash only now
- Support unnamed metadata in the diff display
- Remove HQ'.unsafeFromHQ, which was used in one place and was causing a crash
- Better output messages for various link/unlink failures
Exploded Codebase.referencesByPrefix into three functions:
- referencesByPrefix :: Text -> m (Set Reference.Id)
+ termReferencesByPrefix :: ShortHash -> m (Set Reference.Id)
+ typeReferencesByPrefix :: ShortHash -> m (Set Reference.Id)
+ termReferentsByPrefix :: ShortHash -> m (Set (Referent' Reference.Id))
for top-level terms, top-level types, and for Ref/Con mix.
They only return "derived" references, the thinking is that builtins will
come from a higher level api.
Exploded Command.ReferencesByShortHash into three functions
- ReferencesByShortHash :: ShortHash -> Command m i v (Set Reference.Id)
+ TypeReferencesByShortHash :: ShortHash -> Command m i v (Set Reference)
+ TermReferencesByShortHash :: ShortHash -> Command m i v (Set Reference)
+ TermReferentsByShortHash :: ShortHash -> Command m i v (Set Referent)
I actually don't remember why it was ok that it was Reference.Id before
but isn't now. Maybe we hadn't wanted to auto-complete Builtin names?
I don't remember.
controversial?
* Added a type arg `r` to `Referent`; type alias and patterns for compat.
* Deleted BranchUtil.getTermByShortHash because I'm guessing we no longer
want to limit such searches to the branch? Uncertain.
* Reference.fromShortHash rejects inputs with ctorIds in them; seemed
better than ignoring them, but I could imagine there being a case for
each.