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

using rollup --watch, I can't scroll up #2252

Closed
luisrudge opened this issue Jun 8, 2018 · 13 comments · Fixed by #2942
Closed

using rollup --watch, I can't scroll up #2252

luisrudge opened this issue Jun 8, 2018 · 13 comments · Fixed by #2942

Comments

@luisrudge
Copy link

Issue demonstrated here:

rollup

@tschoartschi
Copy link

Same issue here, would be great to fix this :)

@EvanLovely
Copy link

Me either 😢

@assertnotnull
Copy link

This change also overwrite the console output when used with npm-run-all.
It has a lof of consequences because I can't see log ouput anymore now therefore I can't update.

@luisrudge
Copy link
Author

any news on this? 😬

@shellscape
Copy link
Contributor

@luisrudge have you tried adding the following to your config?

  watch: {
    clearScreen: false
  },

@luisrudge
Copy link
Author

@shellscape that works as a workaround, thanks! I still prefer when the screen is cleared, but I can live with this.

@shellscape
Copy link
Contributor

shellscape commented Aug 9, 2018

The documentation can probably be clearer on this. What clearScreen is actually doing, is telling the terminal to use an alternate screen. The code in Rollup sends a character to the terminal if clearScreen: true which gives the terminal the alternate screen instruction. You can read more about what that means here: https://unix.stackexchange.com/a/289055

@guybedford @lukastaegert is there an opportunity here for a documentation change? is clearScreen an accurate name for that option, considering the above?

@lukastaegert
Copy link
Member

Not 100% sure what a better name would be but we could certainly do a soft deprecation/option rename with the 1.0 release. I guess alternateScreen: false/true would be a better fit technically but I am not sure everyone will understand that this has the effect of controlling if the screen is cleared 😉

@timdavish
Copy link

@lukastaegert @shellscape

How is this not considered a bug? For example, jest seems to also use an alternate screen during watch mode, but you can scroll up just fine when the content overflows that particular screen. Is this same behavior not accomplishable for rollup watch mode?

Setting watch: {clearScreen: false} is definitely a workaround but does not seem like an actual solution to the problem the video demonstrates. Otherwise, it seems like watch: {clearScreen: false} should be a default option during watch mode, as not being able to scroll to see the full build output is not ideal behavior?

Perhaps I am just missing something and/or need further explanation.

(Re-commented with @'s as I don't think this was going to be seen since the issue's closed.)

@lukastaegert
Copy link
Member

Yes, this should be improved

@lukastaegert
Copy link
Member

Note though that at least for my tests, Jest is NOT using an alternate screen (when you quit Jest, you still see the last output).

@lukastaegert
Copy link
Member

After playing around a little more and googling a bit I feel we should just get rid of the alternate screen altogether as its utility is rather limited and just do the clear screen between runs (as Jest does), which will still allow scrolling.

@lukastaegert
Copy link
Member

Please check out #2942. Would be very nice if people could check this against various terminals to see if it behaves as expected. My guess is that the alternate screen was one of those "it seemed like a good idea at that time" things. If nobody cries out, I will merge this soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants