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

vscode plugin makes LSP (nargo) crash if extraneous files are on src directory #4379

Closed
fcarreiro opened this issue Feb 15, 2024 · 0 comments · Fixed by #4380
Closed

vscode plugin makes LSP (nargo) crash if extraneous files are on src directory #4379

fcarreiro opened this issue Feb 15, 2024 · 0 comments · Fixed by #4380
Labels
bug Something isn't working

Comments

@fcarreiro
Copy link

Aim

I was trying to use Noir Language Support (v0.0.9) on vscode, on this contract on a mac, pointing (aztec-)nargo to Aztec's sandbox 0.24.

Expected Behavior

Noir analysis works, no crash.

Bug

Crashes in varios ways.

To Reproduce

  1. If you just create a file .DS_Store with some content in the src dir, reload vscode window, it crashes.
[Info  - 1:13:14 PM] Starting LSP client using command: /Users/facundo/.aztec/bin/aztec-nargo lsp
{"codeLensProvider":{"resolveProvider":false},"declarationProvider":true,"definitionProvider":true,"documentFormattingProvider":true,"nargo":{"tests":{"fetch":true,"run":true,"update":true}},"textDocumentSync":1,"typeDefinitionProvider":true,"resolvedTextDocumentSync":{"openClose":true,"change":1,"save":{"includeText":false}}}
[31mThe application panicked (crashed).[0m
Message:  [36mcould not read file "/Users/facundo/Desktop/sandbox/contracts/counter/src/.DS_Store" into string[0m
Location: [35mtooling/nargo/src/lib.rs[0m:[35m76[0m
  1. If you creare a file called something, no matter the content, in src, reload, it crashes (Message: [36mexpected all file paths to have an extension[0m)

Project Impact

None

Impact Context

No response

Workaround

Yes

Workaround Description

Delete all files in src which are not .nr, reload.

Additional Context

% aztec-nargo --version
nargo version = 0.23.0
noirc version = 0.23.0+5f5843e35052b9d3599b8ab4f7633db0a225e82f
(git version hash: 5f5843e, is dirty: false)

Installation Method

None

Nargo Version

0.23

NoirJS Version

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

@fcarreiro fcarreiro added the bug Something isn't working label Feb 15, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Feb 15, 2024
@fcarreiro fcarreiro changed the title vscode plugin makes nargo crash if extraneous files are on src directory vscode plugin makes LSP (nargo) crash if extraneous files are on src directory Feb 15, 2024
github-merge-queue bot pushed a commit that referenced this issue Feb 15, 2024
# Description

## Problem\*

Resolves #4379

## Summary\*

This PR adds a filter so we only add files with a `.nr` extension to the
file manager.

## 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.
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Feb 15, 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
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant