Warn Users When a Local Regal Binary for Development Isn't Found#449
Merged
anderseknert merged 2 commits intoMay 29, 2026
Conversation
anderseknert
approved these changes
May 28, 2026
Member
anderseknert
left a comment
There was a problem hiding this comment.
Excellent, thanks! Probably just missed something but dropped a question about it :)
| checkMissingBinaries(); | ||
|
|
||
| // warn if the configured opa.dependency_paths.opa points to a non-existent file | ||
| const opaBinaryInfo = resolveBinary(OPA_CONFIG, "opa"); |
Member
There was a problem hiding this comment.
Should this not be done for the Regal binary too?
Contributor
Author
There was a problem hiding this comment.
Yep, the binary was already being resolved on Regal startup though, so it didn't show up in the diff: https://github.com/open-policy-agent/vscode-opa/pull/449/changes#diff-1944111a462efb504e2d39ee24a9cb532c03164ada37caada104fecc06d874bdL156
So I just needed to add the OPA binary resolution here so I could know when to send the warning.
Add language server output and an IDE warning message when that flag is set Signed-off-by: seanledford <s_ledford@apple.com>
… language server activation functions. This allows us to also warn for OPA binaries that aren't found at language server startup Signed-off-by: seanledford <s_ledford@apple.com>
9fcaf62 to
8d5d446
Compare
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.
Recently we ran into an issue where a development regal binary path was checked into source control for Regal, and there was no warning that our configuration had changed! So we were falling through to the regal version on $PATH without knowing why.
These changes add a simple warning if the configured binary path in opa.dependency_paths.regal doesn't exist, whether it be a typo, or an unintended commit (oops!)
Here's a screenshot of the new language server output and warning: