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 to set nargo path based on nargo or aztec-nargo #4233

Closed
rahul-kothari opened this issue Feb 2, 2024 · 3 comments
Closed

LSP to set nargo path based on nargo or aztec-nargo #4233

rahul-kothari opened this issue Feb 2, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request lsp Language Server Protocol

Comments

@rahul-kothari
Copy link

Problem

Currently aztec.nr devs need to manually set the VS Code path to point to aztec-nargo. Ideally this is automated.
make it part of Nargo.toml config, where plugin could look at type=contract or type=bin to decide if they are using aztec-nargo which resides at /Users/rahulkothari/.aztec/bin/aztec-nargo or nargo which is automatically found.

Happy Case

No manual config necessary.
Remember that some coders use both nargo and aztec-nargo

Alternatives Considered

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

@rahul-kothari rahul-kothari added the enhancement New feature or request label Feb 2, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Feb 2, 2024
@Savio-Sou Savio-Sou moved this from 📋 Backlog to 🤔 Grooming in Noir Feb 2, 2024
@Savio-Sou
Copy link
Collaborator

Just to make sure I'm on the same page with the problem:

  1. Is the Issue here that the Noir Language Support VS Code extension picks up:
    i. nargo at its vanilla default location
    ii. But not aztec-nargo at its own different default location?
  2. Which leads to:
    i. Aztec devs without nargo doesn't get LSP features in VS Code
    ii. Aztec devs with nargo (but at a different version versus aztec-nargo) gets "incorrect" LSP features in VS Code?

Assuming the understanding above is correct, there are two possible solutions off the top of my hat:

  1. Modify the VS Code extension to also pick up aztec-nargo at its custom default location
    i. As originally suggested in this Issue
    ii. Quite opinionated imo
    iii. Should transfer this Issue to the [vscode-noir] repo if we're going this path
  2. Modify aztec-nargo to symlink as nargo at the vanilla default location
    i. I would prefer this (but am not aware if this carries any potential contract development problems)

Great to hear your further thoughts @rahul-kothari.

@rahul-kothari
Copy link
Author

So some assumptions are correct, some not:

  1. Right - nargo is picked up but not aztec-nargo
  2. (i) -> right. Even though they have aztec-nargo they don't get LSP features. Currently we ask them to update their VSCode settings and update the Noir: Nargo Path field to point to your aztec-nargo executable.
  3. (ii) -> if you have nargo, then LSP works fine. There is no "incorrect" version. But most aztec devs won't have nargo
  4. Both the options work although your 2nd suggestion of symlinking as nargo is a bad idea since if a user later installs nargo, things wouldn't work as expected. Which is why @kobyhallx on a slack discussion suggested (1): https://aztecprotocol.slack.com/archives/C049J23DN64/p1705486419833919?thread_ts=1705423615.091329&cid=C049J23DN64

@kobyhallx kobyhallx self-assigned this Feb 7, 2024
@kobyhallx kobyhallx moved this from 🤔 Grooming to 📋 Backlog in Noir Feb 7, 2024
@Savio-Sou Savio-Sou added the lsp Language Server Protocol label Feb 8, 2024
@TomAFrench
Copy link
Member

Closed in noir-lang/vscode-noir#67

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lsp Language Server Protocol
Projects
Archived in project
Development

No branches or pull requests

4 participants