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

Improve LSP error reporting #1950

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Improve LSP error reporting #1950

wants to merge 4 commits into from

Conversation

sgpthomas
Copy link
Collaborator

@sgpthomas sgpthomas commented Mar 1, 2024

  • Actually run papercut, well-formed, and synthesis-papercut passes
  • support multiple errors in a single file
  • figure out what to do about primitive files that have no main component
  • Report parsing errors at reported location
  • handle errors that don't report location
  • add infrastructure for reporting warnings

@sgpthomas
Copy link
Collaborator Author

It's fun to flip through the error tests and see errors being reported.

Screen.Recording.2024-03-01.at.11.46.57.AM.mov

@sampsyo
Copy link
Contributor

sampsyo commented Mar 2, 2024

Dang, this is awesome.

introduce `DiagnosticContext` that passes can optionally add errors to.
a `DiagnosticPass` is a pass that can produce an iterator of errors.
when a pass is a `DiagnosticPass`, you can register with
`.register_diagnostic()`. this returns the first error that the pass
accumulates, if any.

also update calyx-lsp to use new diagnostic passes so that it can
report multiple errors in a file.
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.

None yet

2 participants