[wasm] Modify workload to pick threading runtime packs#72412
[wasm] Modify workload to pick threading runtime packs#72412radical merged 7 commits intodotnet:mainfrom
Conversation
This change adds the 2 wasm threading runtime packs to the wasm workload. In order for a threading runtime pack to be chosen, WorkloadManifest.targets is also modified to override the runtime pack name when the following props are set: WasmEnableThreads - full threading support and will load Microsoft.NETCore.App.Runtime.multithread.Mono.browser-wasm WasmEnablePerfTrace - runtime only threading support and will load Microsoft.NETCore.App.Runtime.perftrace.Mono.browser-wasm
|
Need to make sure WBT knows about the packs |
lewing
left a comment
There was a problem hiding this comment.
A couple of questions but should be looks good otherwise
| <RuntimePackNamePatterns Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(WasmEnableThreading)' == 'true'">Microsoft.NETCore.App.Runtime.Mono.multithread.**RID**</RuntimePackNamePatterns> | ||
| <RuntimePackNamePatterns Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(WasmEnablePerfTrace)' == 'true'">Microsoft.NETCore.App.Runtime.Mono.perftrace.**RID**</RuntimePackNamePatterns> |
There was a problem hiding this comment.
can both of these be true or do we only allow perf trace on a single threaded userspace? do we need another mt perftrace runtime pack?
There was a problem hiding this comment.
Perftrace is single threaded userspace, multi-threaded runtime. Do you think we should error if both are true?
There was a problem hiding this comment.
that is probably fine for the moment we may want to have something like named configs once this is supported.
|
Looks good. I can add a test in WBT. |
|
|
To get this to work, I think WasmBuildTests is going to need to wait for the threading builds to complete and then import its runtime packs. |
Ok, I will add that. |
- Runtime pack nugets other than the one that gets built might not be
available. In that case, we copy the only one available as the missing
ones.
- This is useful for local builds, allowing running Wasm.Build.Tests
without having to build all 3 runtimes.
- This is enabled for CI also, in this commit. But once CI gets the
ability to fetch the other runtime packs, this will change.
|
I have pushed some changes that will unblock this PR. Essentially, we copy the single runtime pack nuget to the other nuget filenames, and should allow running Wasm.Build.Tests . Once I have the PR, to get the other correct runtime packs on CI, completed, I will change this behavior to be applicable only for local builds. It will emit this when it copies: |
- The earlier approach of simply making copies of the existing runtime pack nuget with different names doesn't work, and `dotnet workload install` rejects it. ``` Installing pack Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm version 7.0.0-ci... Workload installation failed. Rolling back installed packs... ``` Instead, now we build the missing nugets from the project with different values for `$(MonoWasmBuildVariant)`. - this handles local builds, and incremental builds also - To skip building the missing nugets, for example, when you have all of them available, then set `WasmSkipMissingRuntimePackBuild=true`.
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This change adds the 2 wasm threading runtime packs to the wasm workload. In order for a threading runtime pack to be chosen, WorkloadManifest.targets is also modified to override the runtime pack name when the following props are set:
WasmEnableThreads - full threading support and will load
Microsoft.NETCore.App.Runtime.multithread.Mono.browser-wasmWasmEnablePerfTrace - runtime only threading support and will load
Microsoft.NETCore.App.Runtime.perftrace.Mono.browser-wasmContributes to #72872