Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

LSP: Provide output.json option for non-VS Code clients #972

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

anderseknert
Copy link
Member

And use a reader instead of a string for input as suggested by @charlieegan3

value := result.Value
if result.IsUndefined {
// Display undefined as an empty object
// we could also go with "<undefined>" or similar
Copy link
Member

Choose a reason for hiding this comment

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

I quite like the idea of calling it undefined rather than the empty object myself...

Copy link
Member Author

@anderseknert anderseknert Aug 7, 2024

Choose a reason for hiding this comment

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

I'm not too sure, as it makes it hard to differentiate from the actual string value of "undefined"...
Using "" as print does is a little better. But for now I went with empty object as that's what opa eval prints by default, e.g.

> opa eval input.foo
{}

Copy link
Member

@charlieegan3 charlieegan3 left a comment

Choose a reason for hiding this comment

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

LGTM

And use a reader instead of a string for input as suggested by @charlieegan3

Signed-off-by: Anders Eknert <anders@styra.com>
@anderseknert anderseknert merged commit 63e7155 into main Aug 7, 2024
3 checks passed
@anderseknert anderseknert deleted the code-lens-continued branch August 7, 2024 13:02
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
And use a reader instead of a string for input as suggested by @charlieegan3

Signed-off-by: Anders Eknert <anders@styra.com>
charlieegan3 pushed a commit to charlieegan3/regal that referenced this pull request Jan 6, 2025
And use a reader instead of a string for input as suggested by @charlieegan3

Signed-off-by: Anders Eknert <anders@styra.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants