Merged PR 9371: Revive support for globalization and localization in Blazor WASM#24773
Conversation
| /* type */ 'dotnetwasm'); | ||
|
|
||
| const dotnetTimeZoneResourceName = 'dotnet.timezones.dat'; | ||
| const dotnetTimeZoneResourceName = 'dotnet.timezones.blat'; |
There was a problem hiding this comment.
Is this a typo or a legit file format?
There was a problem hiding this comment.
I've heard Larry talk about this so I guess it's the name of the archive file format. Apparently it's like a tar file.
| let timeZone = "UTC"; | ||
| try { | ||
| timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone; | ||
| } catch { } |
There was a problem hiding this comment.
Why is it OK to ignore errors thrown here?
| var runtime = bootJsonData.resources.runtime.Keys; | ||
| Assert.Contains("dotnet.wasm", runtime); | ||
| Assert.DoesNotContain("dotnet.timezones.dat", runtime); | ||
| Assert.DoesNotContain("dotnet.timezones.blat", runtime); |
There was a problem hiding this comment.
Ah -- OK. So the blat file extension is intentional...
| for (var i = 0; i < assemblies.Length; i++) | ||
| { | ||
| Assembly.Load((byte[])assemblies[i]); | ||
| using var stream = new MemoryStream((byte[])assemblies[i]); |
SteveSandersonMS
left a comment
There was a problem hiding this comment.
Seems like this is mostly porting pre-existing changes so approving. Looks good anyway.
c3df503 to
3818ef0
Compare
|
@lewing I'm seeing issues with non-en cultures. Here's the stack trace: Could you help? |
|
I'll take a look; getting this set up locally. |
|
Finally got a repro working, looking into this now. |
|
Building locally with the linker disabled and swapping out SPC for one built with dotnet/runtime#40817 seems to fix this locally, so hopefully once that change flows down to this repo we'll be good to go. 😄 |
3818ef0 to
4e57d1b
Compare
|
Hello @pranavkm! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
|
@benaadams we're looking at sharding the icu file, which should make the default compressed size about half of the numbers being reported here. There's also an option to enable invariant mode if you do not require this data that should eliminate this file entirely. |

Manually porting preview8 changes to master
Revive support for globalization and localization in Blazor WASM
Fixes #24174
Fixes #22975
Fixes #23260