Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-09-08[release/7.0][wasm] Add CI job for AOT+SIMD to `runtime-wasm` for PRs (#75064)Ankit Jain
* [wasm] Add support for running `System.Runtime.Intrinsics` tests with .. SIMD enabled, as part of smoke tests. * [wasm] Add a new `runtime-wasm-features` pipeline .. which has only a SIMD_AOT job for now. * [wasm] Add SIMD_AOT job to runtime-wasm for now, as we can't add new pipelines * Fix browser-simd run * [wasm] Mark simd job as unstable for now Issues: https://github.com/dotnet/runtime/issues/75044 and https://github.com/dotnet/runtime/issues/75098
2022-09-08[release/7.0][wasm-mt] Fix pack/build issues in threaded builds (#75171)Aleksey Kliger (λgeek)
* [wasm-mt] Build the threaded CoreLib if MonoWasmBuildVariant is 'multithread' Also define the perf-tracing feature flag for the threaded and perf-tracing build variants. * Also fixup the BCL assemblies * [wasm-mt] look for WasmEnableThreads in user projects not WasmEnabelThreading. Conversely, use `WasmEnablePerfTracing`, not `WasmEnablePerfTrace`. * include dotnet.worker.js in runtime pack * use set "preferDirectoryName" to true in WASM templates * fix whitespace * when updating RuntimePackNamePatterns don't include net7 component The workload resolver already did its job by the time this property is updated, so we need to use patterns that correspond to actual nupkg names (unversioned), not runtime pack alias names from the manifest (versioned with 'net7') * WBT: unset MonoWasmBuildVariant for the non-threaded runtime For local testing if the built runtime is a multithreaded one, make and we need to make the normal variant nuget, unset MonoWasmBuildVariant property * [WorkloadBuildTasks] remove the workload manifest net6/net7 hack Starting with 7.0.100-rc.2.22457.6 we already have the versioned net6/net7 toolchains, so the hack isn't needed anymore (and in fact, breaks workload installation during testing) * also build the JS interop library with threading if variant is used
2022-09-07[release/7.0][wasm] SIMD related build fixes (#75042)Ankit Jain
- rename `$(WasmSIMD)` -> `$(WasmEnableSIMD)` - Require the workload when the property is set - Add tests for the various cases
2022-09-07[release/7.0][wasm] Use the correct runtime pack version when the workload ↵Ankit Jain
is not installed (#75028) * Mono.ToolChain: WorkloadManifest.targets - Set runtime pack version even .. if no workload is installed. This ensures that the correct runtime pack version (intended by the installed manifest) is used even if the workload is not installed. * Improve incremental builds for workload installs used for testing * [wasm] Add a check for blazor projects, to confirm that the correct .. runtime pack version is being used. To use the locally built runtime pack without the workload, we need the nuget, so we use that from the artifacts. * [wasm] Add built nugets as payload for WBT * Fix built-nugets payload * [wasm] Allow setting browser path for use with xharness via envvar
2022-08-23[release/7.0-rc1] Roll forward to the latest 6.0.x builds (#74288)Larry Ewing
* Roll forward to the latest 6.0.x builds * Remove workaround for version emsdk import * Fix incorrect pack names * Fix unaliased packs * Alias the experimental packs in WorkloadManifest.targets too * Fix quoting * Download manifests for workloads leg Co-authored-by: Juan Sebastian Hoyos Ayala <juan.hoyos@microsoft.com>
2022-08-22[release/7.0-rc1] net7.0 + net6.0 workload multitargeting changes (#74018)Larry Ewing
* WIP * Update all the workload names to be net6 versions. This is needed in 7 but NOT in 6. Dotnet workload install wasm-tools-net6 should install a different set of components than wasm-tools * Add localization to net7 and correct localization for net6 to target that workload * Update to 6.0.9 which should be the next version of emsdk. * Update the net7 and net6 workloads to rename all sdk packs * Use localize data from net7 project * Fix typo * Fix typo * Update KnownRuntimePack mono versions without clearing them all * Add net6.0 to description and fix up emscripten-net6 reference * Fix emsdk version number * depend on microsoft-net-sdk-emscripten-net7 * Fix missing .net7 renames * Update WorkloadManifest.targets.in Don't use **FromWorkload** for pack versions because it doesn't understand the name aliasing we have to use with runtime packs * Update workload manifest to fix names * Update the emscripten manifest dependencies * Use full hash * WIP: install workload combos for testing * Update Versions.props Use Pacjjag6.0.8 packages for the moment because they should be in dotnet-public * Update emsdk dependencies to `7.0.0-rc.1.22418.3` * Update emscripten to 7.0.0-rc.1.22418.6, and 6.0.4 * wip * Fix conditions in WorkloadManifest.targets * Fix up running WBT * Fix build HACK: to work around an incorrect condition in emscripten's WorkloadManifest.targets which causes emscripten packs not to get imported. * Update WorkloadManifest.targets.in * Update WorkloadManifest.targets.in * Fix dotnet path references for workload testing * InstallWorkloadFromArtifacts: don't delete the target path between different requests, clean up before starting * Fix PackageVersionNet6=6.0.8 * WorkloadManifest.targets: rename some properties to be internal, and versioned * More renames to fix builds * Update Versions.props * Fix up a condition in WorkloadManifest.targets * Work around the import troubles * Work around the import troubles * Revert broken version check * Use BrowserWorkloadDisabled which will be set in both cases * Fix typos in WorkloadManifest.targets * Wasm.Build.Tests: Workaround a msbuild bug causing mysterious failures When running a fresh build with `dotnet build`, the first one works fine. But all the subsequent builds fail with no info in the logs at all. ``` $ /workspaces/runtime/artifacts/bin/dotnet-net7/dotnet build MSBuild version 17.4.0-preview-22413-01+f0a66ec43 for .NET Build FAILED. 0 Warning(s) 0 Error(s) ``` And it seems to be related to msbuild nodes, so disable NodeReuse. * cleanup * Remove a bunch of stale logic from WBT Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com> Co-authored-by: Marc Paine <marcpop@microsoft.com> Co-authored-by: Ankit Jain <radical@gmail.com>
2022-08-20[release/7.0-rc1] Add a way to suppress all trimming warnings (#74220)github-actions[bot]
* Add a way to suppress all trimming warnings Fixes #73926. Also adding AOT analysis suppression for parity. I didn't port the warning level support because the compat kind of goes beyond that. We can revisit later if needed. * Update Microsoft.NETCore.Native.targets Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
2022-08-18[release/7.0-rc1] perf pipeline: Switch to node 14.x (#74089)github-actions[bot]
* perf pipeline: Switch to node 14.x - Switch to node 14.x instead of 18.x, because the latter doesn't seem to be compatible with ubuntu 18.x: `node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)` - Also, remove the existing `nodejs` package before installing a new one, because these machines are shared, and would get affected by installations performed by other runs. * perf pipeline: install wasm pre-reqs only on wasm jobs * perf pipeline: correctly return exit code, so helix can pick that up and set _commandExitCode * Set a default value for non-wasm cases * Change the prereqs condition so a failure needs to be explicitly marked This allows cases which don't care about this, to continue working, because they won't set `$PERF_PREREQS_INSTALL_FAILED`, and default to continuing with the job. * Use --user with pip install * Update eng/testing/performance/microbenchmarks.proj Co-authored-by: Ankit Jain <radical@gmail.com>
2022-08-16[main] Update dependencies from dotnet/linker (#73894)dotnet-maestro[bot]
* Update dependencies from https://github.com/dotnet/linker build 20220812.4 Microsoft.NET.ILLink.Tasks From Version 7.0.100-1.22412.3 -> To Version 7.0.100-1.22412.4 * `System.Runtime.Serialization.Json.ReflectionOnly.Tests` - fix linker .. errors. ``` [22:32:27] fail: [FAIL] DataContractJsonSerializerTests.DCJS_VerifyDateTimeForFormatStringDCJsonSerSettings [22:32:27] info: System.InvalidOperationException : No set method for property 'UtcDateTime' in type 'System.Runtime.Serialization.DateTimeOffsetAdapter'. [22:32:27] info: at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) [22:32:27] info: at DataContractJsonSerializerTests.SerializeAndDeserialize[DateTimeOffset](DateTimeOffset value, String baseline, DataContractJsonSerializerSettings settings, Func`1 serializerFactory, Boolean skipStringCompare) [22:32:27] info: at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags ) [22:32:27] fail: [FAIL] DataContractJsonSerializerTests.DCJS_ClassWithDatetimeOffsetTypeProperty [22:32:27] info: System.InvalidOperationException : No set method for property 'UtcDateTime' in type 'System.Runtime.Serialization.DateTimeOffsetAdapter'. [22:32:27] info: at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) [22:32:27] info: at DataContractJsonSerializerTests.SerializeAndDeserialize[TypeWithDateTimeOffsetTypeProperty](TypeWithDateTimeOffsetTypeProperty value, String baseline, DataContractJsonSerializerSettings settings, Func`1 serializerFactory, Boolean skipStringCompare) [22:32:27] info: at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags ) ``` * [wasm] System.Runtime.Serialization.Schema.Tests - fix linker errors ``` fail: [FAIL] System.Runtime.Serialization.Schema.Tests.ImporterTests.Import(import: Action`1 { Method = Void <Import_MemberData>b__7(System.Runtime.S erialization.XsdDataContractImporter), Target = <>c__DisplayClass7_1 { schemaSet = XmlSchemaSet { ... }, typeName = http://schemas.datacontract.org/200 4/07/System.Runtime.Serialization.Schema.Tests:ImporterTests.SerializableFormatClass } }, codeLength: -1) info: System.MissingMethodException : No parameterless constructor defined for type 'Microsoft.CSharp.CSharpCodeProvider'. info: at System.RuntimeType.CreateInstanceMono(Boolean , Boolean ) info: at System.RuntimeType.CreateInstanceDefaultCtor(Boolean , Boolean ) info: at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions) info: at System.Activator.CreateInstance(Type type, Boolean nonPublic) info: at System.Activator.CreateInstance(Type type) info: at System.CodeDom.Compiler.CompilerInfo.CreateProvider() info: at System.CodeDom.Compiler.CodeDomProvider.CreateProvider(String ) info: at System.Runtime.Serialization.Schema.Tests.SchemaUtils.DumpCode(CodeCompileUnit ccu, CodeDomProvider provider) info: at System.Runtime.Serialization.Schema.Tests.ImporterTests.Import(Action`1 import, Int32 codeLength) info: at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags ) ``` * [wasm] System.Runtime.Serialization.Xml.ReflectionOnly.Tests - fix .. linker errors. ``` [02:47:16] fail: [FAIL] DataContractSerializerTests.DCS_MemoryStream_Serialize_UsesBuiltInAdapter [02:47:16] info: System.Runtime.Serialization.InvalidDataContractException : No get method for property 'Capacity' in type 'System.Runtime.Serialization.MemoryStreamAdapter'. [02:47:16] info: at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.ThrowInvalidDataContractException(String , Type ) [02:47:16] info: at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.ThrowInvalidDataContractException(String ) [02:47:16] info: at System.Runtime.Serialization.DataContracts.ClassDataContract.ClassDataContractCriticalHelper.ImportDataMembers() [02:47:16] info: at System.Runtime.Serialization.DataContracts.ClassDataContract.ClassDataContractCriticalHelper..ctor(Type ) [02:47:16] info: at System.Runtime.Serialization.DataContracts.ClassDataContract..ctor(Type ) [02:47:16] info: at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.CreateDataContract(Type ) [02:47:16] info: at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.CreateDataContract(Int32 , RuntimeTypeHandle , Type ) [02:47:16] info: at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.GetDataContractSkipValidation(Int32 , RuntimeTypeHandle , Type ) [02:47:16] info: at System.Runtime.Serialization.DataContracts.DataContract.GetDataContractSkipValidation(Int32 id, RuntimeTypeHandle typeHandle, Type type) [02:47:16] info: at System.Runtime.Serialization.DataContracts.DataContract.GetDataContract(RuntimeTypeHandle typeHandle, Type type) [02:47:16] info: at System.Runtime.Serialization.DataContracts.DataContract.GetDataContract(Type type) [02:47:16] info: at System.Runtime.Serialization.DataContractSerializer.get_RootContract() [02:47:16] info: at System.Runtime.Serialization.DataContractSerializer.InternalWriteStartObject(XmlWriterDelegator writer, Object graph) [02:47:16] info: at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) [02:47:16] info: at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) [02:47:16] info: at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph) [02:47:16] info: at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(XmlDictionaryWriter , Object ) [02:47:16] info: at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(Stream , Object ) [02:47:16] info: at System.Runtime.Serialization.Tests.DataContractSerializerHelper.SerializeAndDeserialize[MemoryStream](MemoryStream value, String baseline, DataContractSerializerSettings settings, Func`1 serializerFactory, Boolean skipStringCompare) [02:47:16] info: at DataContractSerializerTests.<DCS_MemoryStream_Serialize_UsesBuiltInAdapter>g__ValidateObject|240_0(MemoryStream original, String expectedXml, Byte[] expectedData, Int32 expectedPosition, Boolean expectedExposable) [02:47:16] info: at DataContractSerializerTests.DCS_MemoryStream_Serialize_UsesBuiltInAdapter() [02:47:16] info: at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags ) ``` * Fix linker errors - System.Xml.XmlSerializer.ReflectionOnly.Tests ``` [02:47:21] fail: [FAIL] XmlSerializerTests.Xml_ImmutableCollections(type: typeof(System.Collections.Immutable.ImmutableArray<int>), collection: [42], createException: null, addException: typeof(System.InvalidOperationException), expectedXml: "<?xml version=\"1.0\" encoding=\"utf-8\"?><ArrayOf"..., exMsg: "Specified method is not supported.") [02:47:21] info: System.InvalidOperationException : There was an error generating the XML document. [02:47:21] info: ---- System.InvalidOperationException : To be XML serializable, types which inherit from ICollection must have an implementation of Add(System.Int32) at all levels of their inheritance hierarchy. System.Collections.Immutable.ImmutableArray`1[[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] does not implement Add(System.Int32). [02:47:21] info: at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id) [02:47:21] info: at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle) [02:47:21] info: at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces) [02:47:21] info: at System.Xml.Serialization.XmlSerializer.Serialize(Stream stream, Object o, XmlSerializerNamespaces namespaces) [02:47:21] info: at System.Xml.Serialization.XmlSerializer.Serialize(Stream stream, Object o) [02:47:21] info: at XmlSerializerTests.Serialize[Object](Object value, String baseline, Func`1 serializerFactory, Boolean skipStringCompare, XmlSerializerNamespaces xns) [02:47:21] info: at XmlSerializerTests.Xml_ImmutableCollections(Type type, Object collection, Type createException, Type addException, String expectedXml, String exMsg) [02:47:21] info: at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags ) [02:47:21] info: ----- Inner Stack Trace ----- [02:47:21] info: at System.Xml.Serialization.TypeScope.GetDefaultIndexer(Type , String ) [02:47:21] info: at System.Xml.Serialization.TypeScope.GetCollectionElementType(Type , String ) [02:47:21] info: at System.Xml.Serialization.TypeScope.ImportTypeDesc(Type , MemberInfo , Boolean ) [02:47:21] info: at System.Xml.Serialization.TypeScope.GetTypeDesc(Type , MemberInfo , Boolean , Boolean ) [02:47:21] info: at System.Xml.Serialization.TypeScope.GetTypeDesc(Type , MemberInfo , Boolean ) [02:47:21] info: at System.Xml.Serialization.ModelScope.GetTypeModel(Type , Boolean ) [02:47:21] info: at System.Xml.Serialization.ModelScope.GetTypeModel(Type ) [02:47:21] info: at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type , XmlRootAttribute , String ) [02:47:21] info: at System.Xml.Serialization.XmlSerializer.GenerateXmlTypeMapping(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, String defaultNamespace) [02:47:21] info: at System.Xml.Serialization.XmlSerializer.GetMapping() [02:47:21] info: at System.Xml.Serialization.XmlSerializer.SerializeUsingReflection(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id) [02:47:21] info: at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id) ``` * [wasm] Fix trimming errors in event-pipe sample `IL2121` was disabled for samples, but the project discard the value of `$(NoWarn)`, thus missing the warning code. ``` ILLink : Trim analysis error IL2121: System.Diagnostics.Tracing.EventSource: Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2113'. Consi der removing the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] ILLink : Trim analysis error IL2121: System.Diagnostics.Tracing.EventSource: Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2115'. Consi der removing the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] /workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs(885,9): Trim analysis error IL2121: System.Diagn ostics.Tracing.EventSource.WriteEvent(Int32, Int64, Int64, Int64): Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2026'. Consider removi ng the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] /workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs(1067,9): Trim analysis error IL2121: System.Diag nostics.Tracing.EventSource.WriteEvent(Int32, Int32, String): Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2026'. Consider removing th e unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] /workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs(955,9): Trim analysis error IL2121: System.Diagn ostics.Tracing.EventSource.WriteEvent(Int32, String, String, String): Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2026'. Consider rem oving the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] /workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs(927,9): Trim analysis error IL2121: System.Diagnostics.Tracing.EventSource.WriteEvent(Int32, String, String): Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2026'. Consider removing the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] /workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs(796,9): Trim analysis error IL2121: System.Diagnostics.Tracing.EventSource.WriteEvent(Int32, Int32): Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2026'. Consider removing the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] /workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs(1366,13): Trim analysis error IL2121: System.Diagnostics.Tracing.EventSource.WriteEvent(Int32, Object[]): Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2112'. Consider removing the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] /workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs(904,9): Trim analysis error IL2121: System.Diagnostics.Tracing.EventSource.WriteEvent(Int32, String): Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2026'. Consider removing the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] /workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs(1236,13): Trim analysis error IL2121: System.Diagnostics.Tracing.EventSource.WriteEventCore(Int32, Int32, EventData*): Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2112'. Consider removing the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] /workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs(1959,9): Trim analysis error IL2121: System.Diagnostics.Tracing.EventSource.WriteEventVarargs(Int32, Guid*, Object[]): Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2112'. Consider removing the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] /workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs(1350,9): Trim analysis error IL2121: System.Diagnostics.Tracing.EventSource.WriteEventWithRelatedActivityIdCore(Int32, Guid*, Int32, EventData*): Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2112'. Consider removing the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sa mple.csproj] ILLink : Trim analysis error IL2121: System.Resources.ResourceReader.DeserializeObject(Int32): Unused 'UnconditionalSuppressMessageAttribute' for warni ng 'IL2026'. Consider removing the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sampl e.csproj] ``` Fixes https://github.com/dotnet/runtime/issues/73933 . * [wasm] Disable tests failing with trimming Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Ankit Jain <radical@gmail.com>
2022-08-16Clean up AOT publish process (#73416)Lakshan Fernando
* Clean up AOT publish process * Update src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.targets Co-authored-by: Sven Boemer <sbomer@gmail.com> * Update src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.targets Co-authored-by: Sven Boemer <sbomer@gmail.com> * FB and working around running native aot tests * update crossgen2 reference * moving package version change out of a target as per FB * Fix nativeaot test take 2 * disabling a failing test * Clean up AOT publish process * Update src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.targets Co-authored-by: Sven Boemer <sbomer@gmail.com> * Update src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.targets Co-authored-by: Sven Boemer <sbomer@gmail.com> * FB and working around running native aot tests * update crossgen2 reference * moving package version change out of a target as per FB * Fix nativeaot test take 2 * disabling a failing test * Remove TrimMode workaround * work around a test issue * Update src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets Co-authored-by: Sven Boemer <sbomer@gmail.com> * Update src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets Co-authored-by: Sven Boemer <sbomer@gmail.com> * update the version check for package * Cross target support, requires changes from SDK * Change ResolvedTargetILCompilerPack to match SDK changes * FB * Trigger Build to fix interop break Co-authored-by: Sven Boemer <sbomer@gmail.com>
2022-08-16Update runtime repo to use Preview 7 SDK (#72145)Andy Gocke
Co-authored-by: Jeremy Koritzinsky <jekoritz@microsoft.com> Co-authored-by: Juan Hoyos <juan.hoyos@microsoft.com> Co-authored-by: Aaron Robinson <arobins@microsoft.com> Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> Co-authored-by: Jakob Botsch Nielsen <jakob.botsch.nielsen@gmail.com>
2022-08-15Repoint urls in docs (#73766)N0D4N
2022-08-14[wasm] Misc tests related fixes (#73884)Ankit Jain
* [wasm] Stop running crypto tests with subtlecrypto * [wasm] Add --web-server-use-cop for samples when running on helix for a threaded build * [wasm] Makefile, honor V=1 and emit binlog * [wasm] PInvokeTableGenerator: emit the type name also, for the warning * [wasm] Improve build for non-default runtime packs .. by using `MSBuild` task to build them instead of invoking `dotnet.sh`. - And fix incremental builds * [wasm] Run smoke tests only for AOT - Building, and running all the tests for EAT case will help catch linker errors that can slip through. * [wasm] Fix linker errors for tests Fixes https://github.com/dotnet/runtime/issues/73901
2022-08-12[main] Update dependencies from dotnet/linker (#73410)dotnet-maestro[bot]
* Update dependencies from https://github.com/dotnet/linker build 20220804.4 Microsoft.NET.ILLink.Tasks From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22404.4 * Update dependencies from https://github.com/dotnet/linker build 20220804.5 Microsoft.NET.ILLink.Tasks From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22404.5 * Update dependencies from https://github.com/dotnet/linker build 20220805.1 Microsoft.NET.ILLink.Tasks From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22405.1 * Update dependencies from https://github.com/dotnet/linker build 20220808.3 Microsoft.NET.ILLink.Tasks From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22408.3 * Update dependencies from https://github.com/dotnet/linker build 20220809.9 Microsoft.NET.ILLink.Tasks From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22409.9 * Added and modified suppressions * Disable IL2121 everywhere for now * Disable IL2121 in trimming tests * Disable IL2121 in wam samples * Disable IL2121 in libraries tests * Update dependencies from https://github.com/dotnet/linker build 20220811.2 Microsoft.NET.ILLink.Tasks From Version 7.0.100-1.22377.1 -> To Version 7.0.100-1.22411.2 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Ankit Jain <radical@gmail.com> Co-authored-by: Jeremi Kurdek <jkurdek@gmail.com> Co-authored-by: vitek-karas <10670590+vitek-karas@users.noreply.github.com> Co-authored-by: Sven Boemer <sbomer@gmail.com>
2022-08-09[PERF] Fix "x$PERF_PREREQS_INSTALLED was unexpected at this time" Error for ↵Parker Bibus
Microbenchmarks (#73584) * Try double brackets. * Only use the bash check if running on non-windows machine, added command for running on windows machines. * Undoing changes to if statement brackets (double to single now) as the double bracket is not necessary. * Use the correct, previously removed command.
2022-08-06[wasm] Ensure prerequisites are installed on the perf pipeline (#72431)Ankit Jain
- this updates node/npm to 18.x - And passes `--not-in-lab` for PRs builds, so it doesn't try to setup access tokens.
2022-08-05runtime-wasm-perf: add support for running against forks, and branches (#73105)Ankit Jain
2022-08-05[NativeAot] Bring up a dozen or so libraries tests (#73363)Michal Strehovský
This time found some product issues and fixed them.
2022-08-04[Android] Introduce NetTraceToMibcConverter task & streamline testing ↵Steve Pfister
targets (#72394) NetTraceToMibcConverter - Used in profiled AOT scenarios where a .nettrace file is given as input and is converted to a .mibc file that can be fed into the AOT compiler. This previously was in the AotCompiler task, but for clarity purposes is now separated out. Streamline Android testing targets - The testing targets function the same, but are now structured similarly to iOS and Wasm. - Introduced new testing properties to support profiled AOT: NetTraceFilePath - The path to a .nettrace file that will be converted into a .mibc file and fed into the aot compiler RuntimeComponents - The list of native components to include in the test app build (diagnostics_tracing) DiagnosticsPorts - The ip address:port where the runtime will listen when running diagnostic tooling DiagnosticStartupMode - The mode the runtime will use at startup for diagnostic scenarios. Suspend will halt the app very early and wait, while nosuspend will wait for a connection, but not halt the runtime Co-authored-by: Mitchell Hwang <16830051+mdh1418@users.noreply.github.com>
2022-08-02[iOS] Remove unnecessary newline from CI script (#67861)Steve Pfister
A newline was incorrectly added to the script that executes xharness, causing it to return a 0 exit code even if there was a crash. This caused CI to report a pass no matter what. The change also disables tests that were causing crashes.
2022-07-28[libs][mono] Enable diagnostics_tracing runtime component in Android build ↵Mitchell Hwang
and reenable System.Diagnostics.Tracing (#72955)
2022-07-28[wasm] remove support for CommonJS (#72865)Pavel Savara
2022-07-28[wasm][wbt] Test that `dotnet.js` could be run from any current directory ↵Yusuke Yamada
(#69441) In #72275 we fixed locateFile to deal with relative file path or URL. We could also handle absolute path/URL. This PR is adding tests to prove it works.
2022-07-27[wasm] Modify workload to pick threading runtime packs (#72412)Steve Pfister
* [wasm] Modify workload to pick threading runtime packs 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 * Add error condition when both WasmEnableThreading and WasmEnablePerfTrace are true * [wasm] Set default value for MonoWasmBuildVariant, for runtime pack nuget * [wasm] Wasm.Build.Tests: build runtime pack nugets with different names - 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`. * fix comment Co-authored-by: Steve Pfister <steve.pfister@microsoft.com> Co-authored-by: Ankit Jain <radical@gmail.com>
2022-07-27[wasm] Add `runtime-wasm-perf` pipeline (#72119)Ankit Jain
- This adds a new `runtime-wasm-perf` pipeline, which can be run manually with `/azp run runtime-wasm-perf` - Essentially, splits the perf jobs into `perf-wasm-jobs.yml`, and `perf-non-wasm-jobs.yml` - It does not change the existing perf pipeline - this will run all the wasm benchmarks, but it doesn't support comparing results yet - A follow up PR will add perf jobs to the runtime pipelines, for sanity check, and won't run the full set of benchmarks.
2022-07-24Fix typos (#72709)Adeel Mujahid
2022-07-21Warn on trimming with COM hosting (built-in COM support) enabled (#72493)Elinor Fung
2022-07-20[Android] Fix some System.Net tests (#71385)Simon Rozsival
* Implement IncludeNetworkSecurityConfig * Use IncludeNetworkSecurityConfig * Fix tests * Remove active issue attributes * Rename certificate file * Revert unnecessary changes * TMP: re-throw caught exception to reveal more information in logs * Revert "TMP: re-throw caught exception to reveal more information in logs" This reverts commit 039d051d6ac60c1c3f1baf37b0c06872f87cac84. * TMP: add and update res folders until they are merged into runtime-assets * Fix System.Net.Requests tests * Re-enable System.Net.Http functional tests * Try fixing failing test * Skip failing test * Add missing using * Remove temporary test data * Relax exception type assertion for Android * Code cleanup * Fix test failures in System.Net.WebSockets.Client.Tests * Remove active issue attribute * Remove most explicit usages of the server certificate custom validation callback in tests * Fix several tests * Remove weird condition * Code clean-up * Remove unrelated active issue attributes * Turn ActiveIssue attributes into permanent SkipOnPlatform * Update explanation for SkipOnPlatform * Revert partial fix and keep active issue * Keep active issue for android x64 and x86 * Remove invalid attribute * Fix test on Browser * Allow all certificates by default * Fix build * Fix http client handler factory on Browser * Skip failing test * Fix net48 build * Revert unintentional change in WinHttpHandler tests * Avoid using unsupported property on Browser * Remove unnecessary default value * Avoid using unsupported property on Browser
2022-07-19Linker to NativeAOT sync (#71485)Vitek Karas
This brings changes from the linker repo to ilc roughly as of a week ago. This required some non-trivial changes to the code either already in ilc or the one coming from linker: * Port of CompilerGeneratedState * Modify it to use lock free hashtable (since it's a global cache and thus needs to be thread safe) * In ILC it requires to operate on generic definitions of everything - so add asserts and code to guarantee this * It's not a static class anymore, so pass the instance around as necessary * Requires IL access, so needs ILProvider on input * Cyclic dependency between Logger and CompilerGeneratedState, one needs the instance of the other to work. For now solved by setting it through a property on CompilerGeneratedState * Split of ReflectionMethodBodyScanner into AttributeDataFlow and GenericParameterDataFlow - mostly direct port from linker * The AttributeDataFlow works slightly differently in ilc so adopted the code there * Changes to DiagnosticContext * Can selectively disable Trim, AOT, Single-File diagnostics - used to correctly apply RUC, RDC and RAF suppressions * Improve handling of RUC and similar warnings in ReflectionMarker * Added ILOffset to MessageOrigin * Even though we already store file/column, the ILOffset is necessary since we use the MessageOrigin as a key in dictionary for recorded patterns and thus we need a way to make the origin unique for each callsite (and file/line/column might not be unique or if there's no PDB those will be null anyway). * Enable Equality/HashCode implementation on MessageOrigin, still no CompareTo since we don't need it for anything right now.
2022-07-18[PERF][MAUI] Add Maui runs for net7.0 (#71979)Parker Bibus
* Part 1 of adding Net7.0: Duplicated building work and added the names in the obvious places they needed to be. * Add net6 versions of android and iOS scenarios, removing Mono ones from them since we are not building mono for net6 * Finished duplicating net6 versions of stuff in perf.yml and perf-job.yml (Section that redownloads jobs for perf running) * Renamed runtimetype to mobile for net6 stuff. Adding file copying to the setup files so mono is not copied for net6. Updated the runkind for net6 runs. * Fix dependency names. * Undo renaming of the build artifacts. * Setup target and prop files for net6 and set them for the net6 pipeline. * Added back in dotnet version download to download the latest version, and added specific dotnet calls back into the build perf maui apps. * Remove mono startup testing from android net6 mobile testing. * Lowered the number of BlazorMaui iOS startup iterations from 7 to 5. * Set version to one in preview.6 to match the net7.0 versions used in rollback file. * Add setting the result in the blazor ios device startup runs. * Make the downloaded version more clear by adding Net6 to Net6 app download versions.
2022-07-15[wasm] Add interop code to the browser template (#72172)Radek Doulik
* [wasm] Add interop code to the browser template * Try to use AnalyzerReference instead of ProjectReference * Try to make the analyzer reference unconditional * fix * no namespace fix * InstallWorkloadFromArtifacts: Update the targeting pack from the local .. nugets. * Wasm.Build.Tests: remove the app.ref fixup from the targets * workload-testing.targets: Ensure that app.ref nuget is available Co-authored-by: pavelsavara <pavel.savara@gmail.com> Co-authored-by: Ankit Jain <radical@gmail.com>
2022-07-12[wasm] Add new `wasm-experimental` workload (#71974)Ankit Jain
* InstallWorkloadFromArtifact: Support multiple workloads * [wasm] Move the templates pack to a new workload - wasm-experimental
2022-07-08Changed the number of Maui iOS Blazor startups from 7 to 5. (#71781)Parker Bibus
2022-07-05Blazor Hybrid iOS & Mac Catalyst Performance Profiling (#68685)Tanay Parikh
* [MAUI][Blazor][PERF] Add APK file usage for Android Maui Blazor SOD * Update android_scenarios.proj * Call ReportFullyDrawn * Add --use-fully-drawn-time --fully-drawn-extra-delay * Add System.Console.WriteLine for non-android platforms * Add 6 second delay * Missing `;` * Add back Directory.Build.{props, targets} (cherry picked from commit 28d9ef3ab4ac53b947dd435e6494428238b4dea5) * Fixes based on CI 1729796 https://dev.azure.com/dnceng/internal/_build/results?buildId=1729796&view=logs&j=4d93e3ae-0b8e-5532-bed2-af5c8a7c58d3&t=b13dec14-3eb2-5f1a-4501-8a9fdadb0e3a (cherry picked from commit d470655576d3abe6a6fec478c221c4d9de698ba9) * [REVERT THIS] Temporarily skip other jobs (cherry picked from commit df51582df9e7bb9d1ca82759d664823c76823c29) * [MAUI][Blazor][PERF] Add IPA file usage for iOS/MacCatalyst Maui Blazor SOD (cherry picked from commit b1aaaf222e302c19ad6760eaa7cdb1f0e7ed364d) * Remove / restore nuget.config * Escape quotes * Fix typo * Replicate changes from https://github.com/dotnet/runtime/pull/67670 * use-fully-drawn-time * Use akoeplinger/performance * Fix misplaced quote character * Revert "Use akoeplinger/performance" This reverts commit 12358b6f024bd1727aee8bf5ad71576d69623734. The change was merged to dotnet/performance. * Add ` --startup-iterations 7` * Revert "[REVERT THIS] Temporarily skip other jobs" This reverts commit 54fa30d876e2be0fef82883033d8fb027de2a150. * Remove SOD Startup Iterations Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
2022-06-27Bump Helix workitem timeout for iOS Device perf scenarios (#71330)Alexander Köplinger
2022-06-21[Android] Make sure AdditionalTimeZoneChecks trait is added to ↵Steve Pfister
xunit-excludes (#70974) The trait is supposed to be included in System.Runtime tests by default, but wasn't because the _withoutCategories property was in tests.props. As a result, the property was resolved before the .csproj properties. This fix moves the property definition to tests.targets. Fixes #70482
2022-06-17[wasm] Add support for per-project customization of helix work items (#70461)Ankit Jain
* [wasm] Add support for per-project customization of helix work items Currently, for sending tests to helix: 1. the project binaries are zipped, as part of the project build 2. then separate helix targets files build that adds helix items for those zip files. - for wasm, we test with multiple 'scenarios' - like v8, browser, and nodejs. - so, 3 helix work items are submitted per zip file - If a test project needs to have any customizations, for example, for testing crypto with a managed implementation, and subtlecrypto, which would require: - passing different arguments to xharness, in case of managed, and subtlecrypto - and this should be done only for the browser case - Currently, this would need this would need to be done in `sendtohelix-wasm.targets` special casing for the test project, and scenario. - We add support for importing `$(ProjectName).helix.targets`, and calling a special target in that to add helix items, as needed. - This targets file can be set in the test project like: ```xml <HelixTargetsFile Condition="'$(TargetOS)' == 'Browser'">wasm.helix.targets</HelixTargetsFile> ``` - it will get deployed next to the zip file, and picked up automatically ```xml <Project> <PropertyGroup> <_CryptoProjectName>System.Security.Cryptography.Tests</_CryptoProjectName> <System_Security_Cryptography_Tests_TargetName Condition="'$(Scenario))' == 'WasmTestOnBrowser'">System_Security_Cryptography_Tests_Targ et</System_Security_Cryptography_Tests_TargetName> </PropertyGroup> <Target Name="System_Security_Cryptography_Tests_Target"> <ItemGroup> <HelixWorkItem Include="$(Scenario)-managed-$(_CryptoProjectName)"> <PayloadArchive>$(TestArchiveTestsDir)$(_CryptoProjectName).zip</PayloadArchive> <Command>$(HelixCommand)</Command> <Timeout>$(_workItemTimeout)</Timeout> </HelixWorkItem> <HelixWorkItem Include="$(Scenario)-subtlecrypto-System.Security.Cryptography.Tests"> <PayloadArchive>$(TestArchiveTestsDir)$(_CryptoProjectName).zip</PayloadArchive> <Command>$(HelixCommand)</Command> <Timeout>$(_workItemTimeout)</Timeout> <PreCommands Condition="'$(OS)' == 'Windows_NT'">set &quot;WasmXHarnessArgs=--web-server-use-cors&quot;</PreCommands> <PreCommands Condition="'$(OS)' != 'Windows_NT'">export &quot;WasmXHarnessArgs=--web-server-use-cors&quot;</PreCommands> </HelixWorkItem> </ItemGroup> </Target> ``` - The targets file *must* have these: - a property named like `System_Security_Cryptography_Tests_TargetName`, for a test project named `System.Security.Cryptography.Tests` - if this property is not set, then the default behavior of adding work items will run - The target should add any items it needs to to `@(HelixWorkItem)`. - Examples of adding these can be seen in `sendtohelix*` project files - Remember that all these properties, and targets get imported into the msbuild *global* namespace, so make sure to use unique names to avoid conflicts with other test projects. Future work: this commit only enables it for wasm/library tests, but it should be easy to extract it out, but needs some testing. * [wasm] Helix: test with, and without subtle crypto * disable non-wasm builds * address review feedback * Address review feedback * Fix typo * Revert "disable non-wasm builds" This reverts commit 7ef99e81f82200189dd3f61eeaf00d6ca4ced6d4. * Update src/libraries/System.Security.Cryptography/tests/wasm.helix.targets Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com> * Address review feedback * remove debug spew * Change the way helix extension targets are discovered. The new approach: To run a custom project specific target for adding/editing @(HelixWorkItem): - In the project add: `<HelixTargetsFile Condition="'$(TargetOS)' == 'Browser'">wasm.helix.targets</HelixTargetsFile>` - This file gets copied next to the test archive as $(MSBuildProjectName).helix.targets - In this `wasm.helix.targets` file, add to $(HelixExtensionTargets) to run your custom target ```xml <PropertyGroup Condition="'$(IsRunningLibraryTests)' == 'true' and '$(Scenario)' == 'WasmTestOnBrowser'"> <HelixExtensionTargets>$(HelixExtensionTargets);_AddHelixCrypoItems</HelixExtensionTargets> ``` - The extension target will be called after the default items are added to `@(HelixWorkItem)`. - Useful properties to condition on: $(Scenario), $(IsRunningLibraryTests) - And add to, change, or remove from @(HelixWorkItem) Example: ```xml <Target Name="_AddHelixCrypoItems"> <ItemGroup> <!-- remove the existing item --> <HelixWorkItem Remove="@(HelixWorkItem)" Condition="'%(OriginalFileName)' == '$(_CryptoProjectName)'" /> <!-- add two new ones - managed, and subtylecrypto --> <HelixWorkItem Include="$(WorkItemPrefix)managed-$(_CryptoProjectName)"> <PayloadArchive>$(TestArchiveTestsDir)$(_CryptoProjectName).zip</PayloadArchive> <Command>$(HelixCommand)</Command> <Timeout>$(_workItemTimeout)</Timeout> <OriginalFileName>$(_CryptoProjectName)</OriginalFileName> </HelixWorkItem> <HelixWorkItem Include="$(WorkItemPrefix)subtlecrypto-$(_CryptoProjectName)"> <PayloadArchive>$(TestArchiveTestsDir)$(_CryptoProjectName).zip</PayloadArchive> <Command>$(HelixCommand)</Command> <Timeout>$(_workItemTimeout)</Timeout> <OriginalFileName>$(_CryptoProjectName)</OriginalFileName> <PreCommands Condition="'$(OS)' == 'Windows_NT'">set &quot;WasmXHarnessArgs=%WasmXHarnessArgs% --web-server-use-cop&quot;</PreCommands> <PreCommands Condition="'$(OS)' != 'Windows_NT'">export &quot;WasmXHarnessArgs=$WasmXHarnessArgs --web-server-use-cop&quot;</PreCommands> </HelixWorkItem> <_CryptoHelixItem Include="@(HelixWorkItem)" Condition="$([System.String]::new('%(HelixWorkItem.Identity)').EndsWith('-$(_CryptoProjectName)'))" /> </ItemGroup> <Error Text="Something went wrong. Expected to have only two work items for $(_CryptoProjectName). But got @(_CryptoHelixItem)" Condition="@(_CryptoHelixItem->Count()) != 2" /> </Target> ``` * cleanup * Move WBT specific stuff into the target too. This will make it simpler to move it off into a targets file later * fix build * fix libtests * fix wbt * [wasm] Bump helix timeout to 90mins for debugger tests on windows Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
2022-06-12Investigate helix error return (#70238)Lakshan Fernando
2022-06-10Merge pull request #70401 from ↵Andy Gocke
dotnet/darc-main-fe02c49f-0b42-470f-be36-18cf3ef8aacb [main] Update dependencies from dotnet/linker
2022-06-09Manually skip IL2118Andy Gocke
2022-06-09[wasm] Disable all trim warnings for tests, when usingAnkit Jain
.. `EnableAggressiveTrimming=true`, since the tests are not expected to be trim-safe. Based on @vitek-karas' suggestion.
2022-06-08[wasm] Add legs to build wasm with internal threads only and full threading ↵Steve Pfister
enabled (#68787) This change adds two build-only lanes to `runtime` and two full build+test lanes to `runtime-wasm` that builds wasm with internal threads only (`WasmEnablePerfTracing`) and full threading (`WasmEnableThreads`). The `runtime-wasm` additions can only be manually triggered at this time. Co-authored-by: Aleksey Kliger (λgeek) <alklig@microsoft.com> Co-authored-by: Ankit Jain <radical@gmail.com>
2022-06-02[wasm] Add support for symbolicating traces via XHarness (#66226)Ankit Jain
* [wasm] Add `WasmSymbolicator` project - this can be used to symbolicate traces using patterns from `src/mono/wasm/data/wasm-symbol-patterns.txt`. - Includes a wrapper that can be passed to xharness for symbolicating traces in the output. - This can be used as a command line tool also: `dotnet run /path/to/dotnet.js.symbols /path/to/traces` If `-` is passed instead of the last argument, then it reads the messages from stdin. * [wasm] Enable xharness+symbolicator for library tests * [wasm ] startup.ts: improve printing errors * [wasm] test-main.js: print 'WASM EXIT' message even for non-browser cases * [wasm] Enable symbols file generation for samples in Release config * [wasm] Fix file check * Fix build * fix dotnet-linker-tests build * Update condition for using wasmsymbolicator with xharness * Update build-commons.sh Revert unnecessary change * Update gen-buildsys.sh Revert unnecessary change * Update build.sh Revert unnecessary change
2022-06-01Add NativeAOT info to dump debugging template (#70070)Michal Strehovský
2022-05-25[wasm] First attempt at a wasm app host (#68696)Ankit Jain
First attempt at implementing a wasm app host Regular dotnet apps can be run with `dotnet run`. But this is not the case for wasm apps. We use `xharness` to run the test apps that we generate for library tests. Templates for browser, and console wasm projects were added recently, but they have to be run manually by either invoking a v8 script, or running a `http-server` in the bundle directory. Though to use a debugger with this requires starting the debug proxy separately, and connecting few bits. # WasmAppHost This PR adds a new `WasmAppHost`, which can be used through `dotnet run`: - it can run "wasm app" from it's `AppBundle` directory, using various hosts like `v8`, `node`, or a browser. An example use: ``` $ dotnet new wasmconsole $ dotnet run WasmAppHost --runtime-config /tmp/c0/bin/Debug/net7.0/browser-wasm/AppBundle//c0.runtimeconfig.json [02:26:40] info: host[0] Running: node main.cjs [02:26:40] dbug: host[0] Using working directory: /tmp/c0/bin/Debug/net7.0/browser-wasm/AppBundle Incoming arguments: Application arguments: Debugger.Debug: DEBUGGING ENABLED mono_wasm_runtime_ready fe00e07a-5519-4dfe-b35a-f867dbaf2e28 Could not find symbols file dotnet.js.symbols. Ignoring. Initializing..... Hello, Console! ``` The console template project is run with `node` by default. - it supports a `--debug` parameter, which (for the browser case) would startup a webserver, and the debug proxy for Chrome, and firefox. ``` $ dotnet new wasmbrowser $ dotnet run --debug WasmAppHost --runtime-config /workspaces/test/br0/bin/Debug/net7.0/browser-wasm/AppBundle//br0.runtimeconfig.json --debug --forward-console Debug proxy for chrome now listening on http://127.0.0.1:9300/. And expecting chrome at http://localhost:9222/ Hosting environment: Production Content root path: /workspaces/test/br0/bin/Debug/net7.0/browser-wasm/AppBundle Now listening on: http://127.0.0.1:9300 Debug proxy for firefox now listening on tcp://127.0.0.1:6300. And expecting firefox at port 6000 . App url: http://127.0.0.1:9000/index.html App url: https://127.0.0.1:38331/index.html ``` - This enables using `dotnet run` with wasm samples, and library tests too. ## How do I try this out? You'll need a dotnet with the updated packs. For now, you can use: ``` $ ./dotnet.sh build -p:TargetOS=Browser -p:TargetArchitecture=wasm -p:Configuration=Release src/tests/BuildWasmApps/Wasm.Build.Tests/Wasm.Build.Tests.csproj /t:InstallWorkloadUsingArtifacts ``` .. which would install a sdk in `artifacts/bin/dotnet-workload` with all the packs installed. - Use that dotnet to create console, or browser wasm apps from templates, for example `dotnet new wasmconsole`, or `dotnet new wasmbrowser`. ### Debugging library tests ``` runtime$ ./artifacts/bin/dotnet-workload/dotnet run -f net7.0 -r browser-wasm -c $YourRuntimeConfig --project src/libraries/System.Buffers/tests/System.Buffers.Tests.csproj -p:DebuggerSupport=true --debug --host browser ``` - If the runtime was built in `Release` config, then you need to add `-p:DebuggerSupport=true`, so the pdbs would get deployed - And use `--debug` to start the debugger - Opening the url will show a `Run tests` button, which you can click after connecting with the IDE, to start running the tests ## Notes, and TODO - `WasmAppHost`, along with the debug proxy are bundled in the `WebAssembly.Sdk` pack right now. - This might be changed in the future to use the dotnet app host pack pattern, and with additional support adding in the Sdk. - This would also allow using `launchSettings.json`, similar to blazor - `WasmAppHost` depends on host config in `runtimeconfig.json`, which can be controlled by a `runtimeconfig.template.json` in the project directory. - Needs more tests, cleanup, `--help` for command line arguments - `app-support.*js` in templates, and `test-main.js` need more work to share the code Fixes https://github.com/dotnet/runtime/issues/67236
2022-05-24[Perf][Mono] Add new Mono Mobile Scenarios to Performance Runs (#69526)Parker Bibus
* Set the application id to use a net.dot* id for the mono helloworld app so it can be signed, minor clean to performance-setup.sh, and added a test startup work item for the mono ios helloworld app. * Fix file copy pathing in perf setup. * First go at adding zipped folders for ipa size guesstimate for mono apps. * Add the actual test task, and fix 1 test task for piping the file through to the test. * Use .zip instead of .tar.gz SOD testing has been verified as working and the device startup tests had been working before. Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
2022-05-21[wasm] CI build improvements (#69519)Ankit Jain
- Run all the debugger tests in one helix job, because most of them take a couple of minutes to run. And this would avoid the overhead of individual helix jobs - Add a no-workloads variant for `Wasm.Build.Tests`, instead of `EMSDK` - This replaces the job that used `WasmApp.LocalBuild*` stuff to build with a `EMSDK` checkout. That case already gets tested with library tests. - The `EMSDK` case had been disabled recently due to an Arcade issue - Since we have very few tests to run for the noworkloads case, they are all run in a single helix work item. Fixes https://github.com/dotnet/runtime/issues/58159 Fixes https://github.com/dotnet/runtime/issues/67887 (by completely removing the `EMSDK` run)
2022-05-19Linux-bionic (Android libc w/o Android interop) initial implementation (#66147)Jo Shields
Implement support for "Linux Bionic", a RID which builds a Linux runtime against an Android libc but without Android OS functions like JNI, Dalvik, Instrumentation, etc. This configuration has been requested by a team working on an IoT scenario. * The new RID is linux-bionic-arm64/linux-bionic-x64. * The build reuses the existing Android build dockerfiles and Helix queues * Since we don't have JNI, we don't have Android Crypto - instead, use an Android build of OpenSSL. As an errata, it is incumbent upon the end user to supply this in their OS environment (we download one ad-hoc for testing purposes, which was compiled by Google) * Some tests cannot be completed due to SELinux policies affecting the shell user executing tests via adb shell in the world-writable /data/local/tmp directory. We expect those tests would pass if they pass on Android, in a real-world IoT scenario with a custom OS (rather than recycling Google's OS images intended for phones) Closes: #66027
2022-05-14Avoid unnecessary or duplicate PackageReferences - 7.0 Preview4 SDK work ↵Viktor Hofer
(#69260) * [WIP - Validation] Update the SDK to Preview4 * Avoid duplicate PackageReference * Fix duplicated PackageReference * Remove duplicate PackageRefs * Update llvm-init.proj * Update global.json * Update xunit.props
2022-05-13[wasm] Misc debugger improvements (#68988)Ankit Jain
* [wasm] Move the browser provisioning stuff to a new targets file .. from `DebuggerTestSuite.csproj`. This will allow other projects to use this too. * [wasm][debugger] Handle failure to connect to the browser * [wasm] Improve the browser path lookup so it can be used outside the debugger tests project too. For example, with Wasm.Build.Tests+playwright . * [wasm][debugger] Throw exceptions from tasks correctly .. using `ExceptionDispatchInfo.Capture` so we get the original stack trace. * [wasm][debugger] General improvements in debug proxy - like logging - updated API to make it easier to use by other projects, like the upcoming wasm-app-host . * [wasm][debugger] Add support for setting an automatic breakpoint .. on the first line of the entrypoint method (`Main`). This will be useful for debugging with the upcoming wasm-app-host, along with the use of `wait-for-debugger`. Implemented by @thaystg . * [wasm][debugger] Add support for wait_for_debugger If requested, then it will cause invocation of `main` to be delayed till a debugger is attached. Implemented by @thaystg * [wasm] Cleanup in Wasm.Build.Tests .. in the lead up to wasm-app-host tests. * [wasm] Update the default paths used to trigger builds on CI .. to include templates, and provisioning props. * disable non-wasm builds * [wasm][debugger] Fix path to artifacts dir * [wasm] Emit message with bundle path * [wasm][templates] Make the project use the target dir's name as the .. project name, instead of always creating `browser.dll`, and `console.dll`. * [wasm][debugger] Use a single static instance of HttpClient .. as recommended by the documentation. * Revert "disable non-wasm builds" This reverts commit 7b8b60d58c886e7e66cf2fea910f1feb4d6374f1. * Address review feedback, and improve the autogenerated bpid