Skip to content

Trim Debug.log from stdout? #11

@kachkaev

Description

@kachkaev

I noticed that if the Elm module we run produces any Debug output, run-elm's stdout does not look as expected. As a consequence, there is a chance that a script that uses this output can get unparsable data and crash.

Perhaps, we could solve this by introducing a new flag that --exclude-debug would trim any output that ends up in stdout before the value of the --output symbol. We may approach this by adding Debug.log "===== run-elm output start =====" to RunElmMain*.elm.template and call output.substring(...) later in JavaScript.

Current behaviour can remain default to avoid a breaking change.

Do there exist any other means to clutter stdout except Debug.log? What shall we do with Debug.crash?

I'm happy to add tests and submit a PR that covers these cases.

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