Skip to content

log-level logdebug repeatedly clears the terminal during output #673

@jwatts-maybe

Description

@jwatts-maybe

Running any Essence model (including an empty one) with the -log-level flag set to logdebug (or logdebugverbose) repeatedly clears the terminal during output.

(Cannot currently confirm this on a platform other than Linux)

From a quick bit of digging, the issue seems to be from this part of the definition of runLoggerPipeIO in Prelude.hs being tripped incorrectly by the logging output:

when ("[" `isPrefixOf` txt) $ do
    liftIO clearScreen
    liftIO (setCursorPosition 0 0)

This contains the only reference to clearScreen, and watching the terminal output, every time the first character post-clear is indeed a [ (e.g. in [addTrueConstraints]).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions