-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[iOS] Calendar not behaving correctly wrt culture #50859
Comments
Tagging subscribers to this area: @tarekgh, @safern Issue DetailsDescriptionI am re-enabling some tests to confirm ICU is working correctly to replace the legacy mono code for iOS. Most globalization tests have been re-enabled successfully, except for Calendar tests Those are not returning the expected types.
Configuration
Regression?Yes. This is working on the current Xamarin.iOS SDK. Other informationxamarin-macios tracking issue for globalization
|
c.c. @steveisok |
and re-enable some tests for dotnet Part of the fix for xamarin#8906 Known Issues * [some Calendar are not the expected ones](dotnet/runtime#50859) * [No support for tvOS](dotnet/runtime#50912)
and re-enable some tests for dotnet Part of the fix for #8906 Known Issues * [some Calendar are not the expected ones](dotnet/runtime#50859) * [No support for tvOS (bitcode)](dotnet/runtime#48508)
The tests themselves looks somewhat fishy to be honest. The actual expected mapping:
It doesn't explain why it would always return Gregorian calendar though. |
@filipnavara They are old tests we used to ensure DontLink and Link* tests gave the same results. Being old does does not make them good (or bad) but I disagree with your interpretation of
|
I stand corrected on the Arabic. Somehow I was totally convinced because "ar" is used as country code for Argentina (ISO 3166). Nevertheless the |
yeah, like I said the tests were to ensure the same calendar was returned - whether or not the linker was enabled |
So, apparently the ICU data filters are currently applied on all platforms for the app-local ICU builds and these filters (https://github.com/dotnet/icu/blob/313017d0effca6e8ade5fefc8e580224e65d8525/icu-filters/icudt.json#L261-L266) exclude non-Gregorian calendars from the data. |
Good catch. We built the filters initially w/ wasm in mind, so it looks like we'll have to tweak a little bit. |
How important is ICU data size for iOS? |
Well, I haven't heard too much negative feedback re: the current ICU size ;-) |
It's big enough already ;-) |
The framework already has the code for the calendars. This looks to me the issue is just associating the calendar Id to the culture. which I guess can be supported with minimal increase of size. |
We can either add the calendars back in or change the test, it is a size trade off. This appears to be marked p0 on iOS so I guess we need information from @spouliot |
Found we'll need to include "likelySubtags" in our filter in order for this to be fixed. Good news is that it only adds .1 MB to the dat file. |
#124) This change also creates separate icudt filters for mobile and wasm as keeping likelySubtags results in a .1MB size increase. Addresses dotnet/runtime#50859
Adjust HttpClientHandler tests to cope with dotnet/runtime#50859 and #11392.
Adjust HttpClientHandler tests to cope with dotnet/runtime#50859 and #11392.
I'm seeing different results now with the latest .NET bump: xamarin/xamarin-macios@7e37fe6 |
You are seeing the correct results now, ie. same as |
Assuming from the comments that this is fixed. Please reopen if you find otherwise. |
Description
I am re-enabling some tests to confirm ICU is working correctly to replace the legacy mono code for iOS.
Most globalization tests have been re-enabled successfully, except for Calendar tests
https://github.com/xamarin/xamarin-macios/blob/main/tests/linker/ios/dont%20link/CalendarTest.cs
Those are not returning the expected types.
Configuration
Regression?
Yes. This is working on the current Xamarin.iOS SDK.
Other information
xamarin-macios tracking issue for globalization
The text was updated successfully, but these errors were encountered: