-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[wasm] cleanup testing and host support in templates and tests #73785
Conversation
Tagging subscribers to 'arch-wasm': @lewing Issue Detailsnothing yet
|
7a97066
to
19a82b5
Compare
# Conflicts: # src/mono/wasm/test-main.js
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
Move all legacy API object creation to dotnet.es6.post.js where module export is created.
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
…it is used in both scenarios (run & create).
…pers # Conflicts: # src/mono/wasm/runtime/dotnet.d.ts # src/mono/wasm/runtime/types.ts
Fix merge error.
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
Add API for parsing applications arguments passed by the WasmAppHost.
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
const { runtimeBuildInfo, setModuleImports, getAssemblyExports, runMain, getConfig } = await dotnet | ||
.withConsoleForwarding() | ||
.withElementOnExit() | ||
.withModuleConfig({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we configuring some things with a literate '.withXxx' api here and then passing in a big config dictionary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just for backward compatibility. We don't allow everything with those with*
methods. Also this method is not "public" as it is not in the typescript public definition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually don't need any of those callbacks now. They could be removed from the sample. It's just showing that they are still there and working, in case somebody needs to go low level.
This could be further improved later and it should not block the PR, I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WebHostBuilder* seems to go with Use* or Configure* rather than With*?
The failures here seem to be the linker related problems that are also in main. |
withDiagnosticTracing(enabled: boolean): DotnetHostBuilder; | ||
withDebugging(level: number): DotnetHostBuilder; | ||
withMainAssembly(mainAssemblyName: string): DotnetHostBuilder; | ||
withApplicationArgumentsFromQuery(): DotnetHostBuilder; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like it could have an optional string parameter that defaults to "args"
dotnet
,exit
todotnet.js
exit
method is replacement for our internalset_exit_code
dotnet
is a builder pattern with following usageThe builder methods are
There are also internal methods useful when testing.
withRuntimeOptions
,withWaitingForDebugger
,withElementOnExit
,withConsoleForwarding
,withExitCodeLogging
andwithModuleConfig
process.exit
if the exit code is0
TODO
withElementOnExit
,withConsoleForwarding
,withExitCodeLogging
as necessary for templates testwithApplicationArgumentFromQuery
withAsyncNodeJsFlushOnExit
as non-public opt-in nodejs flush on exit (enable optionally on windows only tests?)withMainAssembly
for setting main assembly namecreate
should returnthis.instance
once it existsdotnet.es6.extpost.js
requires a change in the SDKContributes to #70892
Fixes #71047