Skip to content

Conversation

@safern
Copy link
Member

@safern safern commented Aug 25, 2020

This adds a satellite assemblies bundle for WASM and also adds a hook into the driver to be able to register satellite assemblies into the bundle before the runtime is initialized. This allows us to load a satellite assembly by name from the bundle for bundled runtimes.

Fixes: #39379

cc: @steveisok @marek-safar @lewing

@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@ghost
Copy link

ghost commented Aug 25, 2020

Tagging subscribers to this area: @CoffeeFlux
See info in area-owners.md if you want to be subscribed.

@marek-safar
Copy link
Contributor

@CoffeeFlux @lewing could you please review the fix

@CoffeeFlux
Copy link
Contributor

@marek-safar yep I've been working with Santi on this, planning to review it first thing today

Copy link
Contributor

@CoffeeFlux CoffeeFlux left a comment

Choose a reason for hiding this comment

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

Thanks for doing this!

This is an initial review, but some of the changes I'm asking for are broad enough that I'll definitely take another full pass after this feedback has been addressed. Blocking the PR for now as a result.

I reviewed in two passes, the first for purely stylistic changes and the second looking at the logic, so you may see stylistic corrections on a section I later recommend changing up.

If you have any questions or disagree with any comments please do ping me; getting this landed is my main priority for today. Thanks again!

@CoffeeFlux
Copy link
Contributor

@safern did you forget to push? The issues are marked as resolved but I don't see any new commits or a force-push.

@safern
Copy link
Member Author

safern commented Sep 3, 2020

@safern did you forget to push? The issues are marked as resolved but I don't see any new commits or a force-push.

I resolved them locally and adding an extra test. Should push shortly.

Copy link
Contributor

@CoffeeFlux CoffeeFlux left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks a lot!

@CoffeeFlux
Copy link
Contributor

/backport to release/5.0-rc2

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2020

Started backporting to release/5.0-rc2: https://github.com/dotnet/runtime/actions/runs/238409046

@safern
Copy link
Member Author

safern commented Sep 4, 2020

@CoffeeFlux this is now ready 😄

@CoffeeFlux
Copy link
Contributor

Waiting on a mono/mono lane and then we should be good to merge.

@safern
Copy link
Member Author

safern commented Sep 8, 2020

mono/mono failures are known so we're good to merge this.

@safern safern merged commit 9ba9a30 into dotnet:master Sep 8, 2020
@safern safern deleted the wasm-enableassemblyloadcontexttest branch September 8, 2020 19:25
Comment on lines +2073 to 2079
/**
* mono_image_open_a_lot_parameterized
* this API is not culture aware, so if we load a satellite assembly for one culture by name
* via this API, and then try to load it with another culture we will return the first one.
*/
static MonoImage *
mono_image_open_a_lot_parameterized (MonoLoadedImages *li, MonoAssemblyLoadContext *alc, const char *fname, MonoImageOpenStatus *status, gboolean refonly, gboolean load_from_context, gboolean *problematic)
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand this comment. mono_image_open_a_lot_parametrized doesn't know anything about cultures because it's a low-level API that is only concerned with file paths, not assembly names. You should never have the same path name for two different satellite assemblies.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AssemblyLoadContext issue with satellite assemblies on Browser

5 participants