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

indicatif bug causes lack of output on msys and potentially other shells #284

Closed
fitzgen opened this issue Sep 7, 2018 · 11 comments
Closed
Labels
bug Something isn't working

Comments

@fitzgen
Copy link
Member

fitzgen commented Sep 7, 2018

Until console-rs/indicatif#60 is fixed, we should probably stop using indicatif in wasm-pack, because it completely breaks the experience for a large swath of windows users.

@fitzgen fitzgen added the bug Something isn't working label Sep 7, 2018
fitzgen added a commit to fitzgen/wasm-pack that referenced this issue Sep 7, 2018
@ashleygwilliams
Copy link
Member

i would prefer a solution that gracefully degrades for consoles we know we can't support. @alexcrichton says that cargo does this in many areas so we can use that as an example. i would prefer that solution to simply removing the progressbar entirely.

@ashleygwilliams ashleygwilliams changed the title Temporarily remove indicatif progress bars indicatif bug causes lack of output on msys and potentially other shells Sep 7, 2018
@alexcrichton
Copy link
Contributor

Digging more into console-rs/indicatif#60 only using indicatif seems like it suffers another bug, printing zero output when output is piped somewhere else. I believe that means if you try to pipe wasm-pack output to a log file, for example, then nothing will get printed at all. That I believe is also quite serious and in need of fixing, although I don't know whether that's classified as another indicatif bug or an indicatif feature.

@ashleygwilliams
Copy link
Member

this should be remedied by by the update to the console crate which will be handled by #319

@alexcrichton
Copy link
Contributor

Ah unfortunately the issue isn't 100% fixed from wasm-pack's perspective I think. There's still two issues I believe:

  • First is that the output on MSYS2 is unfortunately still not great. I suspect this is a bug still in either indicatif or console, but the progress bar doesn't update the current line but rather updates the next line:
| [1/8] Checking crate configuration...
  [1/8] Checking crate configuration...
| [2/8] Adding WASM target...
  [2/8] Adding WASM target...
| [3/8] Compiling to WASM...
\ [3/8] Compiling to WASM...
- [3/8] Compiling to WASM...
/ [3/8] Compiling to WASM...
| [3/8] Compiling to WASM...
\ [3/8] Compiling to WASM...
- [3/8] Compiling to WASM...
/ [3/8] Compiling to WASM...
| [3/8] Compiling to WASM...
\ [3/8] Compiling to WASM...
- [3/8] Compiling to WASM...
/ [3/8] Compiling to WASM...
| [3/8] Compiling to WASM...
\ [3/8] Compiling to WASM...
- [3/8] Compiling to WASM...
/ [3/8] Compiling to WASM...
| [3/8] Compiling to WASM...
\ [3/8] Compiling to WASM...
- [3/8] Compiling to WASM...
/ [3/8] Compiling to WASM...
| [3/8] Compiling to WASM...
\ [3/8] Compiling to WASM...
- [3/8] Compiling to WASM...
/ [3/8] Compiling to WASM...
| [3/8] Compiling to WASM...
\ [3/8] Compiling to WASM...
- [3/8] Compiling to WASM...
/ [3/8] Compiling to WASM...
| [3/8] Compiling to WASM...
\ [3/8] Compiling to WASM...
- [3/8] Compiling to WASM...
  • There's still a bug with wasm-pack (not indicatif) that when indicatif is turned off due to stderr not being a tty then no output comes out. For example wasm-pack build 2>&1 | tee out.log provides no output. (this is something that wasm-pack will need to handle, not indicatif I believe)

@alexcrichton
Copy link
Contributor

I've opened console-rs/indicatif#62 for the indicatif/console bug

@cedws
Copy link

cedws commented Nov 12, 2018

Development seems to be very slow on Indicatif, or it's abandoned. I think you might want to consider an alternative.

@mitsuhiko
Copy link

@c-edw I would love to get help maintaining it. It's very actively used i just don't have too many issues with it that I update it regularly.

@dbrgn
Copy link

dbrgn commented Feb 16, 2019

It also causes issues when running tests in CI (e.g. CircleCI) with stdout-capturing:

img

Is there a way to turn that off? Is there some sort of "interactive shell" detection that fails in this case?

@mitsuhiko
Copy link

That is a different issue. I fixed msys support a while back so it prints now.

@dbrgn
Copy link

dbrgn commented Feb 16, 2019

@mitsuhiko you're right. And wasm-pack uses version 0.9 (released in January). So I guess this issue could probably be closed?

Edit: Ah, just saw that comment by @alexcrichton:

Ah unfortunately the issue isn't 100% fixed from wasm-pack's perspective I think. There's still two issues I believe: (...)

The multi-line output is one of them. I also experience it during "cargo test" calls in wasm-pack, not sure if it's the same underlying issue.

@ashleygwilliams
Copy link
Member

we are now tracking this via #298

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants