-
Notifications
You must be signed in to change notification settings - Fork 4.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
React to string comparison changing on .NET Core #56011
Conversation
The default sort order for `char` / `string` changed on .NET Core. This impacted a number of our tests which weren't explicitly using ordinal to compare strings. dotnet/runtime#43956
@dotnet/roslyn-compiler PTAL this updates our code to account for at least part of the string comparison changes in |
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.
LGTM Thanks (iteration 1)
I have a feeling this relates to #46608 |
Agree. There is a very strong chance that those failures are at least partially related to this. |
@jaredpar @sharwell This happened again because we started using a non-ordinal string comparison here:
Is there something we can do to prevent this from cropping up in the future? It seems like it's caused by a difference between the runtimes used to run tests in CI vs locally? |
I currently get the following test failures when running -testCoreClr locally:
Actually, passing |
It looks like there is a special comment in the failing tests about a case mapping between the characters that cause the diff. Could it be caused by changes to case mapping rather than to changes to string comparison? Perhaps even unintentional changes. |
BTW, it looks like we already have an issue that tracks the test failure - #58834. |
Unfortunately no. The runtime took this breaking change and there is nothing for us to do but adapt. There are no analyzers to spot this, it's just find the failure and fix. |
I'm curious what specifically causes us to use a different runtime in CI versus locally. We always use the same SDK to run tests, so why should there be a difference? |
The default sort order for
char
/string
changed on .NET Core. Thisimpacted a number of our tests which weren't explicitly using ordinal to
compare strings. The fix here makes our tests run consistently across the
various versions of .NET Core and .NET Framework
dotnet/runtime#43956