You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It only ever makes sense for one View to be drawing to stdout or stderr at any time. If there's more than one, they'll probably scramble the screen state.
At the moment the application is responsible for at most one View being active at any time.
We could, instead, for example, panic if more than one View is in use. Or, perhaps, one of them should take over responsibility, leaving the others suspended. Or even, perhaps, they should all be drawn at the same time? That does get complicated if they're using different options.
It's OK for any number of captured views to be in use, and indeed necessary for Nutmeg's own test suite.
However, this might be complicated if Views are used during a program's test suite. Because of the way Rust's test suite captures println! they won't actually conflict. I'm not sure if this is directly detectable.
If this is done and we have a clear picture which View is active, that enables providing a write() or write_stderr() that sends text through the progress bar if there is one, or otherwise directly to stdout or stderr. There could even be a nutmeg::println!() that coordinates with whichever bar. This also opens the door to built in tracing integration.
The text was updated successfully, but these errors were encountered:
It only ever makes sense for one View to be drawing to stdout or stderr at any time. If there's more than one, they'll probably scramble the screen state.
At the moment the application is responsible for at most one View being active at any time.
We could, instead, for example, panic if more than one View is in use. Or, perhaps, one of them should take over responsibility, leaving the others suspended. Or even, perhaps, they should all be drawn at the same time? That does get complicated if they're using different options.
It's OK for any number of captured views to be in use, and indeed necessary for Nutmeg's own test suite.
However, this might be complicated if Views are used during a program's test suite. Because of the way Rust's test suite captures
println!
they won't actually conflict. I'm not sure if this is directly detectable.If this is done and we have a clear picture which View is active, that enables providing a
write()
orwrite_stderr()
that sends text through the progress bar if there is one, or otherwise directly to stdout or stderr. There could even be anutmeg::println!()
that coordinates with whichever bar. This also opens the door to built intracing
integration.The text was updated successfully, but these errors were encountered: