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: fix parse error violations #1344

Closed
charlieegan3 opened this issue Jan 16, 2025 · 4 comments · Fixed by #1352
Closed

lsp: fix parse error violations #1344

charlieegan3 opened this issue Jan 16, 2025 · 4 comments · Fixed by #1352
Labels
bug Something isn't working language server protocol

Comments

@charlieegan3
Copy link
Member

It appears this line is no longer getting a list of parse errors like we used to, and so we get no parse error violations any more.

https://github.com/StyraInc/regal/blob/main/internal/lsp/lint.go#L79

I guess something might have changed with our using Roast now?

@charlieegan3
Copy link
Member Author

Fixing this would aid in the solution for #1123

@anderseknert
Copy link
Member

Roast only serializes the parsed modules to JSON. The parsing is still done in Regal (via OPA, naturally), so it’s likely something we’ve changed here recently, perhaps with all the things that went into support Rego v1.

@charlieegan3
Copy link
Member Author

Roast only serializes the parsed modules to JSON.

🤦 of course.

@anderseknert
Copy link
Member

Well, not entirely impossibe after all — we use Roast to serialize all the things we can in Regal now. And I guess that includes errors. Still, I'd be surprised if that was the issue here... but who knows :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working language server protocol
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants