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 panics when contract with #[event] #4203

Closed
kobyhallx opened this issue Jan 30, 2024 · 1 comment
Closed

lsp panics when contract with #[event] #4203

kobyhallx opened this issue Jan 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@kobyhallx
Copy link
Contributor

kobyhallx commented Jan 30, 2024

Aim

Open noir source file with contract which uses events

Expected Behavior

LSP to function as usual

Bug

lsp crashes with
method not found

To Reproduce

  1. Open contract source code with #[event]
  2. Editor reports lsp crash

Installation Method

Compiled from source

Nargo Version

nargo version = 0.23.0 (git version hash: 882639d, is dirty: false)

Additional Context

Sample snippet

contract Foo {

    #[event]
    struct FooEvent {
        value: Field,
    }
}

Would you like to submit a PR for this Issue?

Yes

Support Needs

No response

@kobyhallx kobyhallx added the bug Something isn't working label Jan 30, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Jan 30, 2024
@kobyhallx kobyhallx self-assigned this Jan 30, 2024
@kobyhallx kobyhallx moved this from 📋 Backlog to 🏗 In progress in Noir Jan 30, 2024
github-merge-queue bot pushed a commit that referenced this issue Jan 31, 2024
# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

lsp panics when contract with #[event] #4203

## Summary\*

Replaces .expect calls with err returns.

## Additional Context



## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.

---------

Co-authored-by: jfecher <jake@aztecprotocol.com>
@asterite
Copy link
Collaborator

asterite commented Nov 27, 2024

Closing as done because the #[event] attribute doesn't cause LSP to panic anymore.

@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Noir Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ✅ Done
Development

No branches or pull requests

2 participants