Skip to content
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

ICU integration and asset loading overhaul #37971

Merged
merged 68 commits into from
Jul 16, 2020
Merged

ICU integration and asset loading overhaul #37971

merged 68 commits into from
Jul 16, 2020

Conversation

kg
Copy link
Member

@kg kg commented Jun 16, 2020

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.

@kg kg added NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) NO-REVIEW Experimental/testing PR, do NOT review it labels Jun 16, 2020
@ghost
Copy link

ghost commented Jun 16, 2020

Tagging subscribers to this area: @ViktorHofer
Notify danmosemsft if you want to be subscribed.

@kg
Copy link
Member Author

kg commented Jun 16, 2020

Not sure what happened to runtime-test.js... does it have weird git line ending attributes set?

@lewing
Copy link
Member

lewing commented Jun 16, 2020

Not sure what happened to runtime-test.js... does it have weird git line ending attributes set?

Probably just .editorconfig fixing bad whitespace.

src/mono/configure.ac Outdated Show resolved Hide resolved
src/mono/wasm/wasm.targets Outdated Show resolved Hide resolved
EgorBo and others added 5 commits July 9, 2020 17:02
Checkpoint

Checkpoint

Checkpoint

Checkpoint

Maybe fix whitespace damage

Fix missing line endings in mono-config.js

Maybe fix whitespace damage

Add verification and fail-fast errors if ICU build data is missing or in the wrong place

Checkpoint

Checkpoint

Checkpoint

Checkpoint

Checkpoint

Checkpoint

Checkpoint

Fix whitespace damage

Add editorconfig file for the wasm files

Checkpoint

Fix typo

Checkpoint

Checkpoint

Cleanup

Cleanup

Reverse accidental removal of invariant default

Checkpoint

Sensible error when ICU_REPO is not set

Checkpoint: Reset changes for mangled files

Manually repair rebase damage

These changes are no longer needed

Repair rebase damage

Fix mode damage

Address PR feedback

Fix icushim being built in static mode

Remove broken wildcard dependency

Fix sample startup
@@ -358,6 +358,7 @@ public void Load()
}

[Fact]
[PlatformSpecific(~TestPlatforms.Browser)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to disable this?

@kg kg merged commit 5c99007 into dotnet:master Jul 16, 2020
lewing added a commit to lewing/runtime that referenced this pull request Jul 21, 2020
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>
lewing added a commit that referenced this pull request Jul 22, 2020
* 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>

* [wasm] Include data archives and timezone data by default (#39586)

* Add data archive loading to the generic loading logic

* [mono] Update ICU version, disable some tests for Browser (#39596)

Co-authored-by: Katelyn Gadd <kg@luminance.org>
Co-authored-by: EgorBo <egorbo@gmail.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants