Skip to content

Capture stdout and stderr in eval plugin #1977

Open
@anka-213

Description

@anka-213

Steps to reproduce

Run the "Evaluate..." code lens on the following code

-- >>> putStrLn "Hello"

or

-- >>> hPutStrLn stderr "Hello"

Expected behaviour

It should put

-- Hello

in a comment below, just like it would do with normal return values.

Actual behaviour

In the stderr case, the output is sent to the debug output together with the logs.
In the stdout case I believe the output is sent in the LSP channel directly to the editor as is. If you're lucky, the editor's LSP parser will handle the error gracefully instead of just crashing or something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: hls-eval-plugintype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions