alexkuz / nyan-progress-webpack-plugin

Meow
MIT License
171 stars 17 forks source link

Overlapping partial Nyans #1

Open mathieumg opened 8 years ago

mathieumg commented 8 years ago

screenshot from 2015-09-09 13 09 39

As you can see, there seems to exist a condition where multiple fast initial messages creates multiple partial Nyans before the one that ends up working/tracking the whole progress.

I'm on v1.0.3 and my dev server config is:

devServer: {
  quiet: false,
  noInfo: false,
  stats: {
    assets: false,
    colors: true,
    version: false,
    hash: false,
    timings: false,
    chunks: false,
    chunkModules: false
  }
},

Awesome plugin, by the way! :grin:

alexkuz commented 8 years ago

Yeah, that's because you have some console output occurred during progress (that "Child" line, I believe). I don't know is there a way to track what was printed in console from outside the plugin (probably there's no way).

Actually, I just checked ASCII escape codes - there is a "Save/restore cursor position" command, which could help (they say it's not widely supported by terminals though).

Another way to solve it (kinda) is to print nyan cat with a left offset, so that it's not overlapping other messages.

alexkuz commented 8 years ago

@mathieumg btw what terminal and font are you using? Your cat looks more like Cheshire cat :)

alexkuz commented 8 years ago

@mathieumg check out a new version, should be fixed now.

mathieumg commented 8 years ago

Actually that made it worse. :(

screenshot from 2015-09-09 22 36 11

screenshot from 2015-09-09 22 37 01

I wish I could screencap it, the behaviour is pretty spectacular on 1.1 haha. :stuck_out_tongue:

Do you want me to setup a toy project to reproduce the issue?

I'm using Ubuntu Mono and Bash on my home PC (the screenshots so far), I'll try with whatever I have at work tomorrow.

Thanks for the quick reaction by the way!

alexkuz commented 8 years ago

@mathieumg try to turn off webpack.ProgressPlugin if you have it, they are not supposed to be used together (should mention it in README probably).

mathieumg commented 8 years ago

I have the same behavior (Nyan scrolling down and leaving trails) even without --progress. I also still get the two initial partial Nyans (screenshot in OP), but on 1.0 the progress + Nyan were working correctly after that.

alexkuz commented 8 years ago

Hmm. Can you make an example project then?

mathieumg commented 8 years ago

Yeah, I'll try to do that!

alexkuz commented 8 years ago

@mathieumg just reproduced the issue - it happens when console output doesn't fit screen height. Will try to fix that.

mathieumg commented 8 years ago

Cool! Sorry for being slow on this, I've been held up with school as of late. :x

alexkuz commented 8 years ago

Should be better now

alexkuz commented 8 years ago

@mathieumg can you check it, so I can close this issue?

mathieumg commented 8 years ago

I think I had and there were still issues, but I wanted to revalidate. I'll try to recheck that ASAP.

alexkuz commented 8 years ago

Turned out I forgot that I'm using non-standard terminal :) Seems like default terminal in MacOS doesn't support restoring/saving cursor position, so I had to disable that feature by default.