Skip to content

Bypassing capture-output has unexpected behavior when running in REPL #446

Open
@alexhall

Description

@alexhall

Using the capture/bypass macro works as expected when running tests in the CLI. When running in the REPL (e.g. via cider-jack-in), however, I'm finding that the behavior is not as I would have expected. Namely, the fact that output goes directly to the process stdout/stderr streams means that when running tests in the REPL, output from this macro goes to the NREPL server's output buffer. Ideally this output would instead be written to the writers that NREPL installs in order to capture output, to be returned to the NREPL client and displayed in the Cider buffer.

One potential approach here would be to make the previous bindings for *out* and *err* available via bindings, and have the bypass macro detect and restore these rather than always going to the process file descriptors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions