Skip to content

Accept input from stdin during interpretation #3

@iamgio

Description

@iamgio

Since 9b0584f eu.iamgio.pikt.compiler.AbstractCompiler exposes the handleInput(stdin) function that allows writing to the Kotlin compiler's stdin from Pikt's CLI.

The main implementation is handled by eu.iamgio.pikt.compiler.Interpreter. It lets the user interact with the Kotlin script interpreter via Pikt's standard input.
A common scenario would be calling Pikt's readInput() function (defined in the stdlib) and expecting some input from the command line.

The issue is that, on Pikt's side, the stream keeps looking for some new input and keeps the process alive, despite being in another thread. When it's fed with a line, the stream is already closed and leads to an IOException.

The stdin is being temporarily locked again (the function call from AbstractCompiler was commented out) until a solution is found. Any kind of help would be highly appreciated.

issuedemo.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions