Skip to content

Rewatch progress messages weirdness #7958

@cknitt

Description

@cknitt
  1. When run in CI, rewatch output looks like this, with some unexpected newlines:
> Run yarn workspace @rescript/runtime rescript build
[1/7] 📦 Building package tree...
[1/7] 📦 Built package tree in 0.01s
[2/7] 👀 Finding source files...
[2/7] 👀 Found source files in 0.00s
[3/7] 📝 Reading compile state...
[3/7] 📝 Read compile state 0.00s
[4/7] 🧹 Cleaning up previous build...
[4/7] 🧹 Cleaned 0/0 0.00s

[5/7] 🧱 Parsed 174 source files in 1.56s

[6/7] 🌴 Collected deps in 0.00s

[7/7] 🤺 Compiled 174 modules in 2.92s


✨ Finished Compilation in 4.56s
  1. When redirecting the output, it shows this (on stderr?!):
% ./node_modules/.bin/rescript build >out.txt
[5/7] 🧱 Parsing...   1307/1307
[7/7] 🤺 Compiling...   1317/1317

and writes this to out.txt (control sequences copied from vim):

[1/7] 📦 Building package tree...^[[2K^M[1/7] 📦 Built package tree in 0.01s
[2/7] 👀 Finding source files...^[[2K^M[2/7] 👀 Found source files in 0.00s
[3/7] 📝 Reading compile state...^[[2K^M[3/7] 📝 Read compile state 0.00s
[4/7] 🧹 Cleaning up previous build...^[[2K^M[4/7] 🧹 Cleaned 0/0 0.00s
^[[2K^M[5/7] 🧱 Parsed 1307 source files in 4.35s
^[[2K^M[6/7] 🌴 Collected deps in 0.06s
^[[2K^M[7/7] 🤺 Compiled 1307 modules in 5.46s

^[[2K^M✨ Finished Compilation in 10.02s

resulting in this output for cat out.txt:

[1/7] 📦 Built package tree in 0.01s
[2/7] 👀 Found source files in 0.00s
[3/7] 📝 Read compile state 0.00s
[4/7] 🧹 Cleaned 0/0 0.00s
[5/7] 🧱 Parsed 1307 source files in 4.35s
[6/7] 🌴 Collected deps in 0.06s
[7/7] 🤺 Compiled 1307 modules in 5.46s

✨ Finished Compilation in 10.02s
  1. We may want to rethink the emojis. How is a palm tree and fencing related to what it is doing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions