From: Aleksey Kliger (λgeek) Date: Tue, 20 Jun 2023 22:16:03 +0000 (-0400) Subject: fix WBT dotnet.native.worker.js support (#87823) X-Git-Tag: accepted/tizen/unified/riscv/20231226.055536~1482 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e1318891981e1c63749bd8424603532a9ede773;p=platform%2Fupstream%2Fdotnet%2Fruntime.git fix WBT dotnet.native.worker.js support (#87823) * fix WBT dotnet.native.worker.js support We used to create a dotnet.worker.js but then we renamed the emscripten outputs to dotnet.native. * fix logic in ComputePublishWebAssets --- diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets index f0a62d0..5ea1ca5 100644 --- a/eng/liveBuilds.targets +++ b/eng/liveBuilds.targets @@ -205,9 +205,9 @@ $(LibrariesNativeArtifactsPath)*.dat;" IsNative="true" /> - - + <_WasmAssembliesInternal Remove="$(_WasmDedupAssembly)"/> diff --git a/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/AssetsComputingHelper.cs b/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/AssetsComputingHelper.cs index ad44510..e102f66 100644 --- a/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/AssetsComputingHelper.cs +++ b/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/AssetsComputingHelper.cs @@ -56,7 +56,7 @@ public class AssetsComputingHelper ".json" when fromMonoPackage && (fileName == "emcc-props" || fileName == "package") => $"{fileName}{extension} is not used by Blazor", ".ts" when fromMonoPackage && fileName == "dotnet.d" => "dotnet type definition is not used by Blazor", ".ts" when fromMonoPackage && fileName == "dotnet-legacy.d" => "dotnet type definition is not used by Blazor", - ".js" when assetType == "native" && !(dotnetJsSingleThreadNames.Contains(fileName) || enableThreads && fileName == "dotnet.native.worker") => $"{fileName}{extension} is not used by Blazor", + ".js" when assetType == "native" && !(dotnetJsSingleThreadNames.Contains(fileName) || (enableThreads && fileName == "dotnet.native.worker")) => $"{fileName}{extension} is not used by Blazor", ".pdb" when !copySymbols => "copying symbols is disabled", ".symbols" when fromMonoPackage => "extension .symbols is not required.", _ => null diff --git a/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmPublishAssets.cs b/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmPublishAssets.cs index a94c95b..dd90754 100644 --- a/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmPublishAssets.cs +++ b/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmPublishAssets.cs @@ -200,12 +200,12 @@ public class ComputeWasmPublishAssets : Task if (isDotNetJs) { var baseName = Path.GetFileNameWithoutExtension(key); - if (baseName.StartsWith("dotnet.native")) + if (baseName.StartsWith("dotnet.native.worker")) + baseName = "dotnet.native.worker"; + else if (baseName.StartsWith("dotnet.native")) baseName = "dotnet.native"; else if (baseName.StartsWith("dotnet.runtime")) baseName = "dotnet.runtime"; - else if (baseName.StartsWith("dotnet.worker")) - baseName = "dotnet.worker"; else if (baseName.StartsWith("dotnet")) baseName = "dotnet";