Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printing spinners and progress bars breaks in non-interactive terminals #953

Open
robpallotta opened this issue Jul 26, 2024 · 0 comments
Open

Comments

@robpallotta
Copy link

When running PackageCompiler in a non-interactive terminal (e.g. emacs shell-mode), the printing of animated spinners and progress bars does not overwrite previous frames, resulting in the spinner/bar frames filling the entire terminal output. PackageCompiler should either check that the current terminal supports printing back over previous lines (e.g by checking the TERM environment variable) or should provide users a way to disable the printing of animated spinners and progress bars (e.g. with a flag like --progress=plain or similar). Currently, the only way to not overload the terminal output is to redirect all output to /dev/null, which is not practical because it also hides all the useful messages (e.g. error logs etc.).

I have found two places where this occurs; one is the progress bar and half-filled circle spinner when compiling dependencies, the other is the 6-dots spinner when compiling sysimages.

Example output from a non-interactive terminal:

⠋ [00m:00s] PackageCompiler: creating compiler .ji image (incremental=false)⠙ [00m:00s] PackageCompiler: creating compiler .ji image (incremental=false) ...long line trunctated
⠋ [00m:00s] PackageCompiler: compiling fresh sysimage (incremental=false)⠙ [00m:00s] PackageCompiler: compiling fresh sysimage (incremental=false) ...long line trunctated
[pid 1636] waiting for IO to finish:
 Handle type        uv_handle_t->data
 timer              0x1748e170->0x7fc81f1b69b0
⠇ [01m:08s] PackageCompiler: compiling fresh sysimage (incremental=false)⠋ [01m:08s] PackageCompiler: compiling fresh sysimage (incremental=false) ...long line trunctated
[pid 1636] waiting for IO to finish:
 Handle type        uv_handle_t->data
 timer              0x1748e170->0x7fc81f1b69b0
⣄ [01m:23s] PackageCompiler: compiling fresh sysimage (incremental=false)⡆ [01m:23s] PackageCompiler: compiling fresh sysimage (incremental=false) ...long line trunctated
└ @ PackageCompiler ~/.julia/packages/PackageCompiler/nT5sD/src/PackageCompiler.jl:180
⢰ [02m:15s] PackageCompiler: compiling fresh sysimage (incremental=false)⣠ [02m:15s] PackageCompiler: compiling fresh sysimage (incremental=false) ...long line trunctated
Precompiling project...
  Progress [>                                        ]  0/22
  ◐ Glob
  ◑ EnumX
  ◐ Compat
  ◓ TextWrap
  ◓ TranscodingStreams
  ◑ InlineStrings
  ◓ TZJData
  ◓ Preferences
  ◐ Scratch
  Progress [>                                        ]  0/22
  ◓ Glob
  ◒ EnumX
  ◓ Compat
  ◑ TextWrap
  ◑ TranscodingStreams
  ◒ InlineStrings
  ◑ TZJData
  ◑ Preferences
  ◓ Scratch
  Progress [==>                                      ]  1/22
  ◑ Glob
  ◐ EnumX
  ◑ Compat
  ✓ TextWrap
  ◒ TranscodingStreams
  ◐ InlineStrings
  ◒ TZJData
  ◒ Preferences
  ◑ Scratch
  ◓ BufferedStreams
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant