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

feat(lsp): Publish diagnostics on file save #1676

Merged
merged 4 commits into from
Jun 16, 2023
Merged

Conversation

phated
Copy link
Contributor

@phated phated commented Jun 13, 2023

Description

Problem*

Resolves #1584

Summary*

This adds diagnostic publishing to the LSP. We decided to only run the diagnostic check on file save and then we perform the "push" diagnostic pattern. This is due to the compiler not being built to operate in "pull" diagnostic mode since the client can request them at any time with source code provided; however, the compiler expects a filesystem graph and builds it from scratch. We also decided to only run this on save because "file change" notifications can come in quicker than we can compile them.

Documentation

  • This PR requires documentation updates when merged.

    • I will submit a noir-lang/docs PR.
    • I will request for and support Dev Rel's help in documenting this PR.

Additional Context

I need to create some follow up issues related to TODOs before I move this out of draft.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@phated phated mentioned this pull request Jun 13, 2023
@phated phated marked this pull request as ready for review June 13, 2023 21:40
crates/lsp/src/lib.rs Outdated Show resolved Hide resolved
Cargo.toml Show resolved Hide resolved
jfecher
jfecher previously approved these changes Jun 16, 2023
Copy link
Contributor

@jfecher jfecher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I have one minor, non-blocking suggestion.

crates/lsp/src/lib.rs Show resolved Hide resolved
Copy link
Contributor

@kevaundray kevaundray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with merging this and creating issues for TODOs

@phated phated added this pull request to the merge queue Jun 16, 2023
Merged via the queue into master with commit c53bfc8 Jun 16, 2023
@phated phated deleted the phated/lsp-diagnostics branch June 16, 2023 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LSP: Implement diagnostics
3 participants