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

LSP tripping out #1095

Open
waalge opened this issue Feb 12, 2025 · 2 comments
Open

LSP tripping out #1095

waalge opened this issue Feb 12, 2025 · 2 comments

Comments

@waalge
Copy link
Contributor

waalge commented Feb 12, 2025

What Git revision are you using?

#1094
a nix patch on latest release v1.1.11

What operating system are you using, and which version?

nixos

Describe what the problem is?

I tried

      let Input(oref, Output{ address, .. }) = input

and it said

I tripped over a confusing constructor destructuring [aiken::check::syntax::unused_record_fields]
2. Try instead: 
   
   ╰─▶ Input { output: oref, output_reference: Output { address, .. } } [aiken::check::syntax::unused_record_fields]

Also, a reoccurance of the LSP suggesting you pull in Script from crypto rather than address.

Think its trying to be too clever?

What should be the expected behavior?

I'm tired ... but this looks super odd.

@rvcas
Copy link
Member

rvcas commented Feb 13, 2025

Thanks, I'm going to do a round of LSP improvements soon

@waalge
Copy link
Contributor Author

waalge commented Feb 13, 2025

Another one

1. I struggled to unify the types of two expressions.
    [aiken::check::type_mismatch]
2. I am inferring the following type:
   
       (Address, Value, Datum, List<Input>)
   
   but I found an expression with a different type:
   
       (Address, Value, Datum, List<Input>)
   
   Either, add type-annotation to improve my inference, or adjust the expression to have the expected type. 

The above could definitely be more helpful.
Its not using my use .../types as t alias. The first of the Datums should be t.Datum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🪣 Backlog
Development

No branches or pull requests

2 participants