When using parallel builds in shake, i get malformed output like this:
[»] Compiling src/Game/Game.cpp
[»] Compiling [»] Compiling [»] Compiling src/Graphics/Image/Png/PngLoader.cpp
src/Main.cpp
src/System/HeartBeat.cpp
[»] Compiling src/Window/Window.cpp
[»] Compiling src/Window/GlfwContext.cpp
I suppose that it is some kind of synchronization problem with my printing. I should note that i am using the following as an output command:
shakeOutput = const $ BS.putStr . BS.pack
And the status message printing section my rules looks like this:
liftIO $ setSGR [SetColor Foreground Vivid Green]
putNormal "[\175] Compiling "
liftIO $ setSGR [SetColor Foreground Vivid Yellow]
putNormal $ c ++ "\n"
liftIO $ setSGR [Reset]
Is there a way to avoid that kind of printing problems with my output built in in shake? If not what kind of haskell syncronization method would be appropriate to use, knowing that the printing code is inside a shake rule?