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

Ability to write raw Messages #8

Open
stuhood opened this issue Nov 1, 2021 · 3 comments
Open

Ability to write raw Messages #8

stuhood opened this issue Nov 1, 2021 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@stuhood
Copy link

stuhood commented Nov 1, 2021

Thanks a lot for writing prodash! Over in https://github.com/pantsbuild/pants, we have log formatting and construction that we'd like to stick with while considering moving to prodash::line for rendering running work.

To do that without tearing down the UI for each "raw" stderr output, it seems like it might makes sense to support sending "raw" (unfiltered/unleveled) Messages, which would not be interpreted by the renderer at all, except to dump them.

Would a patch to support un-interpreted Messages be welcome? We would also likely need to add a message buffer to the root, to guarantee that there was a live buffer even when no work was being rendered.

@Byron
Copy link
Owner

Byron commented Nov 2, 2021

Thanks for your interest!

Raw message support seems like a useful feature that many potential users of the library crate would want, so a patch would be very welcome.

Please note that the there is a message buffer already, and as long as its big enough all messages will appear on screen. If the program emits too many messages, some messages might be overwritten before being rendered unless the buffer is big enough.

@stuhood
Copy link
Author

stuhood commented Nov 2, 2021

Please note that the there is a message buffer already, and as long as its big enough all messages will appear on screen. If the program emits too many messages, some messages might be overwritten before being rendered unless the buffer is big enough.

Ah, got it. I missed that each Item's messages are just cloned references to a single buffer.

Thanks!

@Byron Byron added enhancement New feature or request help wanted Extra attention is needed labels Nov 2, 2021
@stuhood
Copy link
Author

stuhood commented Nov 2, 2021

I've posted a draft to #9 : none of the tests have been updated yet, (nor has the tui renderer), but it appears to be working with the line renderer. I'll need to investigate other blocking issues before resuming the patch, but let me know if you see anything wrong with the approach! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants