-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Disable line wrapping during scenario tests #784
Conversation
54ec6b5
to
e991f2c
Compare
.current_dir(&temp_dir), @r###" | ||
success: false | ||
exit_code: 1 | ||
----- stdout ----- | ||
|
||
----- stderr ----- | ||
× No solution found when resolving dependencies: | ||
╰─▶ Because there is no version of | ||
a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it sounds difficult, but... is there any way we could instead strip the prefix when we generate the error message, so that it's wrapped appropriately to start? Right now, we it feels like we're applying one fixup on top of another rather than solving the problem at the source.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's worth the complexity. It'd definitely be much more of a hack.
I think disabling the line wrapping during tests is desirable separately from the long package names — the line wrapping is generally confusing at 80 characters when reading our error messages in snapshots. Perhaps in the long run, we should focus on improving that formatting such that wrapped messages are easier to read. I think this is the simplest path forward for now and I think I'd want to be able to disable line wrapping in output as a user anyway.
Note the pull request was already accepted / merged upstream. |
e3de6cf
to
463f125
Compare
463f125
to
d68c88b
Compare
Adds support for a
PUFFIN_NO_WRAP
environment variable which disables line wrapping inmiette
output.We set this variable in the scenario tests to improve the readability of snapshots.
I contributed the ability to disable line wrapping upstream at zkat/miette#328