ICU integration and asset loading overhaul (#37971)
authorKatelyn Gadd <kg@luminance.org>
Thu, 16 Jul 2020 23:02:10 +0000 (16:02 -0700)
committerGitHub <noreply@github.com>
Thu, 16 Jul 2020 23:02:10 +0000 (16:02 -0700)
commit5c99007671ea89574523c5e44f5e436e551bad3c
treed2f130d3bcf9f417fca67b0281b2f883997bd742
parent32df1577c6d310d92a486bfec9cb1a8bfd5f5be4
ICU integration and asset loading overhaul (#37971)

This PR overhauls runtime startup/asset loading and adds support for ICU integration.

The mono-config.js format is reworked and simplified, with new functionality added:

    Individual assets can be loaded from one or more remote sources with configurable fallback behavior
    In addition to the existing support for loading assemblies, you can now pre-load arbitrary files into the native heap or into emscripten's virtual file system. VFS support previously only existed in runtime-test.js but now is available to any consumer of dotnet.js.
    Assets can have a virtual path set so that their application-facing path does not necessarily have to match their path on the server.
    One or more ICU data archives can be added to the assets list and will be automatically loaded and used to enable ICU-based globalization support.
    Many configuration knobs that previously required API calls can now be set declaratively in the configuration file (environment variables, etc.)

WasmAppBuilder is updated to add ICUDataFiles and RemoteSources parameters that can be used to add the associated information to the config file declaratively from a msbuild project.

Various adjustments are made to existing tests and test cases so that they will pass with the addition of ICU integration.

Co-authored-by: EgorBo <egorbo@gmail.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
38 files changed:
eng/Version.Details.xml
eng/Versions.props
eng/liveBuilds.targets
eng/testing/tests.mobile.targets
src/libraries/Common/src/Interop/Interop.Calendar.cs
src/libraries/Common/src/Interop/Interop.TimeZoneDisplayNameType.cs [new file with mode: 0644]
src/libraries/Common/src/Interop/Interop.TimeZoneInfo.cs
src/libraries/Native/Unix/System.Globalization.Native/pal_icushim_internal.h
src/libraries/Native/Unix/System.Globalization.Native/pal_icushim_static.c [new file with mode: 0644]
src/libraries/Native/native-binplace.proj
src/libraries/System.Globalization.Calendars/tests/TaiwanCalendar/TaiwanCalendarDaysAndMonths.cs
src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoCalendarWeekRule.cs
src/libraries/System.Globalization/tests/NumberFormatInfo/NumberFormatInfoCurrencyGroupSizes.cs
src/libraries/System.Globalization/tests/NumberFormatInfo/NumberFormatInfoCurrencyNegativePattern.cs
src/libraries/System.Globalization/tests/System/Globalization/TextInfoTests.cs
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
src/libraries/System.Private.CoreLib/src/System/Globalization/CalendarData.Icu.cs
src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.GetDisplayName.Invariant.cs [new file with mode: 0644]
src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.GetDisplayName.cs [new file with mode: 0644]
src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.cs
src/libraries/System.Runtime.Extensions/tests/System/AppDomainTests.cs
src/libraries/System.Runtime.Extensions/tests/System/Reflection/AssemblyNameProxyTests.cs
src/libraries/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs
src/libraries/System.Runtime.Loader/tests/SatelliteAssemblies.cs
src/libraries/tests.proj
src/mono/cmake/config.h.in
src/mono/configure.ac
src/mono/mono.proj
src/mono/mono/metadata/Makefile.am
src/mono/netcore/System.Private.CoreLib/System.Private.CoreLib.csproj
src/mono/netcore/System.Private.CoreLib/src/Mono/MonoPInvokeCallbackAttribute.cs [new file with mode: 0644]
src/mono/wasm/.editorconfig [new file with mode: 0755]
src/mono/wasm/Makefile
src/mono/wasm/runtime-test.js
src/mono/wasm/runtime/driver.c
src/mono/wasm/runtime/library_mono.js
tools-local/tasks/mobile.tasks/WasmAppBuilder/PInvokeTableGenerator.cs
tools-local/tasks/mobile.tasks/WasmAppBuilder/WasmAppBuilder.cs