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

Show diagnostics and redirect them to stderr #70

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

Conversation

NRHelmi
Copy link
Contributor

@NRHelmi NRHelmi commented Mar 28, 2023

This PR aims to edit the way we show diagnostics to mimic the console way as described in the ticket below
https://relationalai.atlassian.net/browse/RAI-6706

Output example:

$> go run examples/execute/main.go --engine "test-engine" --database "test-db" -c "def output:x = 1
def output:y = fooo
def output:z = bar
def output:w = 2
"
{
    "id": "39397365-b592-1854-d784-79532b980dc0",
    "state": "COMPLETED"
}

// "output", "x", int64
output, x, 1

// "output", "w", int64
output, w, 2

Problems:
error: UNDEFINED, `fooo` is undefined. (2, 16)
2| def output:y = fooo
                  ^^^^

error: UNDEFINED, `bar` is undefined. (3, 16)
3| def output:z = bar
                  ^^^

Diagnositcs: errors: 2, exceptions: 0, warnings: 0

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

1 participant