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

Allow to omit icons at the start of important output lines #524

Merged
merged 1 commit into from
May 11, 2024

Conversation

sol
Copy link
Contributor

@sol sol commented May 4, 2024

This is part of #522.

@sol sol marked this pull request as draft May 4, 2024 11:32
@sol sol marked this pull request as ready for review May 4, 2024 11:47
Copy link
Member

@moodmosaic moodmosaic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice 👍

This will make MinGW 32/64 users happier, including myself (occasionally) 💕

@sol
Copy link
Contributor Author

sol commented May 4, 2024

This will make MinGW 32/64 users happier, including myself (occasionally) 💕

Happy if it helps. Beware, however, that Hedgehog will still produce non-ASCII characters. This only removes the icons at the beginning of the lines, as they don't add much for Hspec.

I think a proper solution for MingGW would be to use replacement characters from the ASCII range when the handle does not support UTF-8.

  1. https://github.com/hspec/hspec/blob/30ba7ed0b75d802960931fcd1e0a001041084c55/hspec-core/src/Test/Hspec/Core/Runner.hs#L525
  2. https://github.com/hspec/hspec/blob/main/hspec-core/src/Test/Hspec/Core/Formatters/V2.hs#L184

@moodmosaic
Copy link
Member

Hmm, now that #523 is merged, this needs to be rebased.

@moodmosaic
Copy link
Member

This will make MinGW 32/64 users happier, including myself (occasionally) 💕

Happy if it helps. Beware, however, that Hedgehog will still produce non-ASCII characters. This only removes the icons at the beginning of the lines, as they don't add much for Hspec.

I think a proper solution for MingGW would be to use replacement characters from the ASCII range when the handle does not support UTF-8.

  1. https://github.com/hspec/hspec/blob/30ba7ed0b75d802960931fcd1e0a001041084c55/hspec-core/src/Test/Hspec/Core/Runner.hs#L525
  2. https://github.com/hspec/hspec/blob/main/hspec-core/src/Test/Hspec/Core/Formatters/V2.hs#L184

Thanks for the links 👍 Yes, this is more or less what I had in mind. 🙌

# Conflicts:
#	hedgehog/src/Hedgehog/Internal/Report.hs
@moodmosaic
Copy link
Member

moodmosaic commented May 5, 2024

Hmm, now that #523 is merged, this needs to be rebased.

@sol, done. I rebased from the command-line and force-pushed, hope that's OK for you. The conflict was this, due to #523:

defaultConfig :: Config
<<<<<<< HEAD
defaultConfig = Config FullContext True True
=======
defaultConfig = Config FullContext True EnablePrefixIcons
>>>>>>> 17ece22 (Allow to omit icons at the start of important output lines)

Please have a look and if all looks good we can merge. 🎉

@sol
Copy link
Contributor Author

sol commented May 5, 2024

@moodmosaic yes, all good 👍 Thanks a lot 🙏

@moodmosaic moodmosaic merged commit fd182bf into hedgehogqa:master May 11, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants