Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Tracked by #4899
ceedubs opened this issue Apr 25, 2024 · 2 comments · Fixed by #5019
Closed
Tracked by #4899

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

ceedubs opened this issue Apr 25, 2024 · 2 comments · Fixed by #5019
Assignees
Labels
codebase-manager / ucm Issues related to the codebase editor CLI application (ucm)

Comments

@ceedubs
Copy link
Contributor

ceedubs commented Apr 25, 2024

@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 ceedubs added the codebase-manager / ucm Issues related to the codebase editor CLI application (ucm) label Apr 25, 2024
@aryairani
Copy link
Contributor

That is unexpected, thanks for reporting.

@sellout
Copy link
Contributor

sellout commented May 29, 2024

Ah, this one is a perfect example of #4962 (comment)

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 added a commit to sellout/unison that referenced this issue May 29, 2024
sellout added a commit to sellout/unison that referenced this issue May 29, 2024
Almost everywhere we produce a `Reference` for numbered args, we also have a
`HashQualified Name` handy, which is much more consumable by commands.

The only case we don’t have an `HQ` is in the `todo` command output, so that now explicitly builds
a `HQ.HashOnly`.

This also fixes an issue with `StructuredArgument` handling where `alias.term`
and `alias.type` wouldn’t make an alias to a `HQ.HashOnly` `StructuredArgument`.

Fixes unisonweb#4898.
sellout added a commit to sellout/unison that referenced this issue May 29, 2024
sellout added a commit to sellout/unison that referenced this issue May 29, 2024
Almost everywhere we produce a `Reference` for numbered args, we also have a
`HashQualified Name` handy, which is much more consumable by commands.

The only case we don’t have an `HQ` is in the `todo` command output, so that now explicitly builds
a `HQ.HashOnly`.

This also fixes an issue with `StructuredArgument` handling where `alias.term`
and `alias.type` wouldn’t make an alias to a `HQ.HashOnly` `StructuredArgument`.

Fixes unisonweb#4898.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codebase-manager / ucm Issues related to the codebase editor CLI application (ucm)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants