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

Breakage due to recent IO buffering change (missing .close?) #16

Closed
AlexDaniel opened this issue Sep 14, 2017 · 5 comments
Closed

Breakage due to recent IO buffering change (missing .close?) #16

AlexDaniel opened this issue Sep 14, 2017 · 5 comments
Assignees
Labels

Comments

@AlexDaniel
Copy link

AlexDaniel commented Sep 14, 2017

One of the tests of this module is broken on HEAD. See https://gist.github.com/041296026d1624fbde86d17196ea8ec4.

Bisectable points to rakudo/rakudo@4b02b8a

Term::Choose, Term::Choose::Util, and Term::TablePrint depend on this module and therefore are shown as burnt in the toaster.

See also RT #132030.

Sister tickets:

@AlexDaniel
Copy link
Author

Interestingly, it works if I remove endwin line. I don't really understand what's going on there.

@geekosaur
Copy link

What's going on there is that initscr() sets a flag for terminal init strings to be output on stdout, and endwin() outputs them followed by deinit sequences and a cursor move to the bottom left of the screen. This probably confuses prove, which is looking for test output.

This behavior will have been impacted by the changes to buffer noninteractive output, and the knock-on fix for buffers not being autoflushed when a handle is closed on going out of scope or the program ending.

For the purposes of a test, you either want to arrange for fd 1 to not be the pipe to prove, or you want to use newterm() to have curses write its init/deinit to some other file descriptor.

@geekosaur
Copy link

Note that, without the endwin call, the init/deinit sequences are not output at all. But on a real terminal, it's possible it would be left in an odd state. (Unlikely though; while curses/XTI compliant libraries are allowed to set things up however they want, in practice ncurses will generally obey crmode() and friends as written and leave the terminal in default mode otherwise.)

@azawawi azawawi self-assigned this Sep 17, 2017
@azawawi azawawi added the bug label Sep 17, 2017
@azawawi
Copy link
Owner

azawawi commented Sep 18, 2017

Sorry for the delay on this one. Bug was fixed in rakudo latest by @AlexDaniel. Please reopen if you think otherwise 👍

@azawawi azawawi closed this as completed Sep 18, 2017
@AlexDaniel
Copy link
Author

Well, what changed is that we simply re-disabled output buffering in Test.pm6, this is why it works now. There wasn't really a bug in rakudo, or so it seems. But given that the test is passing I guess there's nothing to do here indeed. @azawawi++

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

No branches or pull requests

3 participants