display which file triggered the re-run#439
Conversation
| let padding_len = 2; | ||
|
|
||
| let should_be_shortened = | ||
| last_trigger_path.as_os_str().len() + prefix_len + padding_len > width; |
There was a problem hiding this comment.
counting bytes isn't the right way to know if a string should be shortened. Even counting chars is wrong, as some may be double width. And you can't shorten a string at any arbitrary byte, or the UTF8 might be invalid.
But there are proper utilities in bacon do display strings while taking care of the available size. Look for calls to write_composite_fill in bacon (the last argument can be Center).
|
I don't think this is the right approach to debug bacon. You may have much more to display and you can't always write this info in bacon itself. You should use the log: launch bacon with |
Sounds great, thanks! I couldn't find that in the docs, so I'll pass my eyes on it again later to see if I just missed it, or if I can make a PR to improve it. |
|
You're right, it's missing in the doc. It should be in this page: https://dystroy.org/bacon/community/bacon-dev/ And it should be similar to what I've written for another program: https://dystroy.org/broot/community/#log |
|
Actually, logging is mentioned: http://localhost:8004/community/bacon-dev/#issues |
A draft to address #438.
What it looks like (at the time of writing):

TODO: