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

fix: don't serialize error location using roast but encoding/json #1020

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

anderseknert
Copy link
Member

Fixes #1017

Which turned into a bug hunt..

Also fixed:

  • ast.resolved_imports crashing on duplicate identifiers
  • node_modules not excluded from fs walk, as @srenatus reported

Opening the OPA repo now works as expected. The 500+ linter issues notwithstanding.

Fixes #1017

Which turned into a bug hunt..

Also fixed:
- ast.resolved_imports crashing on duplicate identifiers
- node_modules not excluded from fs walk, as @srenatus reported

Opening the OPA repo now works as expected. The 500+ linter
issues notwithstanding.

Signed-off-by: Anders Eknert <anders@styra.com>
@anderseknert anderseknert changed the title Bug hunt fix: don't serialize error location using roast but encoding/json Aug 28, 2024
Copy link
Contributor

@charlesdaniels charlesdaniels left a comment

Choose a reason for hiding this comment

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

This looks reasonable to me, but since it seems like there are 3 different places where we want to filter out certain directories that should normally be ignored, maybe that should be centralized into one library in internal?

@anderseknert
Copy link
Member Author

@charlesdaniels yeah, I guess the rule of three applies now.. I did look into that in the past but in the context of allowing providing that list via configuration... and that turned out to be complex. So they've remained hard-coded. You're right though — they could probably find a common location. I'll look into that next.

@anderseknert anderseknert merged commit a9d4e2f into main Aug 28, 2024
3 checks passed
@anderseknert anderseknert deleted the parse-error-unmarshalling branch August 28, 2024 21:33
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
Fixes StyraInc#1017

Which turned into a bug hunt..

Also fixed:
- ast.resolved_imports crashing on duplicate identifiers
- node_modules not excluded from fs walk, as @srenatus reported

Opening the OPA repo now works as expected. The 500+ linter
issues notwithstanding.

Signed-off-by: Anders Eknert <anders@styra.com>
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.

Language server fails to start when opening the OPA repo
2 participants