unison icon indicating copy to clipboard operation
unison copied to clipboard

delete.term with numbered arg fails and with a cryptic message

Open ceedubs opened this issue 1 year ago • 1 comments

@unison/cloud/fix-harder> dependents internal.Connection
 
  Dependents of: type internal.Connection
  
    Terms:
  
    1. connectTcp
    2. internal.Connection.stream
    3. internal.connectTls
  
  Tip: Try `view 3` to see the source of any numbered item in the above list.

@unison/cloud/fix-harder> delete.term 1
 
  1:1:
    |
  1 | #0nvef7e18virteotmgt6154hu7ve15pldl6v4uqqod71384811csd7tcko3qla9q3fgrpdo5jiepaeiatvnvqb4rl4h2ljvocjj7uj0
    | ^
  unexpected '#'
  expecting '.', '`', or operator (valid characters: !$%&*+-/:<=>\^|~)

ceedubs avatar Apr 25 '24 01:04 ceedubs

That is unexpected, thanks for reporting.

aryairani avatar Apr 25 '24 14:04 aryairani

Ah, this one is a perfect example of https://github.com/unisonweb/unison/pull/4962#discussion_r1617594164

dependents returns References as its numbered args (but prints based on the HashQualified Name). Then delete.term expects a name of some sort, which Reference doesn’t have, so it fails even though we can see the name we want right there.

sellout avatar May 29 '24 00:05 sellout