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

Visualization Errors Are Not Reported #1557

Closed
mwu-tow opened this issue Mar 8, 2021 · 0 comments · Fixed by #1671
Closed

Visualization Errors Are Not Reported #1557

mwu-tow opened this issue Mar 8, 2021 · 0 comments · Fixed by #1671
Assignees
Labels
p-medium Should be completed in the next few sprints

Comments

@mwu-tow
Copy link
Contributor

mwu-tow commented Mar 8, 2021

General Summary

If the visualization sets preprocessor code that yields an error, this error is not reported in any way to IDE.

This is really troublesome, as developing or debugging visualizations when there is something wrong in the preprocessor code becomes guesswork.

Steps to Reproduce

Create a visualization that sets nonsensical preprocessor expression. Wait for updates.

See the example request IDE makes under such condition and the reply:

{
    "jsonrpc": "2.0",
    "id": 18,
    "method": "executionContext/attachVisualisation",
    "params": {
        "expressionId": "1f9ca20f-5143-4010-819d-7b4a4768e477",
        "visualisationConfig": {
            "executionContextId": "38358e93-60ef-400f-bb25-c084e51af57d",
            "expression": "hey -> this is pure nonsense",
            "visualisationModule": "Unnamed.Main"
        },
        "visualisationId": "a1cced79-1e4b-47f6-a85d-73f766325372"
    }
}

{
    "jsonrpc": "2.0",
    "id": 18,
    "result": null
}

Expected Result

  1. if expression can feasibly be proven to be incorrect, attaching should fail;
  2. if expression's validity depends on runtime conditions, the error should be reported through appropriate channels (binary connection?).

Basically, IDE needs to observe some results of visualization, be it correct values or errors on whatever stage.

Actual Result

Attaching succeeds but visualization never receives any data. No error nor diagnostics are provided to explain this silence.

In the logs one can find line

[warn] [2021-03-08T17:28:42.928Z] [org.enso.languageserver.protocol.json.JsonConnectionController] Received unknown message: VisualisationEvaluationFailed(38358e93-60ef-400f-bb25-c084e51af57d,Compile error: Variable `is` is not defined.)

but it is not easily accessible.

Enso Version

0.2.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p-medium Should be completed in the next few sprints
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants