feat(lsp): Add nargo capabilities for test metadata#2532
Merged
kevaundray merged 3 commits intomasterfrom Sep 13, 2023
Merged
Conversation
2 tasks
kevaundray
reviewed
Sep 1, 2023
kevaundray
reviewed
Sep 1, 2023
kevaundray
reviewed
Sep 1, 2023
kevaundray
reviewed
Sep 1, 2023
Member
|
This fails for me if the Nargo workspace isn't at the root of the folder open in VSCode. The issue stems from the extension only looking in the root for a |
phated
commented
Sep 5, 2023
phated
commented
Sep 5, 2023
Contributor
Author
Yep, this is a limitation of our reliance on Nargo.toml and VSCode Testing API not working with file paths. I believe this is a limitation that this feature needs to accept without a much larger rework of finding the project root can happen. |
fc88a8f to
6892488
Compare
kevaundray
approved these changes
Sep 13, 2023
TomAFrench
added a commit
that referenced
this pull request
Sep 15, 2023
* master: chore: Add deprecation message for default type in for loop (#2689) chore!: Change `noir-lang/noir-source-resolver` to `noir-lang/source-resolver` (#2718) chore: clippy fixes (#2719) chore: Integrate noir.js into workspace and CI release workflow (#2705) feat: Add initial version of noir.js (#2681) chore: switch `release-source-resolver.yml` to use yarn (#2704) chore: move stranded test to correct directory (#2701) chore(ci): deny wildcard dependencies (#2702) chore: fix `noirc_abi_wasm` publish for release-please (#2699) chore: introduce workspace for js packages (#2677) feat: Allow methods defined in a contract to be non-entry points (#2687) chore: revert some unwanted small changes from PR2180 (#2685) feat(lsp): Add nargo capabilities for test metadata (#2532) chore(ci): Add `cargo deny` workflow (#2682)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Problem*
Resolves #2442
Summary*
This reworks types for the LSP to allow us to send back custom capabilities, such as
{ "capabilities": { "codeLensProvider": { "resolveProvider": false }, "nargo": { "tests": { "fetch": true, "run": true, "update": true } }, "textDocumentSync": { "save": true } } }This also adds support for requesting metadata about tests, asking the LSP to run a test, and notifications for updating tests upon file save. These custom capabilities are in service of the Test Panel in vscode, but other LSP clients can decide not to implement them if they don't have testing APIs like vscode.
Documentation
This PR requires documentation updates when merged.
It's probably worth documenting the new UI elements that will be added to the vscode extension. I'll be including screenshots in the related PR that will be linked to this.
Additional Context
PR Checklist*
cargo fmton default settings.