[wasm][coreclr] Fix tpa list population in corerun.html#126021
Merged
radekdoulik merged 1 commit intodotnet:mainfrom Mar 24, 2026
Merged
[wasm][coreclr] Fix tpa list population in corerun.html#126021radekdoulik merged 1 commit intodotnet:mainfrom
radekdoulik merged 1 commit intodotnet:mainfrom
Conversation
The preRun callback now checks if Emscripten's runWithFS has already populated the virtual FS before adding a run dependency. When data is already loaded (due to addOnPreRun using unshift()), the TPA list is built immediately. Otherwise falls back to monitoring dependencies. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Tagging subscribers to this area: @agocke, @dotnet/runtime-infrastructure |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes initialization ordering in the WASM corerun.html preRun callback so the APP_ASSEMBLIES (TPA list) is populated correctly even when Emscripten’s preload runWithFS callback executes before the custom preRun.
Changes:
- Refactors TPA list creation into a helper (
buildTpaList()). - Builds the TPA list immediately if the virtual FS appears populated; otherwise delays startup via a run dependency and waits for preload dependencies to resolve.
AaronRobinsonMSFT
approved these changes
Mar 24, 2026
Member
AaronRobinsonMSFT
left a comment
There was a problem hiding this comment.
Thank you!
/cc @adamperlin
Open
3 tasks
Member
Author
|
/ba-g unrelated timeouts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR description was AI/Copilot-generated.
Summary
Fixes the TPA list population in the WASM corerun.html preRun callback.
Emscripten's
addOnPreRunusesunshift(), so therunWithFScallback that loads preloaded file data may run before our preRun callback. The previous code unconditionally added a run dependency and waited for file preloads, but by that time the FS was already populated and the dependency monitor never triggered correctly.The fix checks if the virtual FS is already populated when preRun executes. If data is already loaded, the TPA list is built immediately. Otherwise it falls back to the dependency monitoring approach.