Skip to content

Conversation

@Lysxia
Copy link
Contributor

@Lysxia Lysxia commented Dec 29, 2025

Close #501

The tests are breaking again (though with low probability) because of Unicode version mismatches between text and base. This fixes that flakiness for good by recording the unicode version and comparing it with GHC.Unicode.

@Bodigrim Bodigrim merged commit 09bc7cf into master Dec 29, 2025
49 checks passed
@Bodigrim Bodigrim deleted the test-case-mapping branch December 29, 2025 23:43
@Bodigrim
Copy link
Contributor

Nice!


#if MIN_VERSION_base(4, 15, 0)
-- Requires matching version of Unicode in base and text
testGroup "char case conversion" $ if T.unicodeVersion == G.unicodeVersion then [
Copy link
Contributor

@phadej phadej Dec 31, 2025

Choose a reason for hiding this comment

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

FWIW, it's very easy to get into state where those tests are not run at all. Any upgrade's to Unicode version used by text will cause these tests to not be run, as GHC is (usually) behind.

And you kind of want these tests to be run when Unicode stuff is changed...

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, that's a downside. But on the other hand having sporadical CI failures and maintaining t_{toUpper,toTitle}_exceptions is not confidence inducing either.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That downside is why I took this long to decide to do this eventually. On the other hand, these tests will still run when CI is updated with the right GHC version. And when they do fail that will most probably mean that we need to update the list of exceptions in the test suite rather than an actual bug in the library.

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.

Guard t_toCaseFold_char with #if MIN_VERSION_base(4,16,0).

4 participants