From 635a430db73f3d469ee4a020657997700df8d9aa Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Thu, 27 Jun 2024 07:54:30 +0000 Subject: [PATCH 1/6] chenges from #100334 --- NuGet.config | 1 + eng/Version.Details.xml | 14 +++++------ eng/Versions.props | 10 ++++---- eng/liveBuilds.targets | 6 ++--- .../templates/browser-wasm-build-tests.yml | 4 +-- eng/pipelines/runtime.yml | 25 ++++++++++++++++++- eng/testing/tests.wasm.targets | 3 ++- .../Directory.Build.props | 3 ++- .../System.Buffers.Tests.csproj | 1 + .../System.Threading.Tasks.Tests.csproj | 1 + src/libraries/sendtohelixhelp.proj | 1 + src/mono/browser/browser.proj | 13 ++++++---- src/mono/browser/build/BrowserWasmApp.targets | 7 +++--- src/mono/browser/emscripten-version.txt | 2 +- src/mono/browser/runtime/CMakeLists.txt | 4 +-- src/mono/browser/runtime/cwraps.ts | 9 ++++--- .../browser/runtime/es6/dotnet.es6.pre.js | 2 +- .../browser/runtime/jiterpreter-jit-call.ts | 4 +-- .../browser/runtime/jiterpreter-support.ts | 5 ++-- src/mono/browser/runtime/loader/assets.ts | 2 ++ .../browser/runtime/pthreads/ui-thread.ts | 2 ++ src/mono/browser/runtime/types/internal.ts | 3 ++- .../wasm/Wasm.Build.Tests/Blazor/MiscTests.cs | 1 + .../wasm/Wasm.Build.Tests/BuildTestBase.cs | 2 +- .../Common/BuildEnvironment.cs | 2 +- .../Wasm.Build.Tests/NativeLibraryTests.cs | 1 + .../TestMainJsProjectProvider.cs | 6 ++--- .../WasmSdkBasedProjectProvider.cs | 8 +++--- src/mono/wasm/build/WasmApp.Common.targets | 5 ++-- ...WebAssemblyApplicationBuilderExtensions.cs | 5 ++-- .../AspNetCoreServer/Program.cs | 1 + src/native/libs/CMakeLists.txt | 4 +++ src/tasks/AotCompilerTask/MonoAOTCompiler.cs | 4 +-- .../AssetsComputingHelper.cs | 3 ++- .../BootJsonBuilderHelper.cs | 4 +-- .../ComputeWasmBuildAssets.cs | 7 +++--- .../ComputeWasmPublishAssets.cs | 18 +++++++------ src/tasks/WasmAppBuilder/WasmAppBuilder.cs | 4 +-- 38 files changed, 125 insertions(+), 72 deletions(-) diff --git a/NuGet.config b/NuGet.config index c9f91b53273223..a2f361ba992c58 100644 --- a/NuGet.config +++ b/NuGet.config @@ -20,6 +20,7 @@ + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 791d52458024e0..6f263571c3228f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,8 +1,8 @@ - + https://github.com/dotnet/icu - 4fb2c4adac4956c542effd0b740b86297cfec759 + 6fa5c9be91ff269e5a73b8eb11b590bab44d9502 https://github.com/dotnet/msquic @@ -68,14 +68,14 @@ d145726036eb9c09a0e3cf03c4f70effd3b31cd7 - + https://github.com/dotnet/emsdk - ffe9afdc046cf7a6f82cc7c5796aade54047af64 + ccb35a56688801297932756a6ba004c5baaa1b98 - + https://github.com/dotnet/emsdk - ffe9afdc046cf7a6f82cc7c5796aade54047af64 + ccb35a56688801297932756a6ba004c5baaa1b98 @@ -443,4 +443,4 @@ 308c7d0f1fa19bd1e7b768ad13646f5206133cdb - + \ No newline at end of file diff --git a/eng/Versions.props b/eng/Versions.props index 191f9587c29a84..c821d8f1cd1e43 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -11,7 +11,7 @@ 7.0.19 6.0.$([MSBuild]::Add($([System.Version]::Parse('$(PackageVersionNet8)').Build),25)) preview - 7 + 6 false release @@ -214,7 +214,7 @@ 9.0.0-preview.6.24307.2 - 9.0.0-preview.6.24312.1 + 9.0.0-preview.6.24313.1 2.3.5 9.0.0-alpha.1.24167.3 @@ -237,7 +237,7 @@ Note: when the name is updated, make sure to update dependency name in eng/pipelines/common/xplat-setup.yml like - DarcDependenciesChanged.Microsoft_NET_Workload_Emscripten_Current_Manifest-9_0_100_Transport --> - 9.0.0-preview.7.24319.4 + 9.0.0-preview.6.24313.3 $(MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion) 9.0.0-preview.7.24319.4 @@ -260,6 +260,6 @@ 9.0.0-alpha.1.24175.1 $(MicrosoftNETRuntimeEmscriptenVersion) $(runtimewinx64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion) - 3.1.34 + 3.1.56 - + \ No newline at end of file diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets index fce021e7b99702..81885e75b6ed8f 100644 --- a/eng/liveBuilds.targets +++ b/eng/liveBuilds.targets @@ -215,9 +215,9 @@ $(LibrariesNativeArtifactsPath)segmentation-rules.json;" IsNative="true" /> - - + \ No newline at end of file diff --git a/eng/pipelines/common/templates/browser-wasm-build-tests.yml b/eng/pipelines/common/templates/browser-wasm-build-tests.yml index 3bcbec8607cac0..ece6c977dbb97b 100644 --- a/eng/pipelines/common/templates/browser-wasm-build-tests.yml +++ b/eng/pipelines/common/templates/browser-wasm-build-tests.yml @@ -111,7 +111,7 @@ jobs: /p:WasmSkipMissingRuntimePackBuild=true /p:PreparePackagesForWorkloadInstall=false /p:WorkloadsTestPreviousVersions=$(workloadsTestPreviousVersionsVar) - timeoutInMinutes: 180 + timeoutInMinutes: 240 condition: >- or( eq(variables['alwaysRunVar'], true), @@ -125,4 +125,4 @@ jobs: testRunNamePrefixSuffix: Mono_$(_BuildConfig)_$(_hostedOs) extraHelixArguments: /p:BrowserHost=$(_hostedOs) scenarios: - - buildwasmapps + - buildwasmapps \ No newline at end of file diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 97092071411ef8..71f7fb8da946bf 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -442,6 +442,27 @@ extends: eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), eq(variables['isRollingBuild'], true)) + # + # Build CoreCLR Formatting Job + # Only when CoreCLR is changed, and only in the 'main' branch (no release branches; + # both Rolling and PR builds). + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/format-job.yml + platforms: + - linux_x64 + - windows_x64 + jobParameters: + condition: >- + and( + or( + eq(variables['Build.SourceBranchName'], 'main'), + eq(variables['System.PullRequest.TargetBranch'], 'main')), + or( + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr_jit.containsChange'], true), + eq(variables['isRollingBuild'], true))) + # # Build CoreCLR with no R2R # @@ -839,6 +860,8 @@ extends: platforms: - browser_wasm #- browser_wasm_win + jobParameters: + timeoutInMinutes: 240 nameSuffix: _Threading extraBuildArgs: /p:WasmEnableThreads=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) extraHelixArguments: /p:WasmEnableThreads=true @@ -1903,4 +1926,4 @@ extends: baseOS: linux targetRid: banana.24-x64 nonPortable: true - container: SourceBuild_centos_x64 + container: SourceBuild_centos_x64 \ No newline at end of file diff --git a/eng/testing/tests.wasm.targets b/eng/testing/tests.wasm.targets index bf29d930d02f59..9bc59a4c3edacf 100644 --- a/eng/testing/tests.wasm.targets +++ b/eng/testing/tests.wasm.targets @@ -1,3 +1,4 @@ + @@ -31,7 +32,7 @@ <_ShellCommandSeparator Condition="'$(OS)' == 'Windows_NT'">&& <_ShellCommandSeparator Condition="'$(OS)' != 'Windows_NT'">&& true - 00:30:00 + 00:45:00 $(BundleDir) $(MSBuildThisFileDirectory) diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props index 0de334e7ff2113..cb8bc0c86b9a41 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props @@ -1,3 +1,4 @@ + @@ -235,7 +236,7 @@ - + diff --git a/src/libraries/System.Runtime/tests/System.Buffers.Tests/System.Buffers.Tests.csproj b/src/libraries/System.Runtime/tests/System.Buffers.Tests/System.Buffers.Tests.csproj index 66ae6833a50eb5..113d56e6f43635 100644 --- a/src/libraries/System.Runtime/tests/System.Buffers.Tests/System.Buffers.Tests.csproj +++ b/src/libraries/System.Runtime/tests/System.Buffers.Tests/System.Buffers.Tests.csproj @@ -6,6 +6,7 @@ $(NetCoreAppCurrent) + true 1 diff --git a/src/libraries/System.Runtime/tests/System.Threading.Tasks.Tests/System.Threading.Tasks.Tests.csproj b/src/libraries/System.Runtime/tests/System.Threading.Tasks.Tests/System.Threading.Tasks.Tests.csproj index 4b916c09bb4b35..2f832312d7e2df 100644 --- a/src/libraries/System.Runtime/tests/System.Threading.Tasks.Tests/System.Threading.Tasks.Tests.csproj +++ b/src/libraries/System.Runtime/tests/System.Threading.Tasks.Tests/System.Threading.Tasks.Tests.csproj @@ -6,6 +6,7 @@ <_WasmPThreadPoolUnusedSize>10 + true diff --git a/src/libraries/sendtohelixhelp.proj b/src/libraries/sendtohelixhelp.proj index 3608f1cae63d0d..ae3673b47fd8c8 100644 --- a/src/libraries/sendtohelixhelp.proj +++ b/src/libraries/sendtohelixhelp.proj @@ -39,6 +39,7 @@ '$(Scenario)' == 'gcstress0xc_jitminopts_heapverify1'">06:00:00 <_workItemTimeout Condition="'$(_workItemTimeout)' == '' and '$(TargetsAppleMobile)' == 'true'">01:15:00 <_workItemTimeout Condition="'$(_workItemTimeout)' == '' and '$(TargetOS)' == 'android'">00:30:00 + <_workItemTimeout Condition="'$(_workItemTimeout)' == '' and '$(TargetOS)' == 'browser'">00:45:00 <_workItemTimeout Condition="'$(Scenario)' == '' and '$(_workItemTimeout)' == '' and ('$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'arm')">00:45:00 <_workItemTimeout Condition="'$(Scenario)' != '' and '$(_workItemTimeout)' == '' and ('$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'arm')">01:00:00 <_workItemTimeout Condition="'$(Scenario)' == '' and '$(_workItemTimeout)' == '' and ('$(TestScope)' == 'outerloop' or '$(TestScope)' == 'all')">00:20:00 diff --git a/src/mono/browser/browser.proj b/src/mono/browser/browser.proj index 81768d43e6a536..e671e737f58ed1 100644 --- a/src/mono/browser/browser.proj +++ b/src/mono/browser/browser.proj @@ -216,6 +216,8 @@ + + @@ -272,10 +274,11 @@ <_EmccExportedRuntimeMethods>"[@(EmccExportedRuntimeMethod -> '%27%(Identity)%27', ',')]" <_EmccExportedFunctions>@(EmccExportedFunction -> '%(Identity)',',') - 33554432 + 67108864 5MB + <_EmccLinkFlags Include="-Wno-unused-command-line-argument" /> <_EmccLinkFlags Include="-s INITIAL_MEMORY=$(EmccInitialHeapSize)" /> <_EmccLinkFlags Include="-s STACK_SIZE=$(EmccStackSize)" /> <_EmccCommonFlags Condition="'$(WasmEnableThreads)' == 'true'" Include="-s USE_PTHREADS=1" /> @@ -293,7 +296,7 @@ <_EmccLinkFlags Include="--source-map-base http://example.com" /> <_EmccLinkFlags Include="-s WASM_BIGINT=1" /> <_EmccLinkFlags Include="-s EXPORT_NAME="'createDotnetRuntime'"" /> - <_EmccLinkFlags Include="-s MODULARIZE=1"/> + <_EmccLinkFlags Include="-s MODULARIZE=1" /> <_EmccLinkFlags Include="-s ENVIRONMENT="web,webview,worker,node,shell"" /> @@ -70,7 +71,7 @@ <_HasDotnetWasm Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.native.wasm'">true - <_HasDotnetJsWorker Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.native.worker.js'">true + <_HasDotnetJsWorker Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.native.worker.mjs'">true <_HasDotnetJsSymbols Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.native.js.symbols'">true <_HasDotnetNativeJs Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.native.js'">true <_HasDotnetGlobalizationJs Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.globalization.js'">true @@ -85,7 +86,7 @@ - + - + <_WasmAssembliesInternal Remove="$(_WasmDedupAssembly)"/> diff --git a/src/mono/browser/emscripten-version.txt b/src/mono/browser/emscripten-version.txt index 45dd3925308664..4a8bd23c1443d4 100644 --- a/src/mono/browser/emscripten-version.txt +++ b/src/mono/browser/emscripten-version.txt @@ -1 +1 @@ -3.1.34 \ No newline at end of file +3.1.56 \ No newline at end of file diff --git a/src/mono/browser/runtime/CMakeLists.txt b/src/mono/browser/runtime/CMakeLists.txt index 8b7939330f8c3a..296d0db56e66fd 100644 --- a/src/mono/browser/runtime/CMakeLists.txt +++ b/src/mono/browser/runtime/CMakeLists.txt @@ -44,8 +44,8 @@ set(ignoreMeEmsdkPath "${EMSDK_PATH}") if(CMAKE_BUILD_TYPE STREQUAL "Release") add_custom_command(TARGET dotnet.native - POST_BUILD COMMAND ${EMSDK_PATH}/bin/wasm-opt --enable-exception-handling ${CONFIGURATION_WASM_OPT_FLAGS} --strip-dwarf ${NATIVE_BIN_DIR}/dotnet.native.wasm -o ${NATIVE_BIN_DIR}/dotnet.native.wasm + POST_BUILD COMMAND ${EMSDK_PATH}/bin/wasm-opt --enable-exception-handling --enable-simd --enable-bulk-memory ${CONFIGURATION_WASM_OPT_FLAGS} --strip-dwarf ${NATIVE_BIN_DIR}/dotnet.native.wasm -o ${NATIVE_BIN_DIR}/dotnet.native.wasm COMMENT "Stripping debug symbols from dotnet.native.wasm using wasm-opt") endif() -configure_file(wasm-config.h.in include/wasm/wasm-config.h) +configure_file(wasm-config.h.in include/wasm/wasm-config.h) \ No newline at end of file diff --git a/src/mono/browser/runtime/cwraps.ts b/src/mono/browser/runtime/cwraps.ts index 61ae0be40c7686..6db66373ec9c01 100644 --- a/src/mono/browser/runtime/cwraps.ts +++ b/src/mono/browser/runtime/cwraps.ts @@ -1,3 +1,4 @@ + // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. @@ -53,7 +54,7 @@ const fn_signatures: SigLine[] = [ [true, "mono_wasm_load_icu_data", "number", ["number"]], [false, "mono_wasm_add_assembly", "number", ["string", "number", "number"]], [true, "mono_wasm_add_satellite_assembly", "void", ["string", "string", "number", "number"]], - [false, "mono_wasm_load_runtime", null, ["string", "number"]], + [false, "mono_wasm_load_runtime", null, ["number"]], [true, "mono_wasm_change_debugger_log_level", "void", ["number"]], [true, "mono_wasm_assembly_load", "number", ["string"]], @@ -293,10 +294,10 @@ function cwrap (name: string, returnType: string | null, argTypes: string[] | un // Only attempt to do fast calls if all the args and the return type are either number or void (fastCwrapTypes.indexOf(returnType) >= 0) && (!argTypes || argTypes.every(atype => fastCwrapTypes.indexOf(atype) >= 0)) && - // Module["asm"] may not be defined yet if we are early enough in the startup process + // Module["wasmExports"] may not be defined yet if we are early enough in the startup process // in that case, we need to rely on emscripten's lazy wrappers - Module["asm"] - ? ((Module["asm"])[name]) + Module["wasmExports"] + ? ((Module["wasmExports"])[name]) : undefined; // If the argument count for the wasm function doesn't match the signature, fall back to cwrap diff --git a/src/mono/browser/runtime/es6/dotnet.es6.pre.js b/src/mono/browser/runtime/es6/dotnet.es6.pre.js index e41bb6dc4af5cd..a405f58331a631 100644 --- a/src/mono/browser/runtime/es6/dotnet.es6.pre.js +++ b/src/mono/browser/runtime/es6/dotnet.es6.pre.js @@ -1,3 +1,3 @@ if (_nativeModuleLoaded) throw new Error("Native module already loaded"); _nativeModuleLoaded = true; -createDotnetRuntime = Module = createDotnetRuntime(Module); +createDotnetRuntime = Module = moduleArg(Module); \ No newline at end of file diff --git a/src/mono/browser/runtime/jiterpreter-jit-call.ts b/src/mono/browser/runtime/jiterpreter-jit-call.ts index f8da716a593467..0b7feef09394de 100644 --- a/src/mono/browser/runtime/jiterpreter-jit-call.ts +++ b/src/mono/browser/runtime/jiterpreter-jit-call.ts @@ -187,7 +187,7 @@ export function mono_interp_invoke_wasm_jit_call_trampoline ( thunk(ret_sp, sp, ftndesc, thrown); } catch (exc: any) { receiveWorkerHeapViews(); - const exceptionTag = (Module)["asm"]["__cpp_exception"]; + const exceptionTag = (Module)["wasmExports"]["__cpp_exception"]; const haveTag = exceptionTag instanceof (WebAssembly).Tag; if ( !haveTag || ( @@ -797,4 +797,4 @@ function generate_wasm_body ( builder.appendU8(WasmOpcode.return_); return true; -} +} \ No newline at end of file diff --git a/src/mono/browser/runtime/jiterpreter-support.ts b/src/mono/browser/runtime/jiterpreter-support.ts index f3f6e6a9f6b48d..81fe32afe2d91e 100644 --- a/src/mono/browser/runtime/jiterpreter-support.ts +++ b/src/mono/browser/runtime/jiterpreter-support.ts @@ -1,3 +1,4 @@ + // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. @@ -185,7 +186,7 @@ export class WasmBuilder { } getExceptionTag (): any { - const exceptionTag = (Module)["asm"]["__cpp_exception"]; + const exceptionTag = (Module)["wasmExports"]["__cpp_exception"]; if (typeof (exceptionTag) !== "undefined") mono_assert(exceptionTag instanceof (WebAssembly).Tag, () => `expected __cpp_exception export from dotnet.wasm to be WebAssembly.Tag but was ${exceptionTag}`); return exceptionTag; @@ -1832,7 +1833,7 @@ export function getMemberOffset (member: JiterpMember) { } export function getRawCwrap (name: string): Function { - const result = (Module)["asm"][name]; + const result = (Module)["wasmExports"][name]; if (typeof (result) !== "function") throw new Error(`raw cwrap ${name} not found`); return result; diff --git a/src/mono/browser/runtime/loader/assets.ts b/src/mono/browser/runtime/loader/assets.ts index 6d4232675d11d5..e7ab21b411e177 100644 --- a/src/mono/browser/runtime/loader/assets.ts +++ b/src/mono/browser/runtime/loader/assets.ts @@ -1,3 +1,4 @@ + // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. @@ -840,6 +841,7 @@ export function preloadWorkers () { const workerNumber = loaderHelpers.workerNextNumber++; const worker: Partial = new Worker(jsModuleWorker.resolvedUrl!, { name: "dotnet-worker-" + workerNumber.toString().padStart(3, "0"), + type: "module", }); worker.info = { workerNumber, diff --git a/src/mono/browser/runtime/pthreads/ui-thread.ts b/src/mono/browser/runtime/pthreads/ui-thread.ts index 505f1d81390706..f1bc0b4361bf02 100644 --- a/src/mono/browser/runtime/pthreads/ui-thread.ts +++ b/src/mono/browser/runtime/pthreads/ui-thread.ts @@ -1,3 +1,4 @@ + // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. @@ -291,6 +292,7 @@ function allocateUnusedWorker (): PThreadWorker { const workerNumber = loaderHelpers.workerNextNumber++; const worker = new Worker(uri, { name: "dotnet-worker-" + workerNumber.toString().padStart(3, "0"), + type: "module", }) as PThreadWorker; getUnusedWorkerPool().push(worker); worker.loaded = false; diff --git a/src/mono/browser/runtime/types/internal.ts b/src/mono/browser/runtime/types/internal.ts index e21c7ea79fd431..03133ff263f467 100644 --- a/src/mono/browser/runtime/types/internal.ts +++ b/src/mono/browser/runtime/types/internal.ts @@ -1,3 +1,4 @@ + // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. @@ -449,7 +450,7 @@ export declare interface EmscriptenModuleInternal { FS: any; wasmModule: WebAssembly.Instance | null; ready: Promise; - asm: any; + wasmExports: any; getWasmTableEntry(index: number): any; removeRunDependency(id: string): void; addRunDependency(id: string): void; diff --git a/src/mono/wasm/Wasm.Build.Tests/Blazor/MiscTests.cs b/src/mono/wasm/Wasm.Build.Tests/Blazor/MiscTests.cs index e01a9f4f3e6428..654811e14b8abc 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Blazor/MiscTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Blazor/MiscTests.cs @@ -22,6 +22,7 @@ public MiscTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildC [InlineData("Debug", false)] [InlineData("Release", true)] [InlineData("Release", false)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/103566")] public void NativeBuild_WithDeployOnBuild_UsedByVS(string config, bool nativeRelink) { string id = $"blz_deploy_on_build_{config}_{nativeRelink}_{GetRandomId()}"; diff --git a/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs b/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs index d20a8cc269579f..3dc64bc556d538 100644 --- a/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs +++ b/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs @@ -607,7 +607,7 @@ internal BuildPaths GetBuildPaths(BuildArgs buildArgs, bool forPublish = true) protected static string GetSkiaSharpReferenceItems() => @" - "; + "; protected static string s_mainReturns42 = @" public class TestClass { diff --git a/src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs b/src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs index 0ffd223d8e03f3..6142128dd500da 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs @@ -170,7 +170,7 @@ runtimeType is RuntimeVariant.SingleThreaded public string GetRuntimeNativeDir(string tfm = BuildTestBase.DefaultTargetFramework, RuntimeVariant runtimeType = RuntimeVariant.SingleThreaded) => Path.Combine(GetRuntimePackDir(tfm, runtimeType), "runtimes", DefaultRuntimeIdentifier, "native"); public bool IsMultiThreadingRuntimePackAvailableFor(string tfm) - => IsWorkload && File.Exists(Path.Combine(GetRuntimeNativeDir(tfm, RuntimeVariant.MultiThreaded), "dotnet.native.worker.js")); + => IsWorkload && File.Exists(Path.Combine(GetRuntimeNativeDir(tfm, RuntimeVariant.MultiThreaded), "dotnet.native.worker.mjs")); public static string WasmOverridePacksTargetsPath = Path.Combine(TestDataPath, "WasmOverridePacks.targets"); diff --git a/src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs b/src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs index 555cfa73fad176..8444f54308d5b9 100644 --- a/src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs @@ -51,6 +51,7 @@ public void ProjectWithNativeReference(BuildArgs buildArgs, RunHost host, string [Theory] [BuildAndRun(aot: false)] [BuildAndRun(aot: true)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/103566")] public void ProjectUsingSkiaSharp(BuildArgs buildArgs, RunHost host, string id) { string projectName = $"AppUsingSkiaSharp"; diff --git a/src/mono/wasm/Wasm.Build.Tests/TestMainJsProjectProvider.cs b/src/mono/wasm/Wasm.Build.Tests/TestMainJsProjectProvider.cs index 1f481b68010523..4ca29b0f3298fe 100644 --- a/src/mono/wasm/Wasm.Build.Tests/TestMainJsProjectProvider.cs +++ b/src/mono/wasm/Wasm.Build.Tests/TestMainJsProjectProvider.cs @@ -28,7 +28,7 @@ protected override IReadOnlyDictionary GetAllKnownDotnetFilesToFin { "dotnet.native.js.symbols", false }, { "dotnet.globalization.js", false }, { "dotnet.native.wasm", false }, - { "dotnet.native.worker.js", false }, + { "dotnet.native.worker.mjs", false }, { "dotnet.runtime.js", false }, { "dotnet.runtime.js.map", false } }; @@ -52,13 +52,13 @@ protected override IReadOnlySet GetDotNetFilesExpectedSet(AssertBundleOp res.Add("dotnet.native.wasm"); res.Add("dotnet.native.js"); res.Add("dotnet.runtime.js"); - res.Add("dotnet.native.worker.js"); + res.Add("dotnet.native.worker.mjs"); if (!assertOptions.IsPublish) { res.Add("dotnet.js.map"); res.Add("dotnet.runtime.js.map"); - res.Add("dotnet.native.worker.js.map"); + res.Add("dotnet.native.worker.mjs.map"); } } diff --git a/src/mono/wasm/Wasm.Build.Tests/WasmSdkBasedProjectProvider.cs b/src/mono/wasm/Wasm.Build.Tests/WasmSdkBasedProjectProvider.cs index 5807120bf8879f..77ccc61fe5ac40 100644 --- a/src/mono/wasm/Wasm.Build.Tests/WasmSdkBasedProjectProvider.cs +++ b/src/mono/wasm/Wasm.Build.Tests/WasmSdkBasedProjectProvider.cs @@ -28,7 +28,7 @@ protected override IReadOnlyDictionary GetAllKnownDotnetFilesToFin { "dotnet.native.js.symbols", false }, { "dotnet.globalization.js", true }, { "dotnet.native.wasm", false }, - { "dotnet.native.worker.js", true }, + { "dotnet.native.worker.mjs", true }, { "dotnet.runtime.js", true }, { "dotnet.runtime.js.map", false }, }; @@ -44,7 +44,7 @@ protected override IReadOnlySet GetDotNetFilesExpectedSet(AssertBundleOp }; if (assertOptions.RuntimeType is RuntimeVariant.MultiThreaded) { - res.Add("dotnet.native.worker.js"); + res.Add("dotnet.native.worker.mjs"); } if (assertOptions.GlobalizationMode is GlobalizationMode.Hybrid) { @@ -113,7 +113,7 @@ public void AssertBundle(AssertWasmSdkBundleOptions assertOptions) var nativeFilesToCheck = new List() { "dotnet.native.wasm", "dotnet.native.js" }; if (assertOptions.RuntimeType == RuntimeVariant.MultiThreaded) { - nativeFilesToCheck.Add("dotnet.native.worker.js"); + nativeFilesToCheck.Add("dotnet.native.worker.mjs"); } if (assertOptions.GlobalizationMode == GlobalizationMode.Hybrid) { @@ -133,7 +133,7 @@ public void AssertBundle(AssertWasmSdkBundleOptions assertOptions) if (assertOptions.ExpectedFileType != NativeFilesType.FromRuntimePack) { - if (nativeFilename == "dotnet.native.worker.js") + if (nativeFilename == "dotnet.native.worker.mjs") { Console.WriteLine($"Skipping the verification whether {nativeFilename} is from the runtime pack. The check wouldn't be meaningful as the runtime pack file has the same size as the relinked file"); continue; diff --git a/src/mono/wasm/build/WasmApp.Common.targets b/src/mono/wasm/build/WasmApp.Common.targets index 6aafca7d110a2f..6cbcc5ffc5e1cd 100644 --- a/src/mono/wasm/build/WasmApp.Common.targets +++ b/src/mono/wasm/build/WasmApp.Common.targets @@ -1,3 +1,4 @@ + false release diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets index 81885e75b6ed8f..db8aee3799b440 100644 --- a/eng/liveBuilds.targets +++ b/eng/liveBuilds.targets @@ -268,4 +268,4 @@ DependsOnTargets=" ResolveLibrariesRefAssembliesFromLocalBuild; ResolveLibrariesRuntimeFilesFromLocalBuild" /> - \ No newline at end of file + diff --git a/eng/pipelines/common/templates/browser-wasm-build-tests.yml b/eng/pipelines/common/templates/browser-wasm-build-tests.yml index ece6c977dbb97b..0be5acb0540304 100644 --- a/eng/pipelines/common/templates/browser-wasm-build-tests.yml +++ b/eng/pipelines/common/templates/browser-wasm-build-tests.yml @@ -125,4 +125,4 @@ jobs: testRunNamePrefixSuffix: Mono_$(_BuildConfig)_$(_hostedOs) extraHelixArguments: /p:BrowserHost=$(_hostedOs) scenarios: - - buildwasmapps \ No newline at end of file + - buildwasmapps diff --git a/eng/testing/tests.wasm.targets b/eng/testing/tests.wasm.targets index 9bc59a4c3edacf..17ad41a2eac89b 100644 --- a/eng/testing/tests.wasm.targets +++ b/eng/testing/tests.wasm.targets @@ -1,4 +1,3 @@ - diff --git a/src/mono/browser/build/BrowserWasmApp.targets b/src/mono/browser/build/BrowserWasmApp.targets index d05a9bf56fe784..4f969308540b03 100644 --- a/src/mono/browser/build/BrowserWasmApp.targets +++ b/src/mono/browser/build/BrowserWasmApp.targets @@ -1,4 +1,3 @@ - diff --git a/src/mono/browser/runtime/CMakeLists.txt b/src/mono/browser/runtime/CMakeLists.txt index 296d0db56e66fd..06af28d80c3885 100644 --- a/src/mono/browser/runtime/CMakeLists.txt +++ b/src/mono/browser/runtime/CMakeLists.txt @@ -48,4 +48,4 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release") COMMENT "Stripping debug symbols from dotnet.native.wasm using wasm-opt") endif() -configure_file(wasm-config.h.in include/wasm/wasm-config.h) \ No newline at end of file +configure_file(wasm-config.h.in include/wasm/wasm-config.h) diff --git a/src/mono/browser/runtime/es6/dotnet.es6.pre.js b/src/mono/browser/runtime/es6/dotnet.es6.pre.js index a405f58331a631..1c134a6ba33ef9 100644 --- a/src/mono/browser/runtime/es6/dotnet.es6.pre.js +++ b/src/mono/browser/runtime/es6/dotnet.es6.pre.js @@ -1,3 +1,3 @@ if (_nativeModuleLoaded) throw new Error("Native module already loaded"); _nativeModuleLoaded = true; -createDotnetRuntime = Module = moduleArg(Module); \ No newline at end of file +createDotnetRuntime = Module = moduleArg(Module); diff --git a/src/mono/browser/runtime/jiterpreter-jit-call.ts b/src/mono/browser/runtime/jiterpreter-jit-call.ts index 0b7feef09394de..0ae48fd16ba00c 100644 --- a/src/mono/browser/runtime/jiterpreter-jit-call.ts +++ b/src/mono/browser/runtime/jiterpreter-jit-call.ts @@ -797,4 +797,4 @@ function generate_wasm_body ( builder.appendU8(WasmOpcode.return_); return true; -} \ No newline at end of file +} diff --git a/src/mono/browser/runtime/jiterpreter-support.ts b/src/mono/browser/runtime/jiterpreter-support.ts index 81fe32afe2d91e..8b3370edfe75b1 100644 --- a/src/mono/browser/runtime/jiterpreter-support.ts +++ b/src/mono/browser/runtime/jiterpreter-support.ts @@ -1,4 +1,3 @@ - // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. diff --git a/src/mono/browser/runtime/loader/assets.ts b/src/mono/browser/runtime/loader/assets.ts index e7ab21b411e177..2cf974a7aa2642 100644 --- a/src/mono/browser/runtime/loader/assets.ts +++ b/src/mono/browser/runtime/loader/assets.ts @@ -1,4 +1,3 @@ - // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. diff --git a/src/mono/browser/runtime/pthreads/ui-thread.ts b/src/mono/browser/runtime/pthreads/ui-thread.ts index f1bc0b4361bf02..92874587cee226 100644 --- a/src/mono/browser/runtime/pthreads/ui-thread.ts +++ b/src/mono/browser/runtime/pthreads/ui-thread.ts @@ -1,4 +1,3 @@ - // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license.