[wasm][icu] ICU files sharding + custom icu data loading for WASM (#80421)
authorIlona Tomkowicz <32700855+ilonatommy@users.noreply.github.com>
Fri, 24 Feb 2023 12:59:32 +0000 (13:59 +0100)
committerGitHub <noreply@github.com>
Fri, 24 Feb 2023 12:59:32 +0000 (13:59 +0100)
commit5415cd1e4e1359dd5fb5c6727bcdf8dcad457a71
tree819ad5f152a1740e083b6d8fbc2a2ca5110e7744
parent98746b562c5a9d6a82156b1cb932d5e50e8a2b5b
[wasm][icu] ICU files sharding + custom icu data loading for WASM (#80421)

* User can set `GlobalizationShard`.

* Sample for sharding, might be transformed into a test.

* Option of custom shard file upload.

* Replaced sample with WBT.

* Remove unnecessary change.

* Fixed invariantMode + full custom path + nit.

* Draft of documentation.

* Rename to reflect usage better.

* Fix full path file loading to the Browser.

* Fixed WBT build errors.

* Docs: only one ICU file can be used.

* Fixed NodeJs: `navigator` is not defined.

* Paritial fix of sharding tests.

* RuntimePack can differ for AOT and Release.

* Fix `ja-JP` culture not found in CheckDateTimeLocale.

* Fixedculture not found in SatelliteAssemblyTests.

* Fixed culture not found in System.Runtime tests.

* `icudt.dat` should not be loaded when <IcuFileName> empty + EFIGS contains only some specific locales + `IsIcuFilePredefined` is not necessary.

* Improved doc readability using @radical's suggestions.

* Forgot to remove comments.

* Missing change for 5df3c9ccc851c45fbdbc3acfd96162c3237973c1.

* WBT: Applied review.

* Applied @pavelsavara's suggestion.

* Added `WasmIncludeFullIcuData` to work like Blazor.

* Another missing change for 5df3c9ccc851c45fbdbc3acfd96162c3237973c1.

* Missing change for b5a1308372ed00f1dea08dadd647e97dffe57e27.

* Fix debugger failures for real, previous flag was in the wrong place.

* Fixed most libraries that require full ICU.

* WBT should load full icu only when invariant off.

* Applied @radical's idea.

* Missing change for the last commit.

* Build args should not be edited inside of `BuildProject()` + Identity on a property does not exist.

* One flag for all lib tests instead of multiple changes.

* Revert comments for the prev commit.

* Fix for trimming tests.

* Rename + throwing when file not found.

* Fixed NoopNativeRebuildTest WBT.

* Forgotten logging.

* Tests with custom shard.

* Added more complex tests.

* Should fix wasm tests on helix.

* Fix WBT.

* [wasm] Update eng/testing/scenarios/BuildWasmAppsJobsList.txt

* [wasm] fix testassets path

* Default mode for tests should be the same as default mode for template apps.

* Checking preferred icu when assets are still not populated was incorrect.

* DataTimeFormat does not work well for browser + wrong condition.

* Removed empty space changes.

* WBT for automatic icu selection based on locale.

* Moved the full icu flag from libs to lib tests.

* Flag in tests.wasm.targets should be enough for trimming tests.

* Debugger tests in default globalization mode unless CJK needed. Firefox does not respect UILocale.

* Removing forgotten comment.

* Fixed sharding wbt.

* This should not be commented out.

* Sharding WBT do not make sense on v8 + fixed debugger tests on Linux + fixed WBT on Chrome on Windows.

* Fix test to have sense.

* Fixed tests to reflect expected behavior after removing predefinedCulturesOnly=true from WASM + added en-US to custom ICU.

* Fixed merge errors, removed redundant comment.

* Update docs, disable NodeJS in tests.

* @radical's review part 1: embedded comments.

* Test clean-up by @radical.

* Fix arg order in debugger + revert wasi sharding.
---------

Co-authored-by: Ankit Jain <radical@gmail.com>
27 files changed:
docs/README.md
docs/design/features/globalization-icu-wasm.md [new file with mode: 0644]
eng/testing/scenarios/BuildWasmAppsJobsList.txt
eng/testing/tests.browser.targets
src/mono/wasi/build/WasiApp.targets
src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs
src/mono/wasm/Wasm.Build.Tests/HostRunner/BrowserHostRunner.cs [new file with mode: 0644]
src/mono/wasm/Wasm.Build.Tests/HostRunner/IHostRunner.cs [new file with mode: 0644]
src/mono/wasm/Wasm.Build.Tests/HostRunner/NodeJSHostRunner.cs [new file with mode: 0644]
src/mono/wasm/Wasm.Build.Tests/HostRunner/V8HostRunner.cs [new file with mode: 0644]
src/mono/wasm/Wasm.Build.Tests/IcuShardingTests.cs [new file with mode: 0644]
src/mono/wasm/Wasm.Build.Tests/InvariantGlobalizationTests.cs
src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/NativeRebuildTestsBase.cs
src/mono/wasm/build/WasmApp.targets
src/mono/wasm/debugger/DebuggerTestSuite/ChromeProvider.cs
src/mono/wasm/debugger/DebuggerTestSuite/DateTimeTests.cs
src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs
src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestFirefox.cs
src/mono/wasm/debugger/DebuggerTestSuite/FirefoxProvider.cs
src/mono/wasm/debugger/DebuggerTestSuite/TestHarnessOptions.cs
src/mono/wasm/debugger/DebuggerTestSuite/TestHarnessProxy.cs
src/mono/wasm/debugger/DebuggerTestSuite/TestHarnessStartup.cs
src/mono/wasm/runtime/assets.ts
src/mono/wasm/testassets/icudt_custom.dat [new file with mode: 0644]
src/tasks/WasmAppBuilder/WasmAppBuilder.cs
src/tasks/WasmAppBuilder/WasmAppBuilderBaseTask.cs
src/tasks/WasmAppBuilder/wasi/WasiAppBuilder.cs