From 790b9171f86e40a2920b26cbb38ab618bb6b815c Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Sat, 16 Aug 2025 02:06:53 +0000 Subject: [PATCH 01/10] Update dependencies from https://github.com/dotnet/dotnet build 279432 Updated Dependencies: Microsoft.CodeAnalysis, Microsoft.CodeAnalysis.Analyzers, Microsoft.CodeAnalysis.CSharp, Microsoft.Net.Compilers.Toolset (Version 5.0.0-2.25414.103 -> 5.0.0-2.25414.111) Microsoft.CodeAnalysis.NetAnalyzers (Version 10.0.0-preview.25414.103 -> 10.0.0-preview.25414.111) Microsoft.DotNet.ApiCompat.Task, Microsoft.NET.Workload.Emscripten.Current.Manifest-10.0.100.Transport (Version 10.0.100-rc.1.25414.103 -> 10.0.100-rc.1.25414.111) Microsoft.DotNet.Arcade.Sdk, Microsoft.DotNet.Build.Tasks.Archives, Microsoft.DotNet.Build.Tasks.Feed, Microsoft.DotNet.Build.Tasks.Installers, Microsoft.DotNet.Build.Tasks.Packaging, Microsoft.DotNet.Build.Tasks.TargetFramework, Microsoft.DotNet.Build.Tasks.Templating, Microsoft.DotNet.Build.Tasks.Workloads, Microsoft.DotNet.CodeAnalysis, Microsoft.DotNet.GenAPI, Microsoft.DotNet.GenFacades, Microsoft.DotNet.Helix.Sdk, Microsoft.DotNet.PackageTesting, Microsoft.DotNet.RemoteExecutor, Microsoft.DotNet.SharedFramework.Sdk, Microsoft.DotNet.XliffTasks, Microsoft.DotNet.XUnitExtensions (Version 10.0.0-beta.25414.103 -> 10.0.0-beta.25414.111) Microsoft.DotNet.Cecil (Version 0.11.5-alpha.25414.103 -> 0.11.5-alpha.25414.111) Microsoft.DotNet.XUnitAssert, Microsoft.DotNet.XUnitConsoleRunner (Version 2.9.3-beta.25414.103 -> 2.9.3-beta.25414.111) Microsoft.NET.Sdk.IL, Microsoft.NETCore.App.Ref, Microsoft.NETCore.ILAsm, runtime.native.System.IO.Ports, System.Reflection.Metadata, System.Reflection.MetadataLoadContext, System.Text.Json (Version 10.0.0-rc.1.25414.103 -> 10.0.0-rc.1.25414.111) NuGet.Frameworks, NuGet.Packaging, NuGet.ProjectModel, NuGet.Versioning (Version 7.0.0-preview.1.42003 -> 7.0.0-preview.1.41511) System.CommandLine (Version 2.0.0-rc.1.25414.103 -> 2.0.0-rc.1.25414.111) --- eng/Version.Details.props | 78 +++++++++---------- eng/Version.Details.xml | 158 +++++++++++++++++++------------------- global.json | 8 +- 3 files changed, 122 insertions(+), 122 deletions(-) diff --git a/eng/Version.Details.props b/eng/Version.Details.props index f835914c56a741..ca306708f3d764 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -41,45 +41,45 @@ This file should be imported by eng/Versions.props 19.1.0-alpha.1.25167.1 19.1.0-alpha.1.25167.1 - 5.0.0-2.25414.103 - 5.0.0-2.25414.103 - 5.0.0-2.25414.103 - 10.0.0-preview.25414.103 - 10.0.100-rc.1.25414.103 - 10.0.0-beta.25414.103 - 10.0.0-beta.25414.103 - 10.0.0-beta.25414.103 - 10.0.0-beta.25414.103 - 10.0.0-beta.25414.103 - 10.0.0-beta.25414.103 - 10.0.0-beta.25414.103 - 10.0.0-beta.25414.103 - 0.11.5-alpha.25414.103 - 10.0.0-beta.25414.103 - 10.0.0-beta.25414.103 - 10.0.0-beta.25414.103 - 10.0.0-beta.25414.103 - 10.0.0-beta.25414.103 - 10.0.0-beta.25414.103 - 10.0.0-beta.25414.103 - 10.0.0-beta.25414.103 - 2.9.3-beta.25414.103 - 2.9.3-beta.25414.103 - 10.0.0-beta.25414.103 - 5.0.0-2.25414.103 - 10.0.0-rc.1.25414.103 - 10.0.100-rc.1.25414.103 - 10.0.0-rc.1.25414.103 - 10.0.0-rc.1.25414.103 - 7.0.0-preview.1.42003 - 7.0.0-preview.1.42003 - 7.0.0-preview.1.42003 - 7.0.0-preview.1.42003 - 10.0.0-rc.1.25414.103 - 2.0.0-rc.1.25414.103 - 10.0.0-rc.1.25414.103 - 10.0.0-rc.1.25414.103 - 10.0.0-rc.1.25414.103 + 5.0.0-2.25414.111 + 5.0.0-2.25414.111 + 5.0.0-2.25414.111 + 10.0.0-preview.25414.111 + 10.0.100-rc.1.25414.111 + 10.0.0-beta.25414.111 + 10.0.0-beta.25414.111 + 10.0.0-beta.25414.111 + 10.0.0-beta.25414.111 + 10.0.0-beta.25414.111 + 10.0.0-beta.25414.111 + 10.0.0-beta.25414.111 + 10.0.0-beta.25414.111 + 0.11.5-alpha.25414.111 + 10.0.0-beta.25414.111 + 10.0.0-beta.25414.111 + 10.0.0-beta.25414.111 + 10.0.0-beta.25414.111 + 10.0.0-beta.25414.111 + 10.0.0-beta.25414.111 + 10.0.0-beta.25414.111 + 10.0.0-beta.25414.111 + 2.9.3-beta.25414.111 + 2.9.3-beta.25414.111 + 10.0.0-beta.25414.111 + 5.0.0-2.25414.111 + 10.0.0-rc.1.25414.111 + 10.0.100-rc.1.25414.111 + 10.0.0-rc.1.25414.111 + 10.0.0-rc.1.25414.111 + 7.0.0-preview.1.41511 + 7.0.0-preview.1.41511 + 7.0.0-preview.1.41511 + 7.0.0-preview.1.41511 + 10.0.0-rc.1.25414.111 + 2.0.0-rc.1.25414.111 + 10.0.0-rc.1.25414.111 + 10.0.0-rc.1.25414.111 + 10.0.0-rc.1.25414.111 10.0.0-beta.25310.1 10.0.0-beta.25310.1 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3ac18f0b9cd027..665cd7db7a6322 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,5 +1,5 @@ - + https://github.com/dotnet/icu @@ -41,91 +41,91 @@ https://github.com/dotnet/llvm-project da5dd054a531e6fea65643b7e754285b73eab433 - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab https://github.com/dotnet/runtime-assets @@ -263,33 +263,33 @@ https://github.com/dotnet/llvm-project da5dd054a531e6fea65643b7e754285b73eab433 - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab https://github.com/dotnet/xharness @@ -303,9 +303,9 @@ https://github.com/dotnet/xharness 4c17e23fcb7575baa9de575e5a96258096cbaea1 - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -331,29 +331,29 @@ https://github.com/dotnet/runtime-assets 385d085eb055cabeaed3dde958a900e7b31cf6ce - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -365,21 +365,21 @@ - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab - + https://github.com/dotnet/dotnet - 5088919af0e4a144ce5b294542f472bf668c9cc8 + f8a57b66e6466922534e8046b37a6503d9d39dab https://github.com/dotnet/node diff --git a/global.json b/global.json index 5da2c8d6d5d1cd..965716a2fdd5d5 100644 --- a/global.json +++ b/global.json @@ -8,11 +8,11 @@ "dotnet": "10.0.100-rc.1.25411.109" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25414.103", - "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25414.103", - "Microsoft.DotNet.SharedFramework.Sdk": "10.0.0-beta.25414.103", + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25414.111", + "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25414.111", + "Microsoft.DotNet.SharedFramework.Sdk": "10.0.0-beta.25414.111", "Microsoft.Build.NoTargets": "3.7.0", "Microsoft.Build.Traversal": "3.4.0", - "Microsoft.NET.Sdk.IL": "10.0.0-rc.1.25414.103" + "Microsoft.NET.Sdk.IL": "10.0.0-rc.1.25414.111" } } From dda0faa8f8c0284ce4025a477a76bfe3345cc217 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 22 Aug 2025 02:04:07 +0000 Subject: [PATCH 02/10] Backflow from https://github.com/dotnet/dotnet / 619d563 build 280198 [[ commit created by automation ]] --- eng/Versions.props | 2 +- .../AnalyzedExternalTypeMapNode.cs | 4 +- .../AnalyzedProxyTypeMapNode.cs | 4 +- .../DependencyAnalysis/ExternalTypeMapNode.cs | 6 +- .../DependencyAnalysis/ProxyTypeMapNode.cs | 4 +- src/coreclr/vm/hostinformation.cpp | 3 +- .../ref/System.Numerics.Tensors.netcore.cs | 6 +- .../src/CompatibilitySuppressions.xml | 42 ---- .../Tensors/netcore/ReadOnlyTensorSpan_1.cs | 17 +- .../System/Numerics/Tensors/netcore/Tensor.cs | 181 +++++++----------- .../Numerics/Tensors/netcore/TensorSpan_1.cs | 7 +- .../Numerics/Tensors/netcore/Tensor_1.cs | 18 +- .../tests/ReadOnlyTensorSpanTests.cs | 133 ------------- .../tests/TensorSpanTests.cs | 133 ------------- .../tests/TensorTests.cs | 133 ------------- .../tests/X509Certificates/ChainTests.cs | 4 +- .../TrimmingBehaviors/DeadCodeElimination.cs | 67 +------ 17 files changed, 103 insertions(+), 661 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index d61001668130e5..6dc29cbc29b204 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -13,7 +13,7 @@ 7.0.20 6.0.36 rc - 1 + 2 false release diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/AnalyzedExternalTypeMapNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/AnalyzedExternalTypeMapNode.cs index a0c397a6180afe..b62b3da716dc28 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/AnalyzedExternalTypeMapNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/AnalyzedExternalTypeMapNode.cs @@ -21,7 +21,7 @@ public Vertex CreateTypeMap(NodeFactory factory, NativeWriter writer, Section se foreach ((string key, TypeDesc type) in entries) { Vertex keyVertex = writer.GetStringConstant(key); - Vertex valueVertex = writer.GetUnsignedConstant(externalReferences.GetIndex(factory.MetadataTypeSymbol(type))); + Vertex valueVertex = writer.GetUnsignedConstant(externalReferences.GetIndex(factory.MaximallyConstructableType(type))); Vertex entry = writer.GetTuple(keyVertex, valueVertex); typeMapHashTable.Append((uint)TypeHashingAlgorithms.ComputeNameHashCode(key), section.Place(entry)); } @@ -37,7 +37,7 @@ public override IEnumerable GetStaticDependencies(NodeFacto { foreach (TypeDesc targetType in entries.Values) { - yield return new DependencyListEntry(context.MetadataTypeSymbol(targetType), "Analyzed external type map entry target type"); + yield return new DependencyListEntry(context.MaximallyConstructableType(targetType), "Analyzed external type map entry target type"); } } public override IEnumerable SearchDynamicDependencies(List> markedNodes, int firstNode, NodeFactory context) => []; diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/AnalyzedProxyTypeMapNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/AnalyzedProxyTypeMapNode.cs index 1689bc15716e59..7d19848d23ebb0 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/AnalyzedProxyTypeMapNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/AnalyzedProxyTypeMapNode.cs @@ -21,7 +21,7 @@ public Vertex CreateTypeMap(NodeFactory factory, NativeWriter writer, Section se foreach ((TypeDesc key, TypeDesc type) in entries) { Vertex keyVertex = writer.GetUnsignedConstant(externalReferences.GetIndex(factory.MaximallyConstructableType(key))); - Vertex valueVertex = writer.GetUnsignedConstant(externalReferences.GetIndex(factory.MetadataTypeSymbol(type))); + Vertex valueVertex = writer.GetUnsignedConstant(externalReferences.GetIndex(factory.MaximallyConstructableType(type))); Vertex entry = writer.GetTuple(keyVertex, valueVertex); typeMapHashTable.Append((uint)key.GetHashCode(), section.Place(entry)); } @@ -38,7 +38,7 @@ public override IEnumerable GetStaticDependencies(NodeFacto foreach (var (sourceType, proxyType) in entries) { yield return new DependencyListEntry(context.MaximallyConstructableType(sourceType), "Analyzed proxy type map entry source type"); - yield return new DependencyListEntry(context.MetadataTypeSymbol(proxyType), "Analyzed proxy type map entry proxy type"); + yield return new DependencyListEntry(context.MaximallyConstructableType(proxyType), "Analyzed proxy type map entry proxy type"); } } public override IEnumerable SearchDynamicDependencies(List> markedNodes, int firstNode, NodeFactory context) => []; diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ExternalTypeMapNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ExternalTypeMapNode.cs index 2d23d46991f93f..a3f8671cc2ff3e 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ExternalTypeMapNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ExternalTypeMapNode.cs @@ -39,7 +39,7 @@ public override IEnumerable GetConditionalStaticDep if (trimmingTargetType is not null) { yield return new CombinedDependencyListEntry( - context.MetadataTypeSymbol(targetType), + context.MaximallyConstructableType(targetType), context.NecessaryTypeSymbol(trimmingTargetType), "Type in external type map is cast target"); } @@ -54,7 +54,7 @@ public override IEnumerable GetStaticDependencies(NodeFacto if (trimmingTargetType is null) { yield return new DependencyListEntry( - context.MetadataTypeSymbol(targetType), + context.MaximallyConstructableType(targetType), "External type map entry target type"); } } @@ -80,7 +80,7 @@ public int CompareToImpl(ISortableNode other, CompilerComparer comparer) if (trimmingTargetType is null || factory.NecessaryTypeSymbol(trimmingTargetType).Marked) { - IEETypeNode targetNode = factory.MetadataTypeSymbol(targetType); + IEETypeNode targetNode = factory.MaximallyConstructableType(targetType); Debug.Assert(targetNode.Marked); yield return (entry.Key, targetNode); } diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ProxyTypeMapNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ProxyTypeMapNode.cs index 39ed1b885cff61..a131677a776be6 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ProxyTypeMapNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ProxyTypeMapNode.cs @@ -43,7 +43,7 @@ public override IEnumerable GetConditionalStaticDep foreach (var (key, value) in _mapEntries) { yield return new CombinedDependencyListEntry( - context.MetadataTypeSymbol(value), + context.MaximallyConstructableType(value), context.MaximallyConstructableType(key), "Proxy type map entry"); } @@ -60,7 +60,7 @@ public override IEnumerable GetConditionalStaticDep IEETypeNode keyNode = factory.MaximallyConstructableType(key); if (keyNode.Marked) { - IEETypeNode valueNode = factory.MetadataTypeSymbol(value); + IEETypeNode valueNode = factory.MaximallyConstructableType(value); Debug.Assert(valueNode.Marked); yield return (keyNode, valueNode); } diff --git a/src/coreclr/vm/hostinformation.cpp b/src/coreclr/vm/hostinformation.cpp index acaa23bb141848..4d85f74671d7dd 100644 --- a/src/coreclr/vm/hostinformation.cpp +++ b/src/coreclr/vm/hostinformation.cpp @@ -45,8 +45,7 @@ bool HostInformation::GetProperty(_In_z_ const char* name, SString& value) bool HostInformation::HasExternalProbe() { - size_t requiredSize = offsetof(host_runtime_contract, external_assembly_probe) + sizeof(s_hostContract.external_assembly_probe); - return s_hostContract.size >= requiredSize && s_hostContract.external_assembly_probe != nullptr; + return s_hostContract.external_assembly_probe != nullptr; } bool HostInformation::ExternalAssemblyProbe(_In_ const SString& path, _Out_ void** data, _Out_ int64_t* size) diff --git a/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.netcore.cs b/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.netcore.cs index 4847b33842bb4b..ebe7a37a7de8ed 100644 --- a/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.netcore.cs +++ b/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.netcore.cs @@ -206,7 +206,6 @@ public void FlattenTo(scoped System.Span destination) { } public System.Numerics.Tensors.ReadOnlyTensorSpan Slice(params scoped System.ReadOnlySpan ranges) { throw null; } public System.Numerics.Tensors.ReadOnlyTensorSpan Slice(params scoped System.ReadOnlySpan startIndexes) { throw null; } public override string ToString() { throw null; } - public string ToString(params scoped System.ReadOnlySpan maximumLengths) { throw null; } public bool TryCopyTo(scoped in System.Numerics.Tensors.TensorSpan destination) { throw null; } public bool TryFlattenTo(scoped System.Span destination) { throw null; } public bool TryGetSpan(scoped System.ReadOnlySpan startIndexes, int length, out System.ReadOnlySpan span) { throw null; } @@ -571,6 +570,9 @@ public static void ResizeTo(scoped in System.Numerics.Tensors.Tensor tenso public static ref readonly System.Numerics.Tensors.TensorSpan TanPi(scoped in System.Numerics.Tensors.ReadOnlyTensorSpan x, in System.Numerics.Tensors.TensorSpan destination) where T : System.Numerics.ITrigonometricFunctions { throw null; } public static System.Numerics.Tensors.Tensor Tan(in System.Numerics.Tensors.ReadOnlyTensorSpan x) where T : System.Numerics.ITrigonometricFunctions { throw null; } public static ref readonly System.Numerics.Tensors.TensorSpan Tan(scoped in System.Numerics.Tensors.ReadOnlyTensorSpan x, in System.Numerics.Tensors.TensorSpan destination) where T : System.Numerics.ITrigonometricFunctions { throw null; } + public static string ToString(this in System.Numerics.Tensors.ReadOnlyTensorSpan tensor, System.ReadOnlySpan maximumLengths) { throw null; } + public static string ToString(this in System.Numerics.Tensors.TensorSpan tensor, System.ReadOnlySpan maximumLengths) { throw null; } + public static string ToString(this System.Numerics.Tensors.Tensor tensor, System.ReadOnlySpan maximumLengths) { throw null; } public static System.Numerics.Tensors.Tensor TrailingZeroCount(in System.Numerics.Tensors.ReadOnlyTensorSpan x) where T : System.Numerics.IBinaryInteger { throw null; } public static ref readonly System.Numerics.Tensors.TensorSpan TrailingZeroCount(scoped in System.Numerics.Tensors.ReadOnlyTensorSpan x, in System.Numerics.Tensors.TensorSpan destination) where T : System.Numerics.IBinaryInteger { throw null; } public static System.Numerics.Tensors.Tensor Transpose(System.Numerics.Tensors.Tensor tensor) { throw null; } @@ -1216,7 +1218,6 @@ public void FlattenTo(scoped System.Span destination) { } public System.Numerics.Tensors.TensorSpan Slice(params scoped System.ReadOnlySpan ranges) { throw null; } public System.Numerics.Tensors.TensorSpan Slice(params scoped System.ReadOnlySpan startIndexes) { throw null; } public override string ToString() { throw null; } - public string ToString(params scoped System.ReadOnlySpan maximumLengths) { throw null; } public bool TryCopyTo(scoped in System.Numerics.Tensors.TensorSpan destination) { throw null; } public bool TryFlattenTo(scoped System.Span destination) { throw null; } public bool TryGetSpan(scoped System.ReadOnlySpan startIndexes, int length, out System.Span span) { throw null; } @@ -1296,7 +1297,6 @@ void System.Numerics.Tensors.ITensor.Fill(object value) { } static System.Numerics.Tensors.Tensor System.Numerics.Tensors.ITensor, T>.CreateFromShapeUninitialized(scoped System.ReadOnlySpan lengths, bool pinned) { throw null; } static System.Numerics.Tensors.Tensor System.Numerics.Tensors.ITensor, T>.CreateFromShapeUninitialized(scoped System.ReadOnlySpan lengths, scoped System.ReadOnlySpan strides, bool pinned) { throw null; } public System.Numerics.Tensors.Tensor ToDenseTensor() { throw null; } - public override string ToString() { throw null; } public string ToString(params scoped System.ReadOnlySpan maximumLengths) { throw null; } public bool TryCopyTo(scoped in System.Numerics.Tensors.TensorSpan destination) { throw null; } public bool TryFlattenTo(scoped System.Span destination) { throw null; } diff --git a/src/libraries/System.Numerics.Tensors/src/CompatibilitySuppressions.xml b/src/libraries/System.Numerics.Tensors/src/CompatibilitySuppressions.xml index cbc50b64ff0de3..b9631acb2d7041 100644 --- a/src/libraries/System.Numerics.Tensors/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Numerics.Tensors/src/CompatibilitySuppressions.xml @@ -176,27 +176,6 @@ lib/net8.0/System.Numerics.Tensors.dll true - - CP0002 - M:System.Numerics.Tensors.Tensor.ToString``1(System.Numerics.Tensors.ReadOnlyTensorSpan{``0}@,System.ReadOnlySpan{System.IntPtr}) - lib/net8.0/System.Numerics.Tensors.dll - lib/net8.0/System.Numerics.Tensors.dll - true - - - CP0002 - M:System.Numerics.Tensors.Tensor.ToString``1(System.Numerics.Tensors.Tensor{``0},System.ReadOnlySpan{System.IntPtr}) - lib/net8.0/System.Numerics.Tensors.dll - lib/net8.0/System.Numerics.Tensors.dll - true - - - CP0002 - M:System.Numerics.Tensors.Tensor.ToString``1(System.Numerics.Tensors.TensorSpan{``0}@,System.ReadOnlySpan{System.IntPtr}) - lib/net8.0/System.Numerics.Tensors.dll - lib/net8.0/System.Numerics.Tensors.dll - true - CP0002 M:System.Numerics.Tensors.Tensor`1.get_Item(System.Numerics.Tensors.Tensor{System.Boolean}) @@ -400,27 +379,6 @@ lib/net9.0/System.Numerics.Tensors.dll true - - CP0002 - M:System.Numerics.Tensors.Tensor.ToString``1(System.Numerics.Tensors.ReadOnlyTensorSpan{``0}@,System.ReadOnlySpan{System.IntPtr}) - lib/net9.0/System.Numerics.Tensors.dll - lib/net9.0/System.Numerics.Tensors.dll - true - - - CP0002 - M:System.Numerics.Tensors.Tensor.ToString``1(System.Numerics.Tensors.Tensor{``0},System.ReadOnlySpan{System.IntPtr}) - lib/net9.0/System.Numerics.Tensors.dll - lib/net9.0/System.Numerics.Tensors.dll - true - - - CP0002 - M:System.Numerics.Tensors.Tensor.ToString``1(System.Numerics.Tensors.TensorSpan{``0}@,System.ReadOnlySpan{System.IntPtr}) - lib/net9.0/System.Numerics.Tensors.dll - lib/net9.0/System.Numerics.Tensors.dll - true - CP0002 M:System.Numerics.Tensors.Tensor`1.get_Item(System.Numerics.Tensors.Tensor{System.Boolean}) diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ReadOnlyTensorSpan_1.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ReadOnlyTensorSpan_1.cs index dbc60893e25672..931428fd3090d6 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ReadOnlyTensorSpan_1.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ReadOnlyTensorSpan_1.cs @@ -432,20 +432,9 @@ ref Unsafe.Add(ref _reference, linearOffset), ); } - /// Returns the string representation of the tensor. - /// The string representation of the tensor. - /// This API only lists the shape of the tensor, it does not include the contents. - public override string ToString() => ToString([]); - - /// Creates a representation of the tensor. - /// The maximum number of elements to print for each dimension of the tensor. - /// A representation of the tensor. - /// is not empty and does not contain elements. - /// - /// No contents will be printed if is empty. - /// If a given dimension contains more elements then the corresponding limit specified by , remaining elements will be represented by ... - /// - public string ToString(params scoped ReadOnlySpan maximumLengths) => Tensor.ToString(this, maximumLengths, "System.Numerics.Tensors.ReadOnlyTensorSpan"); + /// Returns the string representation of the tensor span. + /// The string representation of the tensor span. + public override string ToString() => $"System.Numerics.Tensors.ReadOnlyTensorSpan<{typeof(T).Name}>[{_shape}]"; /// public bool TryCopyTo(scoped in TensorSpan destination) diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor.cs index c6e4e116744fbd..8bc145f8e0e042 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor.cs @@ -2064,147 +2064,98 @@ public static ref readonly TensorSpan StackAlongDimension(scoped ReadOnlyS #endregion #region ToString - internal static string ToString(in ReadOnlyTensorSpan tensor, ReadOnlySpan maximumLengths, string typeName) + /// + /// Creates a representation of the ."/> + /// + /// The you want to represent as a string. + /// Maximum Length of each dimension + /// A representation of the + public static string ToString(this in TensorSpan tensor, ReadOnlySpan maximumLengths) + => tensor.AsReadOnlyTensorSpan().ToString(maximumLengths); + + /// + /// Creates a representation of the ."/> + /// + /// + /// The you want to represent as a string. + /// Maximum Length of each dimension + public static string ToString(this in ReadOnlyTensorSpan tensor, ReadOnlySpan maximumLengths) { - if (!maximumLengths.IsEmpty) + if (maximumLengths.Length != tensor.Rank) { - ArgumentOutOfRangeException.ThrowIfNotEqual(maximumLengths.Length, tensor.Rank); + ThrowHelper.ThrowArgument_DimensionsNotSame(nameof(tensor)); } - var sb = new StringBuilder(typeName); - - sb.Append('<'); - sb.Append(typeof(T).Name); - sb.Append('>'); - - sb.Append('['); - sb.AppendJoin(", ", tensor.Lengths); - sb.Append(']'); - - if (!maximumLengths.IsEmpty) - { - sb.AppendLine(" {"); - - if (tensor.Rank == 1) - { - nint length = nint.Min(tensor.Lengths[0], maximumLengths[0]); - ToString(tensor, length, sb, indentLevel: 1); - sb.AppendLine(); - } - else - { - ToString(tensor, maximumLengths, sb); - } - - sb.Append('}'); - } + StringBuilder sb = new(); + ToString(in tensor, maximumLengths, sb); return sb.ToString(); } - private static void ToString(in ReadOnlyTensorSpan tensor, ReadOnlySpan maximumLengths, StringBuilder sb, int indentLevel = 0) + internal static void ToString(in ReadOnlyTensorSpan tensor, ReadOnlySpan maximumLengths, StringBuilder sb, int indentLevel = 0) { - nint length = nint.Min(tensor.Lengths[0], maximumLengths[0]); + Debug.Assert(maximumLengths.Length != tensor.Rank); - if (indentLevel != 0) + sb.Append(' ', indentLevel * 2); + sb.Append('['); + + if (tensor.Rank != 0) { + nint length = nint.Max(tensor.Lengths[0], maximumLengths[0]); + if (tensor.Rank != 1) { - sb.Append(' ', indentLevel * 2); - sb.AppendLine("["); - } - else - { - ToString(tensor, length, sb, indentLevel); - return; - } - } + string separator = string.Empty; - if (length != 0) - { - TensorShape tmpShape = TensorShape.Create(tensor.Lengths[1..], tensor.Strides[1..], tensor.IsPinned); + for (nint i = 0; i < length; i++) + { + sb.AppendLine(separator); - ReadOnlyTensorSpan tmpTensor = new ReadOnlyTensorSpan(ref tensor._reference, tmpShape); - ToString(tmpTensor, maximumLengths[1..], sb, indentLevel + 1); + TensorShape tmpShape = TensorShape.Create(tensor.Lengths[1..], tensor.Strides[1..], tensor.IsPinned); + ReadOnlyTensorSpan tmpTensor = new ReadOnlyTensorSpan(ref Unsafe.Add(ref tensor._reference, i * tensor.Strides[0]), tmpShape); + ToString(tmpTensor, maximumLengths[1..], sb, indentLevel + 1); - for (nint i = 1; i < length; i++) - { - sb.AppendLine(","); - tmpTensor = new ReadOnlyTensorSpan(ref Unsafe.Add(ref tensor._reference, i * tensor.Strides[0]), tmpShape); - ToString(tmpTensor, maximumLengths[1..], sb, indentLevel + 1); - } + separator = ","; + } - if (length != tensor.Lengths[0]) - { - sb.AppendLine(","); - sb.Append(' ', (indentLevel + 1) * 2); - sb.Append(".."); + if (length != tensor.Lengths[0]) + { + sb.AppendLine(separator); + sb.Append(' ', indentLevel * 2); + sb.AppendLine("..."); + } } - sb.AppendLine(); - } - else - { - sb.Append(' ', (indentLevel + 1) * 2); - sb.AppendLine(".."); - } - sb.Append(' ', indentLevel * 2); - - if (indentLevel != 0) - { - sb.Append(']'); - } - } - - private static void ToString(in ReadOnlyTensorSpan tensor, nint length, StringBuilder sb, int indentLevel) - { - sb.Append(' ', indentLevel * 2); - sb.Append('['); + else + { + string separator = " "; - if (length != 0) - { - sb.Append(tensor._reference); + for (nint i = 0; i < length; i++) + { + sb.Append(separator); + sb.Append(Unsafe.Add(ref tensor._reference, i)); + separator = ", "; + } - for (nint i = 1; i < length; i++) - { - sb.Append(", "); - sb.Append(Unsafe.Add(ref tensor._reference, i)); - } + if (length != tensor.Lengths[0]) + { + sb.Append(separator); + sb.Append("..."); + } - if (length != tensor.Lengths[0]) - { - sb.Append(", .."); + sb.Append(separator); } } - else - { - sb.Append(".."); - } - sb.Append(']'); } - private static StringBuilder AppendJoin(this StringBuilder sb, string separator, ReadOnlySpan values) - { - if (values.IsEmpty) - { - return sb; - } - - if (values[0] is not null) - { - sb.Append(values[0]); - } - - for (int i = 1; i < values.Length; i++) - { - sb.Append(separator); + /// + /// Creates a representation of the ."/> + /// + /// The you want to represent as a string. + /// Maximum Length of each dimension + /// A representation of the + public static string ToString(this Tensor tensor, ReadOnlySpan maximumLengths) + => tensor.AsReadOnlyTensorSpan().ToString(maximumLengths); - if (values[i] is not null) - { - sb.Append(values[i]); - } - } - return sb; - } #endregion #region Transpose diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorSpan_1.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorSpan_1.cs index e13655b0ca15dc..fe2778077a0f2e 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorSpan_1.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorSpan_1.cs @@ -328,11 +328,8 @@ ref Unsafe.Add(ref _reference, linearOffset), ); } - /// - public override string ToString() => ToString([]); - - /// - public string ToString(params scoped ReadOnlySpan maximumLengths) => Tensor.ToString(AsReadOnlyTensorSpan(), maximumLengths, "System.Numerics.Tensors.TensorSpan"); + /// + public override string ToString() => $"System.Numerics.Tensors.TensorSpan<{typeof(T).Name}>[{_shape}]"; /// public bool TryCopyTo(scoped in TensorSpan destination) => AsReadOnlyTensorSpan().TryCopyTo(destination); diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor_1.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor_1.cs index b475cd2a2e66e4..17e42e4aec08c0 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor_1.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor_1.cs @@ -288,11 +288,21 @@ public Tensor ToDenseTensor() /// public bool TryGetSpan(scoped ReadOnlySpan startIndexes, int length, out ReadOnlySpan span) => AsReadOnlyTensorSpan().TryGetSpan(startIndexes, length, out span); - /// - public override string ToString() => ToString([]); + /// + /// Creates a representation of the ."/> + /// + /// Maximum Length of each dimension + /// A representation of the + public string ToString(params ReadOnlySpan maximumLengths) + { + var sb = new StringBuilder($"System.Numerics.Tensors.Tensor<{typeof(T).Name}>[{_shape}]"); + + sb.AppendLine("{"); + Tensor.ToString(AsReadOnlyTensorSpan(), maximumLengths, sb); + sb.AppendLine("}"); - /// - public string ToString(params scoped ReadOnlySpan maximumLengths) => Tensor.ToString(AsReadOnlyTensorSpan(), maximumLengths, "System.Numerics.Tensors.Tensor"); + return sb.ToString(); + } // // IEnumerable diff --git a/src/libraries/System.Numerics.Tensors/tests/ReadOnlyTensorSpanTests.cs b/src/libraries/System.Numerics.Tensors/tests/ReadOnlyTensorSpanTests.cs index bce2ad21e05d6c..939c76a9084a6c 100644 --- a/src/libraries/System.Numerics.Tensors/tests/ReadOnlyTensorSpanTests.cs +++ b/src/libraries/System.Numerics.Tensors/tests/ReadOnlyTensorSpanTests.cs @@ -1304,138 +1304,5 @@ public static void TryGetSpanFailsForInvalidLengthsTest() Assert.False(ReadOnlyTensorSpan.TryGetSpan([3, 3], 2, out span)); Assert.Equal(0, span.Length); } - - [Fact] - public static void ToStringTest() - { - ReadOnlyTensorSpan tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); - string expected = "System.Numerics.Tensors.ReadOnlyTensorSpan[5]"; - Assert.Equal(expected, tensor.ToString()); - - tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); - expected = "System.Numerics.Tensors.ReadOnlyTensorSpan[2, 2]"; - Assert.Equal(expected, tensor.ToString()); - - tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); - expected = "System.Numerics.Tensors.ReadOnlyTensorSpan[3, 3, 3]"; - Assert.Equal(expected, tensor.ToString()); - } - - [Fact] - public static void ToStringAllDataTest() - { - ReadOnlyTensorSpan tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); - string expected = """ - System.Numerics.Tensors.ReadOnlyTensorSpan[5] { - [1, 2, 3, 4, 5] - } - """; - Assert.Equal(expected, tensor.ToString([5])); - - tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); - expected = """ - System.Numerics.Tensors.ReadOnlyTensorSpan[2, 2] { - [1, 2], - [3, 4] - } - """; - Assert.Equal(expected, tensor.ToString([2, 2])); - - tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); - expected = """ - System.Numerics.Tensors.ReadOnlyTensorSpan[3, 3, 3] { - [ - [1, 2, 3], - [4, 5, 6], - [7, 8, 9] - ], - [ - [10, 11, 12], - [13, 14, 15], - [16, 17, 18] - ], - [ - [19, 20, 21], - [22, 23, 24], - [25, 26, 27] - ] - } - """; - Assert.Equal(expected, tensor.ToString([3, 3, 3])); - } - - [Fact] - public static void ToStringPartialDataTest() - { - ReadOnlyTensorSpan tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); - string expected = """ - System.Numerics.Tensors.ReadOnlyTensorSpan[5] { - [1, 2, 3, ..] - } - """; - Assert.Equal(expected, tensor.ToString([3])); - - tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); - expected = """ - System.Numerics.Tensors.ReadOnlyTensorSpan[2, 2] { - [1, ..], - [3, ..] - } - """; - Assert.Equal(expected, tensor.ToString([2, 1])); - - tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); - expected = """ - System.Numerics.Tensors.ReadOnlyTensorSpan[3, 3, 3] { - [ - [1, 2, ..], - [4, 5, ..], - .. - ], - [ - [10, 11, ..], - [13, 14, ..], - .. - ], - .. - } - """; - Assert.Equal(expected, tensor.ToString([2, 2, 2])); - } - - [Fact] - public static void ToStringZeroDataTest() - { - ReadOnlyTensorSpan tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); - string expected = """ - System.Numerics.Tensors.ReadOnlyTensorSpan[5] { - [..] - } - """; - Assert.Equal(expected, tensor.ToString([0])); - - tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); - expected = """ - System.Numerics.Tensors.ReadOnlyTensorSpan[2, 2] { - [..], - [..] - } - """; - Assert.Equal(expected, tensor.ToString([2, 0])); - - tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); - expected = """ - System.Numerics.Tensors.ReadOnlyTensorSpan[3, 3, 3] { - [ - .. - ], - [ - .. - ], - .. - } - """; - Assert.Equal(expected, tensor.ToString([2, 0, 2])); - } } } diff --git a/src/libraries/System.Numerics.Tensors/tests/TensorSpanTests.cs b/src/libraries/System.Numerics.Tensors/tests/TensorSpanTests.cs index 2e8e69c4b336a0..0d6a5fea0d03e7 100644 --- a/src/libraries/System.Numerics.Tensors/tests/TensorSpanTests.cs +++ b/src/libraries/System.Numerics.Tensors/tests/TensorSpanTests.cs @@ -1944,138 +1944,5 @@ public static void TryGetSpanFailsForInvalidLengthsTest() Assert.False(tensorSpan.TryGetSpan([3, 3], 2, out span)); Assert.Equal(0, span.Length); } - - [Fact] - public static void ToStringTest() - { - TensorSpan tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); - string expected = "System.Numerics.Tensors.TensorSpan[5]"; - Assert.Equal(expected, tensor.ToString()); - - tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); - expected = "System.Numerics.Tensors.TensorSpan[2, 2]"; - Assert.Equal(expected, tensor.ToString()); - - tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); - expected = "System.Numerics.Tensors.TensorSpan[3, 3, 3]"; - Assert.Equal(expected, tensor.ToString()); - } - - [Fact] - public static void ToStringAllDataTest() - { - TensorSpan tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); - string expected = """ - System.Numerics.Tensors.TensorSpan[5] { - [1, 2, 3, 4, 5] - } - """; - Assert.Equal(expected, tensor.ToString([5])); - - tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); - expected = """ - System.Numerics.Tensors.TensorSpan[2, 2] { - [1, 2], - [3, 4] - } - """; - Assert.Equal(expected, tensor.ToString([2, 2])); - - tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); - expected = """ - System.Numerics.Tensors.TensorSpan[3, 3, 3] { - [ - [1, 2, 3], - [4, 5, 6], - [7, 8, 9] - ], - [ - [10, 11, 12], - [13, 14, 15], - [16, 17, 18] - ], - [ - [19, 20, 21], - [22, 23, 24], - [25, 26, 27] - ] - } - """; - Assert.Equal(expected, tensor.ToString([3, 3, 3])); - } - - [Fact] - public static void ToStringPartialDataTest() - { - TensorSpan tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); - string expected = """ - System.Numerics.Tensors.TensorSpan[5] { - [1, 2, 3, ..] - } - """; - Assert.Equal(expected, tensor.ToString([3])); - - tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); - expected = """ - System.Numerics.Tensors.TensorSpan[2, 2] { - [1, ..], - [3, ..] - } - """; - Assert.Equal(expected, tensor.ToString([2, 1])); - - tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); - expected = """ - System.Numerics.Tensors.TensorSpan[3, 3, 3] { - [ - [1, 2, ..], - [4, 5, ..], - .. - ], - [ - [10, 11, ..], - [13, 14, ..], - .. - ], - .. - } - """; - Assert.Equal(expected, tensor.ToString([2, 2, 2])); - } - - [Fact] - public static void ToStringZeroDataTest() - { - TensorSpan tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); - string expected = """ - System.Numerics.Tensors.TensorSpan[5] { - [..] - } - """; - Assert.Equal(expected, tensor.ToString([0])); - - tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); - expected = """ - System.Numerics.Tensors.TensorSpan[2, 2] { - [..], - [..] - } - """; - Assert.Equal(expected, tensor.ToString([2, 0])); - - tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); - expected = """ - System.Numerics.Tensors.TensorSpan[3, 3, 3] { - [ - .. - ], - [ - .. - ], - .. - } - """; - Assert.Equal(expected, tensor.ToString([2, 0, 2])); - } } } diff --git a/src/libraries/System.Numerics.Tensors/tests/TensorTests.cs b/src/libraries/System.Numerics.Tensors/tests/TensorTests.cs index 22c86fbbeb695e..a9568abafac06e 100644 --- a/src/libraries/System.Numerics.Tensors/tests/TensorTests.cs +++ b/src/libraries/System.Numerics.Tensors/tests/TensorTests.cs @@ -3056,138 +3056,5 @@ public static void TryGetSpanFailsForInvalidLengthsTest() Assert.False(tensorSpan.TryGetSpan([3, 3], 2, out span)); Assert.Equal(0, span.Length); } - - [Fact] - public static void ToStringTest() - { - Tensor tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); - string expected = "System.Numerics.Tensors.Tensor[5]"; - Assert.Equal(expected, tensor.ToString()); - - tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); - expected = "System.Numerics.Tensors.Tensor[2, 2]"; - Assert.Equal(expected, tensor.ToString()); - - tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); - expected = "System.Numerics.Tensors.Tensor[3, 3, 3]"; - Assert.Equal(expected, tensor.ToString()); - } - - [Fact] - public static void ToStringAllDataTest() - { - Tensor tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); - string expected = """ - System.Numerics.Tensors.Tensor[5] { - [1, 2, 3, 4, 5] - } - """; - Assert.Equal(expected, tensor.ToString([5])); - - tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); - expected = """ - System.Numerics.Tensors.Tensor[2, 2] { - [1, 2], - [3, 4] - } - """; - Assert.Equal(expected, tensor.ToString([2, 2])); - - tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); - expected = """ - System.Numerics.Tensors.Tensor[3, 3, 3] { - [ - [1, 2, 3], - [4, 5, 6], - [7, 8, 9] - ], - [ - [10, 11, 12], - [13, 14, 15], - [16, 17, 18] - ], - [ - [19, 20, 21], - [22, 23, 24], - [25, 26, 27] - ] - } - """; - Assert.Equal(expected, tensor.ToString([3, 3, 3])); - } - - [Fact] - public static void ToStringPartialDataTest() - { - Tensor tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); - string expected = """ - System.Numerics.Tensors.Tensor[5] { - [1, 2, 3, ..] - } - """; - Assert.Equal(expected, tensor.ToString([3])); - - tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); - expected = """ - System.Numerics.Tensors.Tensor[2, 2] { - [1, ..], - [3, ..] - } - """; - Assert.Equal(expected, tensor.ToString([2, 1])); - - tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); - expected = """ - System.Numerics.Tensors.Tensor[3, 3, 3] { - [ - [1, 2, ..], - [4, 5, ..], - .. - ], - [ - [10, 11, ..], - [13, 14, ..], - .. - ], - .. - } - """; - Assert.Equal(expected, tensor.ToString([2, 2, 2])); - } - - [Fact] - public static void ToStringZeroDataTest() - { - Tensor tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); - string expected = """ - System.Numerics.Tensors.Tensor[5] { - [..] - } - """; - Assert.Equal(expected, tensor.ToString([0])); - - tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); - expected = """ - System.Numerics.Tensors.Tensor[2, 2] { - [..], - [..] - } - """; - Assert.Equal(expected, tensor.ToString([2, 0])); - - tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); - expected = """ - System.Numerics.Tensors.Tensor[3, 3, 3] { - [ - .. - ], - [ - .. - ], - .. - } - """; - Assert.Equal(expected, tensor.ToString([2, 0, 2])); - } } } diff --git a/src/libraries/System.Security.Cryptography/tests/X509Certificates/ChainTests.cs b/src/libraries/System.Security.Cryptography/tests/X509Certificates/ChainTests.cs index 99b9b3587532ef..38c36ec904d419 100644 --- a/src/libraries/System.Security.Cryptography/tests/X509Certificates/ChainTests.cs +++ b/src/libraries/System.Security.Cryptography/tests/X509Certificates/ChainTests.cs @@ -1112,7 +1112,6 @@ public static void BuildChainForFraudulentCertificate() } [Fact] - [SkipOnPlatform(TestPlatforms.Linux, "Not supported on Linux.")] public static void BuildChainForCertificateSignedWithDisallowedKey() { // The intermediate certificate is from the now defunct CA DigiNotar. @@ -1178,11 +1177,12 @@ public static void BuildChainForCertificateSignedWithDisallowedKey() chain.ChainPolicy.ExtraStore.Add(intermediateCert); Assert.False(chain.Build(cert)); - if (PlatformDetection.IsAndroid || PlatformDetection.IsApplePlatform26OrLater) + if (PlatformDetection.IsAndroid || PlatformDetection.IsApplePlatform26OrLater || PlatformDetection.IsLinux) { // Android always validates trust as part of building a path, // so violations comes back as PartialChain with no elements // Apple 26 no longer block these SKIs since the roots are no longer trusted at all and are expired. + // Linux has no concept of a blocked key list, they just remove certificates from a trust store. Assert.Equal(X509ChainStatusFlags.PartialChain, chain.AllStatusFlags()); } else diff --git a/src/tests/nativeaot/SmokeTests/TrimmingBehaviors/DeadCodeElimination.cs b/src/tests/nativeaot/SmokeTests/TrimmingBehaviors/DeadCodeElimination.cs index 7a58963a2788fd..fa3417f7a78400 100644 --- a/src/tests/nativeaot/SmokeTests/TrimmingBehaviors/DeadCodeElimination.cs +++ b/src/tests/nativeaot/SmokeTests/TrimmingBehaviors/DeadCodeElimination.cs @@ -7,10 +7,6 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -[assembly: TypeMap("Foo", typeof(DeadCodeElimination.TestInteropMapTrimming.ConditionalTypeMapEntry), typeof(DeadCodeElimination.TestInteropMapTrimming.TypeMapTrimTarget))] -[assembly: TypeMap("Bar", typeof(DeadCodeElimination.TestInteropMapTrimming.UnconditionalTypeMapEntry))] -[assembly: TypeMapAssociation(typeof(DeadCodeElimination.TestInteropMapTrimming.SourceType), typeof(DeadCodeElimination.TestInteropMapTrimming.ProxyType))] - class DeadCodeElimination { public static int Run() @@ -40,7 +36,6 @@ public static int Run() TestInvisibleGenericsTrimming.Run(); TestTypeHandlesInGenericDictionaries.Run(); TestMetadataMethodTables.Run(); - TestInteropMapTrimming.Run(); return 100; } @@ -1272,59 +1267,6 @@ public static void Run() } } - internal class TestInteropMapTrimming - { - internal class Universe; - - internal class ConditionalTypeMapEntry; - internal class UnconditionalTypeMapEntry; - internal class TypeMapTrimTarget; - - internal class SourceType; - internal class ProxyType; - - [MethodImpl(MethodImplOptions.NoInlining)] - static object GetUnknown() => null; - - [MethodImpl(MethodImplOptions.NoInlining)] - static void Consume(object o) { } - - public static void Run() - { - var map = TypeMapping.GetOrCreateExternalTypeMapping(); - - { - if (GetUnknown() is TypeMapTrimTarget) - { - Console.WriteLine("Unexpected!"); - } - - var mappedType = map["Foo"]; - ThrowIfUsableMethodTable(mappedType); - if (mappedType.Name != nameof(ConditionalTypeMapEntry)) - throw new Exception(); - } - - { - var mappedType = map["Bar"]; - ThrowIfUsableMethodTable(mappedType); - if (mappedType.Name != nameof(UnconditionalTypeMapEntry)) - throw new Exception(); - } - - var proxyMap = TypeMapping.GetOrCreateProxyTypeMapping(); - - { - Consume(new SourceType()); - - var mappedType = proxyMap[typeof(SourceType)]; - ThrowIfUsableMethodTable(mappedType); - if (mappedType.Name != nameof(ProxyType)) - throw new Exception(); - } - } - } - [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2070:UnrecognizedReflectionPattern", Justification = "That's the point")] private static Type GetTypeSecretly(Type testType, string typeName) => testType.GetNestedType(typeName, BindingFlags.NonPublic | BindingFlags.Public); @@ -1337,19 +1279,14 @@ private static void ThrowIfPresent(Type testType, string typeName) } } + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2072:UnrecognizedReflectionPattern", + Justification = "That's the point")] private static void ThrowIfPresentWithUsableMethodTable(Type testType, string typeName) { Type t = GetTypeSecretly(testType, typeName); if (t == null) return; - ThrowIfUsableMethodTable(t); - } - - [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2067:UnrecognizedReflectionPattern", - Justification = "That's the point")] - private static void ThrowIfUsableMethodTable(Type t) - { try { RuntimeHelpers.GetUninitializedObject(t); From 30960a3d879e8f775eace21b16e3417636380193 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 22 Aug 2025 02:04:10 +0000 Subject: [PATCH 03/10] Update dependencies from https://github.com/dotnet/dotnet build 280198 Updated Dependencies: Microsoft.CodeAnalysis, Microsoft.CodeAnalysis.Analyzers, Microsoft.CodeAnalysis.CSharp, Microsoft.Net.Compilers.Toolset (Version 5.0.0-2.25414.111 -> 5.0.0-2.25420.109) Microsoft.CodeAnalysis.NetAnalyzers (Version 10.0.0-preview.25414.111 -> 10.0.0-preview.25420.109) Microsoft.DotNet.ApiCompat.Task, Microsoft.NET.Workload.Emscripten.Current.Manifest-10.0.100.Transport (Version 10.0.100-rc.1.25414.111 -> 10.0.100-rc.2.25420.109) Microsoft.DotNet.Arcade.Sdk, Microsoft.DotNet.Build.Tasks.Archives, Microsoft.DotNet.Build.Tasks.Feed, Microsoft.DotNet.Build.Tasks.Installers, Microsoft.DotNet.Build.Tasks.Packaging, Microsoft.DotNet.Build.Tasks.TargetFramework, Microsoft.DotNet.Build.Tasks.Templating, Microsoft.DotNet.Build.Tasks.Workloads, Microsoft.DotNet.CodeAnalysis, Microsoft.DotNet.GenAPI, Microsoft.DotNet.GenFacades, Microsoft.DotNet.Helix.Sdk, Microsoft.DotNet.PackageTesting, Microsoft.DotNet.RemoteExecutor, Microsoft.DotNet.SharedFramework.Sdk, Microsoft.DotNet.XliffTasks, Microsoft.DotNet.XUnitExtensions (Version 10.0.0-beta.25414.111 -> 10.0.0-beta.25420.109) Microsoft.DotNet.Cecil (Version 0.11.5-alpha.25414.111 -> 0.11.5-alpha.25420.109) Microsoft.DotNet.XUnitAssert, Microsoft.DotNet.XUnitConsoleRunner (Version 2.9.3-beta.25414.111 -> 2.9.3-beta.25420.109) Microsoft.NET.Sdk.IL, Microsoft.NETCore.App.Ref, Microsoft.NETCore.ILAsm, runtime.native.System.IO.Ports, System.Reflection.Metadata, System.Reflection.MetadataLoadContext, System.Text.Json (Version 10.0.0-rc.1.25414.111 -> 10.0.0-rc.2.25420.109) NuGet.Frameworks, NuGet.Packaging, NuGet.ProjectModel, NuGet.Versioning (Version 7.0.0-preview.1.41511 -> 7.0.0-preview.1.42109) System.CommandLine (Version 2.0.0-rc.1.25414.111 -> 2.0.0-rc.2.25420.109) --- eng/Version.Details.props | 78 ++++----- eng/Version.Details.xml | 158 +++++++++--------- eng/common/SetupNugetSources.ps1 | 4 +- eng/common/SetupNugetSources.sh | 4 +- eng/common/core-templates/job/job.yml | 6 +- eng/common/core-templates/job/onelocbuild.yml | 6 +- .../job/publish-build-assets.yml | 10 +- .../core-templates/jobs/codeql-build.yml | 2 +- eng/common/core-templates/jobs/jobs.yml | 2 + .../core-templates/post-build/post-build.yml | 8 +- .../post-build/setup-maestro-vars.yml | 2 +- .../steps/enable-internal-sources.yml | 12 +- .../core-templates/steps/generate-sbom.yml | 2 +- .../steps/install-microbuild.yml | 47 ++++-- .../core-templates/steps/publish-logs.yml | 14 +- .../steps/source-index-stage1-publish.yml | 2 +- eng/common/generate-locproject.ps1 | 49 +++++- eng/common/template-guidance.md | 2 +- eng/common/templates-official/job/job.yml | 2 +- .../variables/sdl-variables.yml | 2 +- eng/common/templates/job/job.yml | 4 +- eng/common/tools.ps1 | 6 +- global.json | 8 +- 23 files changed, 242 insertions(+), 188 deletions(-) diff --git a/eng/Version.Details.props b/eng/Version.Details.props index ca306708f3d764..fb26e08588b66c 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -41,45 +41,45 @@ This file should be imported by eng/Versions.props 19.1.0-alpha.1.25167.1 19.1.0-alpha.1.25167.1 - 5.0.0-2.25414.111 - 5.0.0-2.25414.111 - 5.0.0-2.25414.111 - 10.0.0-preview.25414.111 - 10.0.100-rc.1.25414.111 - 10.0.0-beta.25414.111 - 10.0.0-beta.25414.111 - 10.0.0-beta.25414.111 - 10.0.0-beta.25414.111 - 10.0.0-beta.25414.111 - 10.0.0-beta.25414.111 - 10.0.0-beta.25414.111 - 10.0.0-beta.25414.111 - 0.11.5-alpha.25414.111 - 10.0.0-beta.25414.111 - 10.0.0-beta.25414.111 - 10.0.0-beta.25414.111 - 10.0.0-beta.25414.111 - 10.0.0-beta.25414.111 - 10.0.0-beta.25414.111 - 10.0.0-beta.25414.111 - 10.0.0-beta.25414.111 - 2.9.3-beta.25414.111 - 2.9.3-beta.25414.111 - 10.0.0-beta.25414.111 - 5.0.0-2.25414.111 - 10.0.0-rc.1.25414.111 - 10.0.100-rc.1.25414.111 - 10.0.0-rc.1.25414.111 - 10.0.0-rc.1.25414.111 - 7.0.0-preview.1.41511 - 7.0.0-preview.1.41511 - 7.0.0-preview.1.41511 - 7.0.0-preview.1.41511 - 10.0.0-rc.1.25414.111 - 2.0.0-rc.1.25414.111 - 10.0.0-rc.1.25414.111 - 10.0.0-rc.1.25414.111 - 10.0.0-rc.1.25414.111 + 5.0.0-2.25420.109 + 5.0.0-2.25420.109 + 5.0.0-2.25420.109 + 10.0.0-preview.25420.109 + 10.0.100-rc.2.25420.109 + 10.0.0-beta.25420.109 + 10.0.0-beta.25420.109 + 10.0.0-beta.25420.109 + 10.0.0-beta.25420.109 + 10.0.0-beta.25420.109 + 10.0.0-beta.25420.109 + 10.0.0-beta.25420.109 + 10.0.0-beta.25420.109 + 0.11.5-alpha.25420.109 + 10.0.0-beta.25420.109 + 10.0.0-beta.25420.109 + 10.0.0-beta.25420.109 + 10.0.0-beta.25420.109 + 10.0.0-beta.25420.109 + 10.0.0-beta.25420.109 + 10.0.0-beta.25420.109 + 10.0.0-beta.25420.109 + 2.9.3-beta.25420.109 + 2.9.3-beta.25420.109 + 10.0.0-beta.25420.109 + 5.0.0-2.25420.109 + 10.0.0-rc.2.25420.109 + 10.0.100-rc.2.25420.109 + 10.0.0-rc.2.25420.109 + 10.0.0-rc.2.25420.109 + 7.0.0-preview.1.42109 + 7.0.0-preview.1.42109 + 7.0.0-preview.1.42109 + 7.0.0-preview.1.42109 + 10.0.0-rc.2.25420.109 + 2.0.0-rc.2.25420.109 + 10.0.0-rc.2.25420.109 + 10.0.0-rc.2.25420.109 + 10.0.0-rc.2.25420.109 10.0.0-beta.25310.1 10.0.0-beta.25310.1 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 665cd7db7a6322..b539bf6da35a2f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,5 +1,5 @@ - + https://github.com/dotnet/icu @@ -41,91 +41,91 @@ https://github.com/dotnet/llvm-project da5dd054a531e6fea65643b7e754285b73eab433 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 https://github.com/dotnet/runtime-assets @@ -263,33 +263,33 @@ https://github.com/dotnet/llvm-project da5dd054a531e6fea65643b7e754285b73eab433 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 https://github.com/dotnet/xharness @@ -303,9 +303,9 @@ https://github.com/dotnet/xharness 4c17e23fcb7575baa9de575e5a96258096cbaea1 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -331,29 +331,29 @@ https://github.com/dotnet/runtime-assets 385d085eb055cabeaed3dde958a900e7b31cf6ce - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -365,21 +365,21 @@ - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 - + https://github.com/dotnet/dotnet - f8a57b66e6466922534e8046b37a6503d9d39dab + 619d5633513d1b31c528db4360833fce52f51829 https://github.com/dotnet/node diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1 index 5db4ad71ee2f3e..792b60b49d424d 100644 --- a/eng/common/SetupNugetSources.ps1 +++ b/eng/common/SetupNugetSources.ps1 @@ -10,8 +10,8 @@ # displayName: Setup Private Feeds Credentials # condition: eq(variables['Agent.OS'], 'Windows_NT') # inputs: -# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 -# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token +# filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 +# arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token # env: # Token: $(dn-bot-dnceng-artifact-feeds-rw) # diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh index 4604b61b0323ae..facb415ca6ff35 100755 --- a/eng/common/SetupNugetSources.sh +++ b/eng/common/SetupNugetSources.sh @@ -11,8 +11,8 @@ # - task: Bash@3 # displayName: Setup Internal Feeds # inputs: -# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh -# arguments: $(Build.SourcesDirectory)/NuGet.config +# filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.sh +# arguments: $(System.DefaultWorkingDirectory)/NuGet.config # condition: ne(variables['Agent.OS'], 'Windows_NT') # - task: NuGetAuthenticate@1 # diff --git a/eng/common/core-templates/job/job.yml b/eng/common/core-templates/job/job.yml index d9013251542c73..5ce51840619888 100644 --- a/eng/common/core-templates/job/job.yml +++ b/eng/common/core-templates/job/job.yml @@ -163,7 +163,7 @@ jobs: inputs: testResultsFormat: 'xUnit' testResultsFiles: '*.xml' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + searchFolder: '$(System.DefaultWorkingDirectory)/artifacts/TestResults/$(_BuildConfig)' testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-xunit mergeTestResults: ${{ parameters.mergeTestResults }} continueOnError: true @@ -174,7 +174,7 @@ jobs: inputs: testResultsFormat: 'VSTest' testResultsFiles: '*.trx' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + searchFolder: '$(System.DefaultWorkingDirectory)/artifacts/TestResults/$(_BuildConfig)' testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-trx mergeTestResults: ${{ parameters.mergeTestResults }} continueOnError: true @@ -218,7 +218,7 @@ jobs: - task: CopyFiles@2 displayName: Gather buildconfiguration for build retry inputs: - SourceFolder: '$(Build.SourcesDirectory)/eng/common/BuildConfiguration' + SourceFolder: '$(System.DefaultWorkingDirectory)/eng/common/BuildConfiguration' Contents: '**' TargetFolder: '$(Build.ArtifactStagingDirectory)/eng/common/BuildConfiguration' continueOnError: true diff --git a/eng/common/core-templates/job/onelocbuild.yml b/eng/common/core-templates/job/onelocbuild.yml index 8bf7d23355bc5e..c5788829a872e5 100644 --- a/eng/common/core-templates/job/onelocbuild.yml +++ b/eng/common/core-templates/job/onelocbuild.yml @@ -8,7 +8,7 @@ parameters: CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex GithubPat: $(BotAccount-dotnet-bot-repo-PAT) - SourcesDirectory: $(Build.SourcesDirectory) + SourcesDirectory: $(System.DefaultWorkingDirectory) CreatePr: true AutoCompletePr: false ReusePr: true @@ -68,7 +68,7 @@ jobs: - ${{ if ne(parameters.SkipLocProjectJsonGeneration, 'true') }}: - task: Powershell@2 inputs: - filePath: $(Build.SourcesDirectory)/eng/common/generate-locproject.ps1 + filePath: $(System.DefaultWorkingDirectory)/eng/common/generate-locproject.ps1 arguments: $(_GenerateLocProjectArguments) displayName: Generate LocProject.json condition: ${{ parameters.condition }} @@ -103,7 +103,7 @@ jobs: - task: CopyFiles@2 displayName: Copy LocProject.json inputs: - SourceFolder: '$(Build.SourcesDirectory)/eng/Localize/' + SourceFolder: '$(System.DefaultWorkingDirectory)/eng/Localize/' Contents: 'LocProject.json' TargetFolder: '$(Build.ArtifactStagingDirectory)/loc' condition: ${{ parameters.condition }} diff --git a/eng/common/core-templates/job/publish-build-assets.yml b/eng/common/core-templates/job/publish-build-assets.yml index d5303229c97e27..348cd16376f10d 100644 --- a/eng/common/core-templates/job/publish-build-assets.yml +++ b/eng/common/core-templates/job/publish-build-assets.yml @@ -38,6 +38,8 @@ parameters: # Optional: A minimatch pattern for the asset manifests to publish to BAR assetManifestsPattern: '*/manifests/**/*.xml' + repositoryAlias: self + jobs: - job: Asset_Registry_Publish @@ -78,7 +80,7 @@ jobs: - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - checkout: self + - checkout: ${{ parameters.repositoryAlias }} fetchDepth: 3 clean: true @@ -117,7 +119,7 @@ jobs: azureSubscription: "Darc: Maestro Production" scriptType: ps scriptLocation: scriptPath - scriptPath: $(Build.SourcesDirectory)/eng/common/sdk-task.ps1 + scriptPath: $(System.DefaultWorkingDirectory)/eng/common/sdk-task.ps1 arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet /p:ManifestsPath='$(Build.StagingDirectory)/AssetManifests' /p:IsAssetlessBuild=${{ parameters.isAssetlessBuild }} @@ -137,7 +139,7 @@ jobs: Add-Content -Path $filePath -Value "$(DefaultChannels)" Add-Content -Path $filePath -Value $(IsStableBuild) - $symbolExclusionfile = "$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt" + $symbolExclusionfile = "$(System.DefaultWorkingDirectory)/eng/SymbolPublishingExclusionsFile.txt" if (Test-Path -Path $symbolExclusionfile) { Write-Host "SymbolExclusionFile exists" @@ -177,7 +179,7 @@ jobs: azureSubscription: "Darc: Maestro Production" scriptType: ps scriptLocation: scriptPath - scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1 arguments: > -BuildId $(BARBuildId) -PublishingInfraVersion 3 diff --git a/eng/common/core-templates/jobs/codeql-build.yml b/eng/common/core-templates/jobs/codeql-build.yml index 693b00b370447b..dbc14ac580a271 100644 --- a/eng/common/core-templates/jobs/codeql-build.yml +++ b/eng/common/core-templates/jobs/codeql-build.yml @@ -24,7 +24,7 @@ jobs: - name: DefaultGuardianVersion value: 0.109.0 - name: GuardianPackagesConfigFile - value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config + value: $(System.DefaultWorkingDirectory)\eng\common\sdl\packages.config - name: GuardianVersion value: ${{ coalesce(parameters.overrideGuardianVersion, '$(DefaultGuardianVersion)') }} diff --git a/eng/common/core-templates/jobs/jobs.yml b/eng/common/core-templates/jobs/jobs.yml index 2f992b2c6eccbd..b637cb6e94808e 100644 --- a/eng/common/core-templates/jobs/jobs.yml +++ b/eng/common/core-templates/jobs/jobs.yml @@ -43,6 +43,7 @@ parameters: artifacts: {} is1ESPipeline: '' + repositoryAlias: self # Internal resources (telemetry, microbuild) can only be accessed from non-public projects, # and some (Microbuild) should only be applied to non-PR cases for internal builds. @@ -114,3 +115,4 @@ jobs: enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }} artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} signingValidationAdditionalParameters: ${{ parameters.signingValidationAdditionalParameters }} + repositoryAlias: ${{ parameters.repositoryAlias }} diff --git a/eng/common/core-templates/post-build/post-build.yml b/eng/common/core-templates/post-build/post-build.yml index a151fd811e3e48..f6f87fe5c675d9 100644 --- a/eng/common/core-templates/post-build/post-build.yml +++ b/eng/common/core-templates/post-build/post-build.yml @@ -154,7 +154,7 @@ stages: - task: PowerShell@2 displayName: Validate inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1 + filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/nuget-validation.ps1 arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ - job: @@ -208,7 +208,7 @@ stages: filePath: eng\common\sdk-task.ps1 arguments: -task SigningValidation -restore -msbuildEngine vs /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts' - /p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt' + /p:SignCheckExclusionsFile='$(System.DefaultWorkingDirectory)/eng/SignCheckExclusionsFile.txt' ${{ parameters.signingValidationAdditionalParameters }} - template: /eng/common/core-templates/steps/publish-logs.yml @@ -258,7 +258,7 @@ stages: - task: PowerShell@2 displayName: Validate inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1 + filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/sourcelink-validation.ps1 arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ -ExtractPath $(Agent.BuildDirectory)/Extract/ -GHRepoName $(Build.Repository.Name) @@ -313,7 +313,7 @@ stages: azureSubscription: "Darc: Maestro Production" scriptType: ps scriptLocation: scriptPath - scriptPath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + scriptPath: $(System.DefaultWorkingDirectory)/eng/common/post-build/publish-using-darc.ps1 arguments: > -BuildId $(BARBuildId) -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} diff --git a/eng/common/core-templates/post-build/setup-maestro-vars.yml b/eng/common/core-templates/post-build/setup-maestro-vars.yml index f7602980dbe721..a7abd58c4bb609 100644 --- a/eng/common/core-templates/post-build/setup-maestro-vars.yml +++ b/eng/common/core-templates/post-build/setup-maestro-vars.yml @@ -36,7 +36,7 @@ steps: $AzureDevOpsBuildId = $Env:Build_BuildId } else { - . $(Build.SourcesDirectory)\eng\common\tools.ps1 + . $(System.DefaultWorkingDirectory)\eng\common\tools.ps1 $darc = Get-Darc $buildInfo = & $darc get-build ` --id ${{ parameters.BARBuildId }} ` diff --git a/eng/common/core-templates/steps/enable-internal-sources.yml b/eng/common/core-templates/steps/enable-internal-sources.yml index 64f881bffc3cf1..4085512b690910 100644 --- a/eng/common/core-templates/steps/enable-internal-sources.yml +++ b/eng/common/core-templates/steps/enable-internal-sources.yml @@ -17,8 +17,8 @@ steps: - task: PowerShell@2 displayName: Setup Internal Feeds inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token env: Token: ${{ parameters.legacyCredential }} # If running on dnceng (internal project), just use the default behavior for NuGetAuthenticate. @@ -29,8 +29,8 @@ steps: - task: PowerShell@2 displayName: Setup Internal Feeds inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config + filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config - ${{ else }}: - template: /eng/common/templates/steps/get-federated-access-token.yml parameters: @@ -39,8 +39,8 @@ steps: - task: PowerShell@2 displayName: Setup Internal Feeds inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $(dnceng-artifacts-feeds-read-access-token) + filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $(dnceng-artifacts-feeds-read-access-token) # This is required in certain scenarios to install the ADO credential provider. # It installed by default in some msbuild invocations (e.g. VS msbuild), but needs to be installed for others # (e.g. dotnet msbuild). diff --git a/eng/common/core-templates/steps/generate-sbom.yml b/eng/common/core-templates/steps/generate-sbom.yml index 44a9636cdff90a..c05f650279795f 100644 --- a/eng/common/core-templates/steps/generate-sbom.yml +++ b/eng/common/core-templates/steps/generate-sbom.yml @@ -6,7 +6,7 @@ parameters: PackageVersion: 10.0.0 - BuildDropPath: '$(Build.SourcesDirectory)/artifacts' + BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts' PackageName: '.NET' ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom IgnoreDirectories: '' diff --git a/eng/common/core-templates/steps/install-microbuild.yml b/eng/common/core-templates/steps/install-microbuild.yml index da30e67bc34c95..d6b9878f54db7f 100644 --- a/eng/common/core-templates/steps/install-microbuild.yml +++ b/eng/common/core-templates/steps/install-microbuild.yml @@ -12,6 +12,7 @@ parameters: # variable is not available in template expression. _SignType has a very large proliferation across .NET, so replacing it is tough. microbuildUseESRP: true # Location of the MicroBuild output folder + # NOTE: There's something that relies on this being in the "default" source directory for tasks such as Signing to work properly. microBuildOutputFolder: '$(Build.SourcesDirectory)' continueOnError: false @@ -46,17 +47,19 @@ steps: displayName: 'Validate ESRP usage (Non-Windows)' condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) + # Two different MB install steps. This is due to not being able to use the agent OS during + # YAML expansion, and Windows vs. Linux/Mac uses different service connections. However, + # we can avoid including the MB install step if not enabled at all. This avoids a bunch of + # extra pipeline authorizations, since most pipelines do not sign on non-Windows. - task: MicroBuildSigningPlugin@4 - displayName: Install MicroBuild plugin + displayName: Install MicroBuild plugin (Windows) inputs: signType: $(_SignType) zipSources: false feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json ${{ if eq(parameters.microbuildUseESRP, true) }}: - ${{ if eq(parameters.enableMicrobuildForMacAndLinux, 'true') }}: - azureSubscription: 'MicroBuild Signing Task (DevDiv)' - useEsrpCli: true - ${{ elseif eq(variables['System.TeamProject'], 'DevDiv') }}: + ConnectedServiceName: 'MicroBuild Signing Task (DevDiv)' + ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea ${{ else }}: ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca @@ -65,16 +68,24 @@ steps: MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }} SYSTEM_ACCESSTOKEN: $(System.AccessToken) continueOnError: ${{ parameters.continueOnError }} - condition: and( - succeeded(), - or( - and( - eq(variables['Agent.Os'], 'Windows_NT'), - in(variables['_SignType'], 'real', 'test') - ), - and( - ${{ eq(parameters.enableMicrobuildForMacAndLinux, true) }}, - ne(variables['Agent.Os'], 'Windows_NT'), - eq(variables['_SignType'], 'real') - ) - )) + condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'), in(variables['_SignType'], 'real', 'test')) + + - ${{ if eq(parameters.enableMicrobuildForMacAndLinux, true) }}: + - task: MicroBuildSigningPlugin@4 + displayName: Install MicroBuild plugin (non-Windows) + inputs: + signType: $(_SignType) + zipSources: false + feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json + ${{ if eq(parameters.microbuildUseESRP, true) }}: + ConnectedServiceName: 'MicroBuild Signing Task (DevDiv)' + ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: + ConnectedPMEServiceName: beb8cb23-b303-4c95-ab26-9e44bc958d39 + ${{ else }}: + ConnectedPMEServiceName: c24de2a5-cc7a-493d-95e4-8e5ff5cad2bc + env: + TeamName: $(_TeamName) + MicroBuildOutputFolderOverride: ${{ parameters.microBuildOutputFolder }} + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + continueOnError: ${{ parameters.continueOnError }} + condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'), eq(variables['_SignType'], 'real')) diff --git a/eng/common/core-templates/steps/publish-logs.yml b/eng/common/core-templates/steps/publish-logs.yml index de24d0087c58bb..10f825e270a03b 100644 --- a/eng/common/core-templates/steps/publish-logs.yml +++ b/eng/common/core-templates/steps/publish-logs.yml @@ -12,22 +12,22 @@ steps: inputs: targetType: inline script: | - New-Item -ItemType Directory $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ - Move-Item -Path $(Build.SourcesDirectory)/artifacts/log/Debug/* $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ + New-Item -ItemType Directory $(System.DefaultWorkingDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ + Move-Item -Path $(System.DefaultWorkingDirectory)/artifacts/log/Debug/* $(System.DefaultWorkingDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ continueOnError: true condition: always() - task: PowerShell@2 displayName: Redact Logs inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/redact-logs.ps1 + filePath: $(System.DefaultWorkingDirectory)/eng/common/post-build/redact-logs.ps1 # For now this needs to have explicit list of all sensitive data. Taken from eng/publishing/v3/publish.yml - # Sensitive data can as well be added to $(Build.SourcesDirectory)/eng/BinlogSecretsRedactionFile.txt' + # Sensitive data can as well be added to $(System.DefaultWorkingDirectory)/eng/BinlogSecretsRedactionFile.txt' # If the file exists - sensitive data for redaction will be sourced from it # (single entry per line, lines starting with '# ' are considered comments and skipped) - arguments: -InputPath '$(Build.SourcesDirectory)/PostBuildLogs' + arguments: -InputPath '$(System.DefaultWorkingDirectory)/PostBuildLogs' -BinlogToolVersion ${{parameters.BinlogToolVersion}} - -TokensFilePath '$(Build.SourcesDirectory)/eng/BinlogSecretsRedactionFile.txt' + -TokensFilePath '$(System.DefaultWorkingDirectory)/eng/BinlogSecretsRedactionFile.txt' '$(publishing-dnceng-devdiv-code-r-build-re)' '$(MaestroAccessToken)' '$(dn-bot-all-orgs-artifact-feeds-rw)' @@ -44,7 +44,7 @@ steps: - task: CopyFiles@2 displayName: Gather post build logs inputs: - SourceFolder: '$(Build.SourcesDirectory)/PostBuildLogs' + SourceFolder: '$(System.DefaultWorkingDirectory)/PostBuildLogs' Contents: '**' TargetFolder: '$(Build.ArtifactStagingDirectory)/PostBuildLogs' condition: always() diff --git a/eng/common/core-templates/steps/source-index-stage1-publish.yml b/eng/common/core-templates/steps/source-index-stage1-publish.yml index c2917c1efc1cb7..75600735f175e6 100644 --- a/eng/common/core-templates/steps/source-index-stage1-publish.yml +++ b/eng/common/core-templates/steps/source-index-stage1-publish.yml @@ -20,7 +20,7 @@ steps: # Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk. workingDirectory: $(Agent.TempDirectory) -- script: $(Agent.TempDirectory)/.source-index/tools/BinLogToSln -i ${{parameters.BinlogPath}} -r $(Build.SourcesDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output +- script: $(Agent.TempDirectory)/.source-index/tools/BinLogToSln -i ${{parameters.BinlogPath}} -r $(System.DefaultWorkingDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output displayName: "Source Index: Process Binlog into indexable sln" - ${{ if and(ne(parameters.runAsPublic, 'true'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: diff --git a/eng/common/generate-locproject.ps1 b/eng/common/generate-locproject.ps1 index 524aaa57f2b742..fa1cdc2b30076a 100644 --- a/eng/common/generate-locproject.ps1 +++ b/eng/common/generate-locproject.ps1 @@ -33,15 +33,27 @@ $jsonTemplateFiles | ForEach-Object { $jsonWinformsTemplateFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\\strings\.json" } # current winforms pattern +$wxlFilesV3 = @() +$wxlFilesV5 = @() $wxlFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\\.+\.wxl" -And -Not( $_.Directory.Name -Match "\d{4}" ) } # localized files live in four digit lang ID directories; this excludes them if (-not $wxlFiles) { $wxlEnFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\\1033\\.+\.wxl" } # pick up en files (1033 = en) specifically so we can copy them to use as the neutral xlf files if ($wxlEnFiles) { - $wxlFiles = @() - $wxlEnFiles | ForEach-Object { - $destinationFile = "$($_.Directory.Parent.FullName)\$($_.Name)" - $wxlFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru - } + $wxlFiles = @() + $wxlEnFiles | ForEach-Object { + $destinationFile = "$($_.Directory.Parent.FullName)\$($_.Name)" + $content = Get-Content $_.FullName -Raw + + # Split files on schema to select different parser settings in the generated project. + if ($content -like "*http://wixtoolset.org/schemas/v4/wxl*") + { + $wxlFilesV5 += Copy-Item $_.FullName -Destination $destinationFile -PassThru + } + elseif ($content -like "*http://schemas.microsoft.com/wix/2006/localization*") + { + $wxlFilesV3 += Copy-Item $_.FullName -Destination $destinationFile -PassThru + } + } } } @@ -114,7 +126,32 @@ $locJson = @{ CloneLanguageSet = "WiX_CloneLanguages" LssFiles = @( "wxl_loc.lss" ) LocItems = @( - $wxlFiles | ForEach-Object { + $wxlFilesV3 | ForEach-Object { + $outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\" + $continue = $true + foreach ($exclusion in $exclusions.Exclusions) { + if ($_.FullName.Contains($exclusion)) { + $continue = $false + } + } + $sourceFile = ($_.FullName | Resolve-Path -Relative) + if ($continue) + { + return @{ + SourceFile = $sourceFile + CopyOption = "LangIDOnPath" + OutputPath = $outputPath + } + } + } + ) + }, + @{ + LanguageSet = $LanguageSet + CloneLanguageSet = "WiX_CloneLanguages" + LssFiles = @( "P210WxlSchemaV4.lss" ) + LocItems = @( + $wxlFilesV5 | ForEach-Object { $outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\" $continue = $true foreach ($exclusion in $exclusions.Exclusions) { diff --git a/eng/common/template-guidance.md b/eng/common/template-guidance.md index 98bbc1ded0ba88..4bf4cf41bd7c76 100644 --- a/eng/common/template-guidance.md +++ b/eng/common/template-guidance.md @@ -50,7 +50,7 @@ extends: - task: CopyFiles@2 displayName: Gather build output inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts/marvel' + SourceFolder: '$(System.DefaultWorkingDirectory)/artifacts/marvel' Contents: '**' TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/marvel' ``` diff --git a/eng/common/templates-official/job/job.yml b/eng/common/templates-official/job/job.yml index a8a94328745823..92a0664f5647d5 100644 --- a/eng/common/templates-official/job/job.yml +++ b/eng/common/templates-official/job/job.yml @@ -3,7 +3,7 @@ parameters: enableSbom: true runAsPublic: false PackageVersion: 9.0.0 - BuildDropPath: '$(Build.SourcesDirectory)/artifacts' + BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts' jobs: - template: /eng/common/core-templates/job/job.yml diff --git a/eng/common/templates-official/variables/sdl-variables.yml b/eng/common/templates-official/variables/sdl-variables.yml index dbdd66d4a4b3a0..f1311bbb1b33d9 100644 --- a/eng/common/templates-official/variables/sdl-variables.yml +++ b/eng/common/templates-official/variables/sdl-variables.yml @@ -4,4 +4,4 @@ variables: - name: DefaultGuardianVersion value: 0.109.0 - name: GuardianPackagesConfigFile - value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config \ No newline at end of file + value: $(System.DefaultWorkingDirectory)\eng\common\sdl\packages.config \ No newline at end of file diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index 7cbf668c22bc04..238fa0818f7b27 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -6,7 +6,7 @@ parameters: enableSbom: true runAsPublic: false PackageVersion: 9.0.0 - BuildDropPath: '$(Build.SourcesDirectory)/artifacts' + BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts' jobs: - template: /eng/common/core-templates/job/job.yml @@ -77,7 +77,7 @@ jobs: parameters: is1ESPipeline: false args: - targetPath: '$(Build.SourcesDirectory)\eng\common\BuildConfiguration' + targetPath: '$(System.DefaultWorkingDirectory)\eng\common\BuildConfiguration' artifactName: 'BuildConfiguration' displayName: 'Publish build retry configuration' continueOnError: true diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index d4cfd9ccd806c9..4920464cc4ae3e 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -544,7 +544,8 @@ function LocateVisualStudio([object]$vsRequirements = $null){ if (Get-Member -InputObject $GlobalJson.tools -Name 'vswhere') { $vswhereVersion = $GlobalJson.tools.vswhere } else { - $vswhereVersion = '2.5.2' + # keep this in sync with the VSWhereVersion in DefaultVersions.props + $vswhereVersion = '3.1.7' } $vsWhereDir = Join-Path $ToolsDir "vswhere\$vswhereVersion" @@ -552,7 +553,8 @@ function LocateVisualStudio([object]$vsRequirements = $null){ if (!(Test-Path $vsWhereExe)) { Create-Directory $vsWhereDir - Write-Host 'Downloading vswhere' + Write-Host 'Downloading vswhere $vswhereVersion' + $ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit Retry({ Invoke-WebRequest "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/vswhere/$vswhereVersion/vswhere.exe" -OutFile $vswhereExe }) diff --git a/global.json b/global.json index 965716a2fdd5d5..ba29488e891299 100644 --- a/global.json +++ b/global.json @@ -8,11 +8,11 @@ "dotnet": "10.0.100-rc.1.25411.109" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25414.111", - "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25414.111", - "Microsoft.DotNet.SharedFramework.Sdk": "10.0.0-beta.25414.111", + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25420.109", + "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25420.109", + "Microsoft.DotNet.SharedFramework.Sdk": "10.0.0-beta.25420.109", "Microsoft.Build.NoTargets": "3.7.0", "Microsoft.Build.Traversal": "3.4.0", - "Microsoft.NET.Sdk.IL": "10.0.0-rc.1.25414.111" + "Microsoft.NET.Sdk.IL": "10.0.0-rc.2.25420.109" } } From 80633e7a7436a9598f0d755da0c9521cd7b729f0 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 28 Aug 2025 02:03:02 +0000 Subject: [PATCH 04/10] Backflow from https://github.com/dotnet/dotnet / 39ec54d build 281059 [[ commit created by automation ]] --- eng/build.ps1 | 48 +++++ eng/build.sh | 4 +- src/coreclr/pal/src/thread/process.cpp | 29 ++- .../AnalyzedExternalTypeMapNode.cs | 4 +- .../AnalyzedProxyTypeMapNode.cs | 4 +- .../DependencyAnalysis/ExternalTypeMapNode.cs | 6 +- .../DependencyAnalysis/ProxyTypeMapNode.cs | 4 +- src/coreclr/vm/hostinformation.cpp | 3 +- .../src/Microsoft.NETCore.Platforms.csproj | 13 +- .../ref/System.Numerics.Tensors.netcore.cs | 6 +- .../src/CompatibilitySuppressions.xml | 42 ++++ .../Tensors/netcore/ReadOnlyTensorSpan_1.cs | 17 +- .../System/Numerics/Tensors/netcore/Tensor.cs | 181 +++++++++++------- .../Numerics/Tensors/netcore/TensorSpan_1.cs | 7 +- .../Numerics/Tensors/netcore/Tensor_1.cs | 18 +- .../tests/ReadOnlyTensorSpanTests.cs | 133 +++++++++++++ .../tests/TensorSpanTests.cs | 133 +++++++++++++ .../tests/TensorTests.cs | 133 +++++++++++++ .../tests/X509Certificates/ChainTests.cs | 4 +- .../Crossgen2Tasks/Crossgen2Tasks.csproj | 15 +- .../installer.tasks/installer.tasks.csproj | 6 +- .../TrimmingBehaviors/DeadCodeElimination.cs | 67 ++++++- 22 files changed, 756 insertions(+), 121 deletions(-) diff --git a/eng/build.ps1 b/eng/build.ps1 index f642b35f228900..52977efcecfbbb 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -24,6 +24,8 @@ Param( [string]$cmakeargs, [switch]$pgoinstrument, [string[]]$fsanitize, + [switch]$bootstrap, + [switch]$useBoostrap, [Parameter(ValueFromRemainingArguments=$true)][String[]]$properties ) @@ -57,6 +59,8 @@ function Get-Help() { Write-Host " -usemonoruntime Product a .NET runtime with Mono as the underlying runtime." Write-Host " -verbosity (-v) MSBuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]." Write-Host " [Default: Minimal]" + Write-Host " --useBootstrap Use the results of building the bootstrap subset to build published tools on the target machine." + Write-Host " --bootstrap Build the bootstrap subset and then build the repo with --use-bootstrap." Write-Host " -vs Open the solution with Visual Studio using the locally acquired SDK." Write-Host " Path or any project or solution name is accepted." Write-Host " (Example: -vs Microsoft.CSharp or -vs CoreCLR.sln)" @@ -330,6 +334,7 @@ foreach ($argument in $PSBoundParameters.Keys) "configuration" {} "arch" {} "fsanitize" { $arguments += " /p:EnableNativeSanitizers=$($PSBoundParameters[$argument])"} + "useBootstrap" { $arguments += " /p:UseBootstrap=$($PSBoundParameters[$argument])" } default { $arguments += " /p:$argument=$($PSBoundParameters[$argument])" } } } @@ -345,6 +350,49 @@ $arguments += " /tl:false" # The later changes are ignored when using the cache. $env:DOTNETSDK_ALLOW_TARGETING_PACK_CACHING=0 +if ($bootstrap -eq $True) { + + if ($actionPassedIn) { + # Filter out all actions + $bootstrapArguments = $(($arguments -split ' ') | Where-Object { + $_ -notmatch '^/p:(' + ($actionPassedIn -join '|') + ')=.*' + }) -join ' ' + + # Preserve Restore and Build if they're passed in + if ($arguments -match "/p:Restore=true") { + $bootstrapArguments += "/p:Restore=true" + } + if ($arguments -match "/p:Build=true") { + $bootstrapArguments += "/p:Build=true" + } + } else { + $bootstrapArguments = $arguments + } + + if ($configuration.Count -gt 1) { + Write-Error "Building the bootstrap build does not support multiple configurations. Please specify a single configuration using -configuration." + exit 1 + } + + if ($arch.Count -gt 1) { + Write-Error "Building the bootstrap build does not support multiple architectures. Please specify a single architecture using -arch." + exit 1 + } + + $bootstrapArguments += " /p:TargetArchitecture=$($arch[0])" + $config = $((Get-Culture).TextInfo.ToTitleCase($configuration[0])) + $bootstrapArguments += " -configuration $config" + + $bootstrapArguments += " /p:Subset=bootstrap /bl:$PSScriptRoot/../artifacts/log/$config/bootstrap.binlog" + Invoke-Expression "& `"$PSScriptRoot/common/build.ps1`" $bootstrapArguments" + + # Remove artifacts from the bootstrap build so the product build is a "clean" build. + Write-Host "Cleaning up artifacts from bootstrap build..." + Remove-Item -Recurse "$PSScriptRoot/../artifacts/bin" + Remove-Item -Recurse "$PSScriptRoot/../artifacts/obj" + $arguments += " /p:UseBootstrap=true" +} + $failedBuilds = @() foreach ($config in $configuration) { diff --git a/eng/build.sh b/eng/build.sh index 2a79304978faae..2fb64c61ff2a7f 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -159,6 +159,7 @@ extraargs=() crossBuild=0 portableBuild=1 bootstrap=0 +bootstrapConfig='Debug' source $scriptroot/common/native/init-os-and-arch.sh @@ -241,6 +242,7 @@ while [[ $# > 0 ]]; do exit 1 ;; esac + bootstrapConfig=$val arguments+=("-configuration" "$val") shift 2 ;; @@ -598,7 +600,7 @@ if [[ "$bootstrap" == "1" ]]; then bootstrapArguments+=("$argument") fi done - "$scriptroot/common/build.sh" ${bootstrapArguments[@]+"${bootstrapArguments[@]}"} /p:Subset=bootstrap -bl:$scriptroot/../artifacts/log/bootstrap.binlog + "$scriptroot/common/build.sh" ${bootstrapArguments[@]+"${bootstrapArguments[@]}"} /p:Subset=bootstrap -bl:$scriptroot/../artifacts/log/$bootstrapConfig/bootstrap.binlog # Remove artifacts from the bootstrap build so the product build is a "clean" build. echo "Cleaning up artifacts from bootstrap build..." diff --git a/src/coreclr/pal/src/thread/process.cpp b/src/coreclr/pal/src/thread/process.cpp index 9b779c0689c5c2..e19dbc72a6e017 100644 --- a/src/coreclr/pal/src/thread/process.cpp +++ b/src/coreclr/pal/src/thread/process.cpp @@ -2826,17 +2826,26 @@ InitializeFlushProcessWriteBuffers() _ASSERTE(s_flushUsingMemBarrier == 0); #if defined(__linux__) || HAVE_SYS_MEMBARRIER_H - // Starting with Linux kernel 4.14, process memory barriers can be generated - // using MEMBARRIER_CMD_PRIVATE_EXPEDITED. - int mask = membarrier(MEMBARRIER_CMD_QUERY, 0, 0); - if (mask >= 0 && - mask & MEMBARRIER_CMD_PRIVATE_EXPEDITED) - { - // Register intent to use the private expedited command. - if (membarrier(MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED, 0, 0) == 0) + +#ifdef TARGET_ANDROID + // Avoid calling membarrier on older Android versions where membarrier + // may be barred by seccomp causing the process to be killed. + int apiLevel = android_get_device_api_level(); + if (apiLevel >= __ANDROID_API_Q__) +#endif + { + // Starting with Linux kernel 4.14, process memory barriers can be generated + // using MEMBARRIER_CMD_PRIVATE_EXPEDITED. + int mask = membarrier(MEMBARRIER_CMD_QUERY, 0, 0); + if (mask >= 0 && + mask & MEMBARRIER_CMD_PRIVATE_EXPEDITED) { - s_flushUsingMemBarrier = TRUE; - return TRUE; + // Register intent to use the private expedited command. + if (membarrier(MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED, 0, 0) == 0) + { + s_flushUsingMemBarrier = TRUE; + return TRUE; + } } } #endif diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/AnalyzedExternalTypeMapNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/AnalyzedExternalTypeMapNode.cs index b62b3da716dc28..a0c397a6180afe 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/AnalyzedExternalTypeMapNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/AnalyzedExternalTypeMapNode.cs @@ -21,7 +21,7 @@ public Vertex CreateTypeMap(NodeFactory factory, NativeWriter writer, Section se foreach ((string key, TypeDesc type) in entries) { Vertex keyVertex = writer.GetStringConstant(key); - Vertex valueVertex = writer.GetUnsignedConstant(externalReferences.GetIndex(factory.MaximallyConstructableType(type))); + Vertex valueVertex = writer.GetUnsignedConstant(externalReferences.GetIndex(factory.MetadataTypeSymbol(type))); Vertex entry = writer.GetTuple(keyVertex, valueVertex); typeMapHashTable.Append((uint)TypeHashingAlgorithms.ComputeNameHashCode(key), section.Place(entry)); } @@ -37,7 +37,7 @@ public override IEnumerable GetStaticDependencies(NodeFacto { foreach (TypeDesc targetType in entries.Values) { - yield return new DependencyListEntry(context.MaximallyConstructableType(targetType), "Analyzed external type map entry target type"); + yield return new DependencyListEntry(context.MetadataTypeSymbol(targetType), "Analyzed external type map entry target type"); } } public override IEnumerable SearchDynamicDependencies(List> markedNodes, int firstNode, NodeFactory context) => []; diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/AnalyzedProxyTypeMapNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/AnalyzedProxyTypeMapNode.cs index 7d19848d23ebb0..1689bc15716e59 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/AnalyzedProxyTypeMapNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/AnalyzedProxyTypeMapNode.cs @@ -21,7 +21,7 @@ public Vertex CreateTypeMap(NodeFactory factory, NativeWriter writer, Section se foreach ((TypeDesc key, TypeDesc type) in entries) { Vertex keyVertex = writer.GetUnsignedConstant(externalReferences.GetIndex(factory.MaximallyConstructableType(key))); - Vertex valueVertex = writer.GetUnsignedConstant(externalReferences.GetIndex(factory.MaximallyConstructableType(type))); + Vertex valueVertex = writer.GetUnsignedConstant(externalReferences.GetIndex(factory.MetadataTypeSymbol(type))); Vertex entry = writer.GetTuple(keyVertex, valueVertex); typeMapHashTable.Append((uint)key.GetHashCode(), section.Place(entry)); } @@ -38,7 +38,7 @@ public override IEnumerable GetStaticDependencies(NodeFacto foreach (var (sourceType, proxyType) in entries) { yield return new DependencyListEntry(context.MaximallyConstructableType(sourceType), "Analyzed proxy type map entry source type"); - yield return new DependencyListEntry(context.MaximallyConstructableType(proxyType), "Analyzed proxy type map entry proxy type"); + yield return new DependencyListEntry(context.MetadataTypeSymbol(proxyType), "Analyzed proxy type map entry proxy type"); } } public override IEnumerable SearchDynamicDependencies(List> markedNodes, int firstNode, NodeFactory context) => []; diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ExternalTypeMapNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ExternalTypeMapNode.cs index a3f8671cc2ff3e..2d23d46991f93f 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ExternalTypeMapNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ExternalTypeMapNode.cs @@ -39,7 +39,7 @@ public override IEnumerable GetConditionalStaticDep if (trimmingTargetType is not null) { yield return new CombinedDependencyListEntry( - context.MaximallyConstructableType(targetType), + context.MetadataTypeSymbol(targetType), context.NecessaryTypeSymbol(trimmingTargetType), "Type in external type map is cast target"); } @@ -54,7 +54,7 @@ public override IEnumerable GetStaticDependencies(NodeFacto if (trimmingTargetType is null) { yield return new DependencyListEntry( - context.MaximallyConstructableType(targetType), + context.MetadataTypeSymbol(targetType), "External type map entry target type"); } } @@ -80,7 +80,7 @@ public int CompareToImpl(ISortableNode other, CompilerComparer comparer) if (trimmingTargetType is null || factory.NecessaryTypeSymbol(trimmingTargetType).Marked) { - IEETypeNode targetNode = factory.MaximallyConstructableType(targetType); + IEETypeNode targetNode = factory.MetadataTypeSymbol(targetType); Debug.Assert(targetNode.Marked); yield return (entry.Key, targetNode); } diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ProxyTypeMapNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ProxyTypeMapNode.cs index a131677a776be6..39ed1b885cff61 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ProxyTypeMapNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ProxyTypeMapNode.cs @@ -43,7 +43,7 @@ public override IEnumerable GetConditionalStaticDep foreach (var (key, value) in _mapEntries) { yield return new CombinedDependencyListEntry( - context.MaximallyConstructableType(value), + context.MetadataTypeSymbol(value), context.MaximallyConstructableType(key), "Proxy type map entry"); } @@ -60,7 +60,7 @@ public override IEnumerable GetConditionalStaticDep IEETypeNode keyNode = factory.MaximallyConstructableType(key); if (keyNode.Marked) { - IEETypeNode valueNode = factory.MaximallyConstructableType(value); + IEETypeNode valueNode = factory.MetadataTypeSymbol(value); Debug.Assert(valueNode.Marked); yield return (keyNode, valueNode); } diff --git a/src/coreclr/vm/hostinformation.cpp b/src/coreclr/vm/hostinformation.cpp index 4d85f74671d7dd..acaa23bb141848 100644 --- a/src/coreclr/vm/hostinformation.cpp +++ b/src/coreclr/vm/hostinformation.cpp @@ -45,7 +45,8 @@ bool HostInformation::GetProperty(_In_z_ const char* name, SString& value) bool HostInformation::HasExternalProbe() { - return s_hostContract.external_assembly_probe != nullptr; + size_t requiredSize = offsetof(host_runtime_contract, external_assembly_probe) + sizeof(s_hostContract.external_assembly_probe); + return s_hostContract.size >= requiredSize && s_hostContract.external_assembly_probe != nullptr; } bool HostInformation::ExternalAssemblyProbe(_In_ const SString& path, _Out_ void** data, _Out_ int64_t* size) diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj b/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj index cae5396e768efb..43ae1221530afb 100644 --- a/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj +++ b/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj @@ -20,9 +20,16 @@ <_generateRuntimeGraphTask>$([MSBuild]::NormalizePath('$(BaseOutputPath)', $(Configuration), '$(_generateRuntimeGraphTargetFramework)', '$(AssemblyName).dll')) - - - + + + + diff --git a/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.netcore.cs b/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.netcore.cs index ebe7a37a7de8ed..4847b33842bb4b 100644 --- a/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.netcore.cs +++ b/src/libraries/System.Numerics.Tensors/ref/System.Numerics.Tensors.netcore.cs @@ -206,6 +206,7 @@ public void FlattenTo(scoped System.Span destination) { } public System.Numerics.Tensors.ReadOnlyTensorSpan Slice(params scoped System.ReadOnlySpan ranges) { throw null; } public System.Numerics.Tensors.ReadOnlyTensorSpan Slice(params scoped System.ReadOnlySpan startIndexes) { throw null; } public override string ToString() { throw null; } + public string ToString(params scoped System.ReadOnlySpan maximumLengths) { throw null; } public bool TryCopyTo(scoped in System.Numerics.Tensors.TensorSpan destination) { throw null; } public bool TryFlattenTo(scoped System.Span destination) { throw null; } public bool TryGetSpan(scoped System.ReadOnlySpan startIndexes, int length, out System.ReadOnlySpan span) { throw null; } @@ -570,9 +571,6 @@ public static void ResizeTo(scoped in System.Numerics.Tensors.Tensor tenso public static ref readonly System.Numerics.Tensors.TensorSpan TanPi(scoped in System.Numerics.Tensors.ReadOnlyTensorSpan x, in System.Numerics.Tensors.TensorSpan destination) where T : System.Numerics.ITrigonometricFunctions { throw null; } public static System.Numerics.Tensors.Tensor Tan(in System.Numerics.Tensors.ReadOnlyTensorSpan x) where T : System.Numerics.ITrigonometricFunctions { throw null; } public static ref readonly System.Numerics.Tensors.TensorSpan Tan(scoped in System.Numerics.Tensors.ReadOnlyTensorSpan x, in System.Numerics.Tensors.TensorSpan destination) where T : System.Numerics.ITrigonometricFunctions { throw null; } - public static string ToString(this in System.Numerics.Tensors.ReadOnlyTensorSpan tensor, System.ReadOnlySpan maximumLengths) { throw null; } - public static string ToString(this in System.Numerics.Tensors.TensorSpan tensor, System.ReadOnlySpan maximumLengths) { throw null; } - public static string ToString(this System.Numerics.Tensors.Tensor tensor, System.ReadOnlySpan maximumLengths) { throw null; } public static System.Numerics.Tensors.Tensor TrailingZeroCount(in System.Numerics.Tensors.ReadOnlyTensorSpan x) where T : System.Numerics.IBinaryInteger { throw null; } public static ref readonly System.Numerics.Tensors.TensorSpan TrailingZeroCount(scoped in System.Numerics.Tensors.ReadOnlyTensorSpan x, in System.Numerics.Tensors.TensorSpan destination) where T : System.Numerics.IBinaryInteger { throw null; } public static System.Numerics.Tensors.Tensor Transpose(System.Numerics.Tensors.Tensor tensor) { throw null; } @@ -1218,6 +1216,7 @@ public void FlattenTo(scoped System.Span destination) { } public System.Numerics.Tensors.TensorSpan Slice(params scoped System.ReadOnlySpan ranges) { throw null; } public System.Numerics.Tensors.TensorSpan Slice(params scoped System.ReadOnlySpan startIndexes) { throw null; } public override string ToString() { throw null; } + public string ToString(params scoped System.ReadOnlySpan maximumLengths) { throw null; } public bool TryCopyTo(scoped in System.Numerics.Tensors.TensorSpan destination) { throw null; } public bool TryFlattenTo(scoped System.Span destination) { throw null; } public bool TryGetSpan(scoped System.ReadOnlySpan startIndexes, int length, out System.Span span) { throw null; } @@ -1297,6 +1296,7 @@ void System.Numerics.Tensors.ITensor.Fill(object value) { } static System.Numerics.Tensors.Tensor System.Numerics.Tensors.ITensor, T>.CreateFromShapeUninitialized(scoped System.ReadOnlySpan lengths, bool pinned) { throw null; } static System.Numerics.Tensors.Tensor System.Numerics.Tensors.ITensor, T>.CreateFromShapeUninitialized(scoped System.ReadOnlySpan lengths, scoped System.ReadOnlySpan strides, bool pinned) { throw null; } public System.Numerics.Tensors.Tensor ToDenseTensor() { throw null; } + public override string ToString() { throw null; } public string ToString(params scoped System.ReadOnlySpan maximumLengths) { throw null; } public bool TryCopyTo(scoped in System.Numerics.Tensors.TensorSpan destination) { throw null; } public bool TryFlattenTo(scoped System.Span destination) { throw null; } diff --git a/src/libraries/System.Numerics.Tensors/src/CompatibilitySuppressions.xml b/src/libraries/System.Numerics.Tensors/src/CompatibilitySuppressions.xml index b9631acb2d7041..cbc50b64ff0de3 100644 --- a/src/libraries/System.Numerics.Tensors/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Numerics.Tensors/src/CompatibilitySuppressions.xml @@ -176,6 +176,27 @@ lib/net8.0/System.Numerics.Tensors.dll true + + CP0002 + M:System.Numerics.Tensors.Tensor.ToString``1(System.Numerics.Tensors.ReadOnlyTensorSpan{``0}@,System.ReadOnlySpan{System.IntPtr}) + lib/net8.0/System.Numerics.Tensors.dll + lib/net8.0/System.Numerics.Tensors.dll + true + + + CP0002 + M:System.Numerics.Tensors.Tensor.ToString``1(System.Numerics.Tensors.Tensor{``0},System.ReadOnlySpan{System.IntPtr}) + lib/net8.0/System.Numerics.Tensors.dll + lib/net8.0/System.Numerics.Tensors.dll + true + + + CP0002 + M:System.Numerics.Tensors.Tensor.ToString``1(System.Numerics.Tensors.TensorSpan{``0}@,System.ReadOnlySpan{System.IntPtr}) + lib/net8.0/System.Numerics.Tensors.dll + lib/net8.0/System.Numerics.Tensors.dll + true + CP0002 M:System.Numerics.Tensors.Tensor`1.get_Item(System.Numerics.Tensors.Tensor{System.Boolean}) @@ -379,6 +400,27 @@ lib/net9.0/System.Numerics.Tensors.dll true + + CP0002 + M:System.Numerics.Tensors.Tensor.ToString``1(System.Numerics.Tensors.ReadOnlyTensorSpan{``0}@,System.ReadOnlySpan{System.IntPtr}) + lib/net9.0/System.Numerics.Tensors.dll + lib/net9.0/System.Numerics.Tensors.dll + true + + + CP0002 + M:System.Numerics.Tensors.Tensor.ToString``1(System.Numerics.Tensors.Tensor{``0},System.ReadOnlySpan{System.IntPtr}) + lib/net9.0/System.Numerics.Tensors.dll + lib/net9.0/System.Numerics.Tensors.dll + true + + + CP0002 + M:System.Numerics.Tensors.Tensor.ToString``1(System.Numerics.Tensors.TensorSpan{``0}@,System.ReadOnlySpan{System.IntPtr}) + lib/net9.0/System.Numerics.Tensors.dll + lib/net9.0/System.Numerics.Tensors.dll + true + CP0002 M:System.Numerics.Tensors.Tensor`1.get_Item(System.Numerics.Tensors.Tensor{System.Boolean}) diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ReadOnlyTensorSpan_1.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ReadOnlyTensorSpan_1.cs index 931428fd3090d6..dbc60893e25672 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ReadOnlyTensorSpan_1.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/ReadOnlyTensorSpan_1.cs @@ -432,9 +432,20 @@ ref Unsafe.Add(ref _reference, linearOffset), ); } - /// Returns the string representation of the tensor span. - /// The string representation of the tensor span. - public override string ToString() => $"System.Numerics.Tensors.ReadOnlyTensorSpan<{typeof(T).Name}>[{_shape}]"; + /// Returns the string representation of the tensor. + /// The string representation of the tensor. + /// This API only lists the shape of the tensor, it does not include the contents. + public override string ToString() => ToString([]); + + /// Creates a representation of the tensor. + /// The maximum number of elements to print for each dimension of the tensor. + /// A representation of the tensor. + /// is not empty and does not contain elements. + /// + /// No contents will be printed if is empty. + /// If a given dimension contains more elements then the corresponding limit specified by , remaining elements will be represented by ... + /// + public string ToString(params scoped ReadOnlySpan maximumLengths) => Tensor.ToString(this, maximumLengths, "System.Numerics.Tensors.ReadOnlyTensorSpan"); /// public bool TryCopyTo(scoped in TensorSpan destination) diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor.cs index 8bc145f8e0e042..c6e4e116744fbd 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor.cs @@ -2064,98 +2064,147 @@ public static ref readonly TensorSpan StackAlongDimension(scoped ReadOnlyS #endregion #region ToString - /// - /// Creates a representation of the ."/> - /// - /// The you want to represent as a string. - /// Maximum Length of each dimension - /// A representation of the - public static string ToString(this in TensorSpan tensor, ReadOnlySpan maximumLengths) - => tensor.AsReadOnlyTensorSpan().ToString(maximumLengths); - - /// - /// Creates a representation of the ."/> - /// - /// - /// The you want to represent as a string. - /// Maximum Length of each dimension - public static string ToString(this in ReadOnlyTensorSpan tensor, ReadOnlySpan maximumLengths) + internal static string ToString(in ReadOnlyTensorSpan tensor, ReadOnlySpan maximumLengths, string typeName) { - if (maximumLengths.Length != tensor.Rank) + if (!maximumLengths.IsEmpty) { - ThrowHelper.ThrowArgument_DimensionsNotSame(nameof(tensor)); + ArgumentOutOfRangeException.ThrowIfNotEqual(maximumLengths.Length, tensor.Rank); } - StringBuilder sb = new(); - ToString(in tensor, maximumLengths, sb); - return sb.ToString(); - } + var sb = new StringBuilder(typeName); - internal static void ToString(in ReadOnlyTensorSpan tensor, ReadOnlySpan maximumLengths, StringBuilder sb, int indentLevel = 0) - { - Debug.Assert(maximumLengths.Length != tensor.Rank); + sb.Append('<'); + sb.Append(typeof(T).Name); + sb.Append('>'); - sb.Append(' ', indentLevel * 2); sb.Append('['); + sb.AppendJoin(", ", tensor.Lengths); + sb.Append(']'); - if (tensor.Rank != 0) + if (!maximumLengths.IsEmpty) { - nint length = nint.Max(tensor.Lengths[0], maximumLengths[0]); + sb.AppendLine(" {"); - if (tensor.Rank != 1) + if (tensor.Rank == 1) { - string separator = string.Empty; - - for (nint i = 0; i < length; i++) - { - sb.AppendLine(separator); + nint length = nint.Min(tensor.Lengths[0], maximumLengths[0]); + ToString(tensor, length, sb, indentLevel: 1); + sb.AppendLine(); + } + else + { + ToString(tensor, maximumLengths, sb); + } - TensorShape tmpShape = TensorShape.Create(tensor.Lengths[1..], tensor.Strides[1..], tensor.IsPinned); - ReadOnlyTensorSpan tmpTensor = new ReadOnlyTensorSpan(ref Unsafe.Add(ref tensor._reference, i * tensor.Strides[0]), tmpShape); - ToString(tmpTensor, maximumLengths[1..], sb, indentLevel + 1); + sb.Append('}'); + } + return sb.ToString(); + } - separator = ","; - } + private static void ToString(in ReadOnlyTensorSpan tensor, ReadOnlySpan maximumLengths, StringBuilder sb, int indentLevel = 0) + { + nint length = nint.Min(tensor.Lengths[0], maximumLengths[0]); - if (length != tensor.Lengths[0]) - { - sb.AppendLine(separator); - sb.Append(' ', indentLevel * 2); - sb.AppendLine("..."); - } + if (indentLevel != 0) + { + if (tensor.Rank != 1) + { + sb.Append(' ', indentLevel * 2); + sb.AppendLine("["); } else { - string separator = " "; + ToString(tensor, length, sb, indentLevel); + return; + } + } - for (nint i = 0; i < length; i++) - { - sb.Append(separator); - sb.Append(Unsafe.Add(ref tensor._reference, i)); - separator = ", "; - } + if (length != 0) + { + TensorShape tmpShape = TensorShape.Create(tensor.Lengths[1..], tensor.Strides[1..], tensor.IsPinned); - if (length != tensor.Lengths[0]) - { - sb.Append(separator); - sb.Append("..."); - } + ReadOnlyTensorSpan tmpTensor = new ReadOnlyTensorSpan(ref tensor._reference, tmpShape); + ToString(tmpTensor, maximumLengths[1..], sb, indentLevel + 1); - sb.Append(separator); + for (nint i = 1; i < length; i++) + { + sb.AppendLine(","); + tmpTensor = new ReadOnlyTensorSpan(ref Unsafe.Add(ref tensor._reference, i * tensor.Strides[0]), tmpShape); + ToString(tmpTensor, maximumLengths[1..], sb, indentLevel + 1); } + + if (length != tensor.Lengths[0]) + { + sb.AppendLine(","); + sb.Append(' ', (indentLevel + 1) * 2); + sb.Append(".."); + } + sb.AppendLine(); } + else + { + sb.Append(' ', (indentLevel + 1) * 2); + sb.AppendLine(".."); + } + sb.Append(' ', indentLevel * 2); + + if (indentLevel != 0) + { + sb.Append(']'); + } + } + + private static void ToString(in ReadOnlyTensorSpan tensor, nint length, StringBuilder sb, int indentLevel) + { + sb.Append(' ', indentLevel * 2); + sb.Append('['); + + if (length != 0) + { + sb.Append(tensor._reference); + + for (nint i = 1; i < length; i++) + { + sb.Append(", "); + sb.Append(Unsafe.Add(ref tensor._reference, i)); + } + + if (length != tensor.Lengths[0]) + { + sb.Append(", .."); + } + } + else + { + sb.Append(".."); + } + sb.Append(']'); } - /// - /// Creates a representation of the ."/> - /// - /// The you want to represent as a string. - /// Maximum Length of each dimension - /// A representation of the - public static string ToString(this Tensor tensor, ReadOnlySpan maximumLengths) - => tensor.AsReadOnlyTensorSpan().ToString(maximumLengths); + private static StringBuilder AppendJoin(this StringBuilder sb, string separator, ReadOnlySpan values) + { + if (values.IsEmpty) + { + return sb; + } + if (values[0] is not null) + { + sb.Append(values[0]); + } + + for (int i = 1; i < values.Length; i++) + { + sb.Append(separator); + + if (values[i] is not null) + { + sb.Append(values[i]); + } + } + return sb; + } #endregion #region Transpose diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorSpan_1.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorSpan_1.cs index fe2778077a0f2e..e13655b0ca15dc 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorSpan_1.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorSpan_1.cs @@ -328,8 +328,11 @@ ref Unsafe.Add(ref _reference, linearOffset), ); } - /// - public override string ToString() => $"System.Numerics.Tensors.TensorSpan<{typeof(T).Name}>[{_shape}]"; + /// + public override string ToString() => ToString([]); + + /// + public string ToString(params scoped ReadOnlySpan maximumLengths) => Tensor.ToString(AsReadOnlyTensorSpan(), maximumLengths, "System.Numerics.Tensors.TensorSpan"); /// public bool TryCopyTo(scoped in TensorSpan destination) => AsReadOnlyTensorSpan().TryCopyTo(destination); diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor_1.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor_1.cs index 17e42e4aec08c0..b475cd2a2e66e4 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor_1.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/Tensor_1.cs @@ -288,21 +288,11 @@ public Tensor ToDenseTensor() /// public bool TryGetSpan(scoped ReadOnlySpan startIndexes, int length, out ReadOnlySpan span) => AsReadOnlyTensorSpan().TryGetSpan(startIndexes, length, out span); - /// - /// Creates a representation of the ."/> - /// - /// Maximum Length of each dimension - /// A representation of the - public string ToString(params ReadOnlySpan maximumLengths) - { - var sb = new StringBuilder($"System.Numerics.Tensors.Tensor<{typeof(T).Name}>[{_shape}]"); - - sb.AppendLine("{"); - Tensor.ToString(AsReadOnlyTensorSpan(), maximumLengths, sb); - sb.AppendLine("}"); + /// + public override string ToString() => ToString([]); - return sb.ToString(); - } + /// + public string ToString(params scoped ReadOnlySpan maximumLengths) => Tensor.ToString(AsReadOnlyTensorSpan(), maximumLengths, "System.Numerics.Tensors.Tensor"); // // IEnumerable diff --git a/src/libraries/System.Numerics.Tensors/tests/ReadOnlyTensorSpanTests.cs b/src/libraries/System.Numerics.Tensors/tests/ReadOnlyTensorSpanTests.cs index 939c76a9084a6c..bce2ad21e05d6c 100644 --- a/src/libraries/System.Numerics.Tensors/tests/ReadOnlyTensorSpanTests.cs +++ b/src/libraries/System.Numerics.Tensors/tests/ReadOnlyTensorSpanTests.cs @@ -1304,5 +1304,138 @@ public static void TryGetSpanFailsForInvalidLengthsTest() Assert.False(ReadOnlyTensorSpan.TryGetSpan([3, 3], 2, out span)); Assert.Equal(0, span.Length); } + + [Fact] + public static void ToStringTest() + { + ReadOnlyTensorSpan tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); + string expected = "System.Numerics.Tensors.ReadOnlyTensorSpan[5]"; + Assert.Equal(expected, tensor.ToString()); + + tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); + expected = "System.Numerics.Tensors.ReadOnlyTensorSpan[2, 2]"; + Assert.Equal(expected, tensor.ToString()); + + tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); + expected = "System.Numerics.Tensors.ReadOnlyTensorSpan[3, 3, 3]"; + Assert.Equal(expected, tensor.ToString()); + } + + [Fact] + public static void ToStringAllDataTest() + { + ReadOnlyTensorSpan tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); + string expected = """ + System.Numerics.Tensors.ReadOnlyTensorSpan[5] { + [1, 2, 3, 4, 5] + } + """; + Assert.Equal(expected, tensor.ToString([5])); + + tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); + expected = """ + System.Numerics.Tensors.ReadOnlyTensorSpan[2, 2] { + [1, 2], + [3, 4] + } + """; + Assert.Equal(expected, tensor.ToString([2, 2])); + + tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); + expected = """ + System.Numerics.Tensors.ReadOnlyTensorSpan[3, 3, 3] { + [ + [1, 2, 3], + [4, 5, 6], + [7, 8, 9] + ], + [ + [10, 11, 12], + [13, 14, 15], + [16, 17, 18] + ], + [ + [19, 20, 21], + [22, 23, 24], + [25, 26, 27] + ] + } + """; + Assert.Equal(expected, tensor.ToString([3, 3, 3])); + } + + [Fact] + public static void ToStringPartialDataTest() + { + ReadOnlyTensorSpan tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); + string expected = """ + System.Numerics.Tensors.ReadOnlyTensorSpan[5] { + [1, 2, 3, ..] + } + """; + Assert.Equal(expected, tensor.ToString([3])); + + tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); + expected = """ + System.Numerics.Tensors.ReadOnlyTensorSpan[2, 2] { + [1, ..], + [3, ..] + } + """; + Assert.Equal(expected, tensor.ToString([2, 1])); + + tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); + expected = """ + System.Numerics.Tensors.ReadOnlyTensorSpan[3, 3, 3] { + [ + [1, 2, ..], + [4, 5, ..], + .. + ], + [ + [10, 11, ..], + [13, 14, ..], + .. + ], + .. + } + """; + Assert.Equal(expected, tensor.ToString([2, 2, 2])); + } + + [Fact] + public static void ToStringZeroDataTest() + { + ReadOnlyTensorSpan tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); + string expected = """ + System.Numerics.Tensors.ReadOnlyTensorSpan[5] { + [..] + } + """; + Assert.Equal(expected, tensor.ToString([0])); + + tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); + expected = """ + System.Numerics.Tensors.ReadOnlyTensorSpan[2, 2] { + [..], + [..] + } + """; + Assert.Equal(expected, tensor.ToString([2, 0])); + + tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); + expected = """ + System.Numerics.Tensors.ReadOnlyTensorSpan[3, 3, 3] { + [ + .. + ], + [ + .. + ], + .. + } + """; + Assert.Equal(expected, tensor.ToString([2, 0, 2])); + } } } diff --git a/src/libraries/System.Numerics.Tensors/tests/TensorSpanTests.cs b/src/libraries/System.Numerics.Tensors/tests/TensorSpanTests.cs index 0d6a5fea0d03e7..2e8e69c4b336a0 100644 --- a/src/libraries/System.Numerics.Tensors/tests/TensorSpanTests.cs +++ b/src/libraries/System.Numerics.Tensors/tests/TensorSpanTests.cs @@ -1944,5 +1944,138 @@ public static void TryGetSpanFailsForInvalidLengthsTest() Assert.False(tensorSpan.TryGetSpan([3, 3], 2, out span)); Assert.Equal(0, span.Length); } + + [Fact] + public static void ToStringTest() + { + TensorSpan tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); + string expected = "System.Numerics.Tensors.TensorSpan[5]"; + Assert.Equal(expected, tensor.ToString()); + + tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); + expected = "System.Numerics.Tensors.TensorSpan[2, 2]"; + Assert.Equal(expected, tensor.ToString()); + + tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); + expected = "System.Numerics.Tensors.TensorSpan[3, 3, 3]"; + Assert.Equal(expected, tensor.ToString()); + } + + [Fact] + public static void ToStringAllDataTest() + { + TensorSpan tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); + string expected = """ + System.Numerics.Tensors.TensorSpan[5] { + [1, 2, 3, 4, 5] + } + """; + Assert.Equal(expected, tensor.ToString([5])); + + tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); + expected = """ + System.Numerics.Tensors.TensorSpan[2, 2] { + [1, 2], + [3, 4] + } + """; + Assert.Equal(expected, tensor.ToString([2, 2])); + + tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); + expected = """ + System.Numerics.Tensors.TensorSpan[3, 3, 3] { + [ + [1, 2, 3], + [4, 5, 6], + [7, 8, 9] + ], + [ + [10, 11, 12], + [13, 14, 15], + [16, 17, 18] + ], + [ + [19, 20, 21], + [22, 23, 24], + [25, 26, 27] + ] + } + """; + Assert.Equal(expected, tensor.ToString([3, 3, 3])); + } + + [Fact] + public static void ToStringPartialDataTest() + { + TensorSpan tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); + string expected = """ + System.Numerics.Tensors.TensorSpan[5] { + [1, 2, 3, ..] + } + """; + Assert.Equal(expected, tensor.ToString([3])); + + tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); + expected = """ + System.Numerics.Tensors.TensorSpan[2, 2] { + [1, ..], + [3, ..] + } + """; + Assert.Equal(expected, tensor.ToString([2, 1])); + + tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); + expected = """ + System.Numerics.Tensors.TensorSpan[3, 3, 3] { + [ + [1, 2, ..], + [4, 5, ..], + .. + ], + [ + [10, 11, ..], + [13, 14, ..], + .. + ], + .. + } + """; + Assert.Equal(expected, tensor.ToString([2, 2, 2])); + } + + [Fact] + public static void ToStringZeroDataTest() + { + TensorSpan tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); + string expected = """ + System.Numerics.Tensors.TensorSpan[5] { + [..] + } + """; + Assert.Equal(expected, tensor.ToString([0])); + + tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); + expected = """ + System.Numerics.Tensors.TensorSpan[2, 2] { + [..], + [..] + } + """; + Assert.Equal(expected, tensor.ToString([2, 0])); + + tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); + expected = """ + System.Numerics.Tensors.TensorSpan[3, 3, 3] { + [ + .. + ], + [ + .. + ], + .. + } + """; + Assert.Equal(expected, tensor.ToString([2, 0, 2])); + } } } diff --git a/src/libraries/System.Numerics.Tensors/tests/TensorTests.cs b/src/libraries/System.Numerics.Tensors/tests/TensorTests.cs index a9568abafac06e..22c86fbbeb695e 100644 --- a/src/libraries/System.Numerics.Tensors/tests/TensorTests.cs +++ b/src/libraries/System.Numerics.Tensors/tests/TensorTests.cs @@ -3056,5 +3056,138 @@ public static void TryGetSpanFailsForInvalidLengthsTest() Assert.False(tensorSpan.TryGetSpan([3, 3], 2, out span)); Assert.Equal(0, span.Length); } + + [Fact] + public static void ToStringTest() + { + Tensor tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); + string expected = "System.Numerics.Tensors.Tensor[5]"; + Assert.Equal(expected, tensor.ToString()); + + tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); + expected = "System.Numerics.Tensors.Tensor[2, 2]"; + Assert.Equal(expected, tensor.ToString()); + + tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); + expected = "System.Numerics.Tensors.Tensor[3, 3, 3]"; + Assert.Equal(expected, tensor.ToString()); + } + + [Fact] + public static void ToStringAllDataTest() + { + Tensor tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); + string expected = """ + System.Numerics.Tensors.Tensor[5] { + [1, 2, 3, 4, 5] + } + """; + Assert.Equal(expected, tensor.ToString([5])); + + tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); + expected = """ + System.Numerics.Tensors.Tensor[2, 2] { + [1, 2], + [3, 4] + } + """; + Assert.Equal(expected, tensor.ToString([2, 2])); + + tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); + expected = """ + System.Numerics.Tensors.Tensor[3, 3, 3] { + [ + [1, 2, 3], + [4, 5, 6], + [7, 8, 9] + ], + [ + [10, 11, 12], + [13, 14, 15], + [16, 17, 18] + ], + [ + [19, 20, 21], + [22, 23, 24], + [25, 26, 27] + ] + } + """; + Assert.Equal(expected, tensor.ToString([3, 3, 3])); + } + + [Fact] + public static void ToStringPartialDataTest() + { + Tensor tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); + string expected = """ + System.Numerics.Tensors.Tensor[5] { + [1, 2, 3, ..] + } + """; + Assert.Equal(expected, tensor.ToString([3])); + + tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); + expected = """ + System.Numerics.Tensors.Tensor[2, 2] { + [1, ..], + [3, ..] + } + """; + Assert.Equal(expected, tensor.ToString([2, 1])); + + tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); + expected = """ + System.Numerics.Tensors.Tensor[3, 3, 3] { + [ + [1, 2, ..], + [4, 5, ..], + .. + ], + [ + [10, 11, ..], + [13, 14, ..], + .. + ], + .. + } + """; + Assert.Equal(expected, tensor.ToString([2, 2, 2])); + } + + [Fact] + public static void ToStringZeroDataTest() + { + Tensor tensor = Tensor.Create([1, 2, 3, 4, 5], lengths: [5]); + string expected = """ + System.Numerics.Tensors.Tensor[5] { + [..] + } + """; + Assert.Equal(expected, tensor.ToString([0])); + + tensor = Tensor.Create([1, 2, 3, 4], lengths: [2, 2]); + expected = """ + System.Numerics.Tensors.Tensor[2, 2] { + [..], + [..] + } + """; + Assert.Equal(expected, tensor.ToString([2, 0])); + + tensor = Tensor.Create(Enumerable.Range(1, 27).ToArray(), lengths: [3, 3, 3]); + expected = """ + System.Numerics.Tensors.Tensor[3, 3, 3] { + [ + .. + ], + [ + .. + ], + .. + } + """; + Assert.Equal(expected, tensor.ToString([2, 0, 2])); + } } } diff --git a/src/libraries/System.Security.Cryptography/tests/X509Certificates/ChainTests.cs b/src/libraries/System.Security.Cryptography/tests/X509Certificates/ChainTests.cs index 38c36ec904d419..99b9b3587532ef 100644 --- a/src/libraries/System.Security.Cryptography/tests/X509Certificates/ChainTests.cs +++ b/src/libraries/System.Security.Cryptography/tests/X509Certificates/ChainTests.cs @@ -1112,6 +1112,7 @@ public static void BuildChainForFraudulentCertificate() } [Fact] + [SkipOnPlatform(TestPlatforms.Linux, "Not supported on Linux.")] public static void BuildChainForCertificateSignedWithDisallowedKey() { // The intermediate certificate is from the now defunct CA DigiNotar. @@ -1177,12 +1178,11 @@ public static void BuildChainForCertificateSignedWithDisallowedKey() chain.ChainPolicy.ExtraStore.Add(intermediateCert); Assert.False(chain.Build(cert)); - if (PlatformDetection.IsAndroid || PlatformDetection.IsApplePlatform26OrLater || PlatformDetection.IsLinux) + if (PlatformDetection.IsAndroid || PlatformDetection.IsApplePlatform26OrLater) { // Android always validates trust as part of building a path, // so violations comes back as PartialChain with no elements // Apple 26 no longer block these SKIs since the roots are no longer trusted at all and are expired. - // Linux has no concept of a blocked key list, they just remove certificates from a trust store. Assert.Equal(X509ChainStatusFlags.PartialChain, chain.AllStatusFlags()); } else diff --git a/src/tasks/Crossgen2Tasks/Crossgen2Tasks.csproj b/src/tasks/Crossgen2Tasks/Crossgen2Tasks.csproj index 1805aad4e3adc8..9f4bd49c18320a 100644 --- a/src/tasks/Crossgen2Tasks/Crossgen2Tasks.csproj +++ b/src/tasks/Crossgen2Tasks/Crossgen2Tasks.csproj @@ -9,10 +9,17 @@ - - - - + + + + + + + + diff --git a/src/tasks/installer.tasks/installer.tasks.csproj b/src/tasks/installer.tasks/installer.tasks.csproj index 031a237ecc1860..3baf62258c474a 100644 --- a/src/tasks/installer.tasks/installer.tasks.csproj +++ b/src/tasks/installer.tasks/installer.tasks.csproj @@ -7,7 +7,11 @@ - + + + + diff --git a/src/tests/nativeaot/SmokeTests/TrimmingBehaviors/DeadCodeElimination.cs b/src/tests/nativeaot/SmokeTests/TrimmingBehaviors/DeadCodeElimination.cs index fa3417f7a78400..7a58963a2788fd 100644 --- a/src/tests/nativeaot/SmokeTests/TrimmingBehaviors/DeadCodeElimination.cs +++ b/src/tests/nativeaot/SmokeTests/TrimmingBehaviors/DeadCodeElimination.cs @@ -7,6 +7,10 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +[assembly: TypeMap("Foo", typeof(DeadCodeElimination.TestInteropMapTrimming.ConditionalTypeMapEntry), typeof(DeadCodeElimination.TestInteropMapTrimming.TypeMapTrimTarget))] +[assembly: TypeMap("Bar", typeof(DeadCodeElimination.TestInteropMapTrimming.UnconditionalTypeMapEntry))] +[assembly: TypeMapAssociation(typeof(DeadCodeElimination.TestInteropMapTrimming.SourceType), typeof(DeadCodeElimination.TestInteropMapTrimming.ProxyType))] + class DeadCodeElimination { public static int Run() @@ -36,6 +40,7 @@ public static int Run() TestInvisibleGenericsTrimming.Run(); TestTypeHandlesInGenericDictionaries.Run(); TestMetadataMethodTables.Run(); + TestInteropMapTrimming.Run(); return 100; } @@ -1267,6 +1272,59 @@ public static void Run() } } + internal class TestInteropMapTrimming + { + internal class Universe; + + internal class ConditionalTypeMapEntry; + internal class UnconditionalTypeMapEntry; + internal class TypeMapTrimTarget; + + internal class SourceType; + internal class ProxyType; + + [MethodImpl(MethodImplOptions.NoInlining)] + static object GetUnknown() => null; + + [MethodImpl(MethodImplOptions.NoInlining)] + static void Consume(object o) { } + + public static void Run() + { + var map = TypeMapping.GetOrCreateExternalTypeMapping(); + + { + if (GetUnknown() is TypeMapTrimTarget) + { + Console.WriteLine("Unexpected!"); + } + + var mappedType = map["Foo"]; + ThrowIfUsableMethodTable(mappedType); + if (mappedType.Name != nameof(ConditionalTypeMapEntry)) + throw new Exception(); + } + + { + var mappedType = map["Bar"]; + ThrowIfUsableMethodTable(mappedType); + if (mappedType.Name != nameof(UnconditionalTypeMapEntry)) + throw new Exception(); + } + + var proxyMap = TypeMapping.GetOrCreateProxyTypeMapping(); + + { + Consume(new SourceType()); + + var mappedType = proxyMap[typeof(SourceType)]; + ThrowIfUsableMethodTable(mappedType); + if (mappedType.Name != nameof(ProxyType)) + throw new Exception(); + } + } + } + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2070:UnrecognizedReflectionPattern", Justification = "That's the point")] private static Type GetTypeSecretly(Type testType, string typeName) => testType.GetNestedType(typeName, BindingFlags.NonPublic | BindingFlags.Public); @@ -1279,14 +1337,19 @@ private static void ThrowIfPresent(Type testType, string typeName) } } - [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2072:UnrecognizedReflectionPattern", - Justification = "That's the point")] private static void ThrowIfPresentWithUsableMethodTable(Type testType, string typeName) { Type t = GetTypeSecretly(testType, typeName); if (t == null) return; + ThrowIfUsableMethodTable(t); + } + + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2067:UnrecognizedReflectionPattern", + Justification = "That's the point")] + private static void ThrowIfUsableMethodTable(Type t) + { try { RuntimeHelpers.GetUninitializedObject(t); From a409051e328d1a23caae80c4fc8def921e8cdc4f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 28 Aug 2025 02:03:07 +0000 Subject: [PATCH 05/10] Update dependencies from https://github.com/dotnet/dotnet build 281059 Updated Dependencies: Microsoft.CodeAnalysis, Microsoft.CodeAnalysis.Analyzers, Microsoft.CodeAnalysis.CSharp, Microsoft.Net.Compilers.Toolset (Version 5.0.0-2.25420.109 -> 5.0.0-2.25426.115) Microsoft.CodeAnalysis.NetAnalyzers (Version 10.0.0-preview.25420.109 -> 10.0.100-rc.1.25426.115) Microsoft.DotNet.ApiCompat.Task, Microsoft.NET.Workload.Emscripten.Current.Manifest-10.0.100.Transport (Version 10.0.100-rc.2.25420.109 -> 10.0.100-rc.1.25426.115) Microsoft.DotNet.Arcade.Sdk, Microsoft.DotNet.Build.Tasks.Archives, Microsoft.DotNet.Build.Tasks.Feed, Microsoft.DotNet.Build.Tasks.Installers, Microsoft.DotNet.Build.Tasks.Packaging, Microsoft.DotNet.Build.Tasks.TargetFramework, Microsoft.DotNet.Build.Tasks.Templating, Microsoft.DotNet.Build.Tasks.Workloads, Microsoft.DotNet.CodeAnalysis, Microsoft.DotNet.GenAPI, Microsoft.DotNet.GenFacades, Microsoft.DotNet.Helix.Sdk, Microsoft.DotNet.PackageTesting, Microsoft.DotNet.RemoteExecutor, Microsoft.DotNet.SharedFramework.Sdk, Microsoft.DotNet.XliffTasks, Microsoft.DotNet.XUnitExtensions (Version 10.0.0-beta.25420.109 -> 10.0.0-beta.25426.115) Microsoft.DotNet.Cecil (Version 0.11.5-alpha.25420.109 -> 0.11.5-alpha.25426.115) Microsoft.DotNet.XUnitAssert, Microsoft.DotNet.XUnitConsoleRunner (Version 2.9.3-beta.25420.109 -> 2.9.3-beta.25426.115) Microsoft.NET.Sdk.IL, Microsoft.NETCore.App.Ref, Microsoft.NETCore.ILAsm, runtime.native.System.IO.Ports, System.Reflection.Metadata, System.Reflection.MetadataLoadContext, System.Text.Json (Version 10.0.0-rc.2.25420.109 -> 10.0.0-rc.2.25426.115) NuGet.Frameworks, NuGet.Packaging, NuGet.ProjectModel, NuGet.Versioning (Version 7.0.0-preview.1.42109 -> 7.0.0-preview.1.42715) System.CommandLine (Version 2.0.0-rc.2.25420.109 -> 2.0.0-rc.2.25426.115) --- eng/Version.Details.props | 78 ++++----- eng/Version.Details.xml | 158 +++++++++--------- .../steps/source-index-stage1-publish.yml | 4 +- eng/common/sdk-task.ps1 | 3 +- eng/common/sdk-task.sh | 7 +- eng/common/tools.ps1 | 2 +- global.json | 12 +- 7 files changed, 135 insertions(+), 129 deletions(-) diff --git a/eng/Version.Details.props b/eng/Version.Details.props index fb26e08588b66c..f7cc4f2b8f5bf5 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -41,45 +41,45 @@ This file should be imported by eng/Versions.props 19.1.0-alpha.1.25167.1 19.1.0-alpha.1.25167.1 - 5.0.0-2.25420.109 - 5.0.0-2.25420.109 - 5.0.0-2.25420.109 - 10.0.0-preview.25420.109 - 10.0.100-rc.2.25420.109 - 10.0.0-beta.25420.109 - 10.0.0-beta.25420.109 - 10.0.0-beta.25420.109 - 10.0.0-beta.25420.109 - 10.0.0-beta.25420.109 - 10.0.0-beta.25420.109 - 10.0.0-beta.25420.109 - 10.0.0-beta.25420.109 - 0.11.5-alpha.25420.109 - 10.0.0-beta.25420.109 - 10.0.0-beta.25420.109 - 10.0.0-beta.25420.109 - 10.0.0-beta.25420.109 - 10.0.0-beta.25420.109 - 10.0.0-beta.25420.109 - 10.0.0-beta.25420.109 - 10.0.0-beta.25420.109 - 2.9.3-beta.25420.109 - 2.9.3-beta.25420.109 - 10.0.0-beta.25420.109 - 5.0.0-2.25420.109 - 10.0.0-rc.2.25420.109 - 10.0.100-rc.2.25420.109 - 10.0.0-rc.2.25420.109 - 10.0.0-rc.2.25420.109 - 7.0.0-preview.1.42109 - 7.0.0-preview.1.42109 - 7.0.0-preview.1.42109 - 7.0.0-preview.1.42109 - 10.0.0-rc.2.25420.109 - 2.0.0-rc.2.25420.109 - 10.0.0-rc.2.25420.109 - 10.0.0-rc.2.25420.109 - 10.0.0-rc.2.25420.109 + 5.0.0-2.25426.115 + 5.0.0-2.25426.115 + 5.0.0-2.25426.115 + 10.0.100-rc.1.25426.115 + 10.0.100-rc.1.25426.115 + 10.0.0-beta.25426.115 + 10.0.0-beta.25426.115 + 10.0.0-beta.25426.115 + 10.0.0-beta.25426.115 + 10.0.0-beta.25426.115 + 10.0.0-beta.25426.115 + 10.0.0-beta.25426.115 + 10.0.0-beta.25426.115 + 0.11.5-alpha.25426.115 + 10.0.0-beta.25426.115 + 10.0.0-beta.25426.115 + 10.0.0-beta.25426.115 + 10.0.0-beta.25426.115 + 10.0.0-beta.25426.115 + 10.0.0-beta.25426.115 + 10.0.0-beta.25426.115 + 10.0.0-beta.25426.115 + 2.9.3-beta.25426.115 + 2.9.3-beta.25426.115 + 10.0.0-beta.25426.115 + 5.0.0-2.25426.115 + 10.0.0-rc.2.25426.115 + 10.0.100-rc.1.25426.115 + 10.0.0-rc.2.25426.115 + 10.0.0-rc.2.25426.115 + 7.0.0-preview.1.42715 + 7.0.0-preview.1.42715 + 7.0.0-preview.1.42715 + 7.0.0-preview.1.42715 + 10.0.0-rc.2.25426.115 + 2.0.0-rc.2.25426.115 + 10.0.0-rc.2.25426.115 + 10.0.0-rc.2.25426.115 + 10.0.0-rc.2.25426.115 10.0.0-beta.25310.1 10.0.0-beta.25310.1 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b539bf6da35a2f..2dff1ad8144c27 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,5 +1,5 @@ - + https://github.com/dotnet/icu @@ -41,91 +41,91 @@ https://github.com/dotnet/llvm-project da5dd054a531e6fea65643b7e754285b73eab433 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 https://github.com/dotnet/runtime-assets @@ -263,33 +263,33 @@ https://github.com/dotnet/llvm-project da5dd054a531e6fea65643b7e754285b73eab433 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 https://github.com/dotnet/xharness @@ -303,9 +303,9 @@ https://github.com/dotnet/xharness 4c17e23fcb7575baa9de575e5a96258096cbaea1 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -331,29 +331,29 @@ https://github.com/dotnet/runtime-assets 385d085eb055cabeaed3dde958a900e7b31cf6ce - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -365,21 +365,21 @@ - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 - + https://github.com/dotnet/dotnet - 619d5633513d1b31c528db4360833fce52f51829 + 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 https://github.com/dotnet/node diff --git a/eng/common/core-templates/steps/source-index-stage1-publish.yml b/eng/common/core-templates/steps/source-index-stage1-publish.yml index 75600735f175e6..e9a694afa58e66 100644 --- a/eng/common/core-templates/steps/source-index-stage1-publish.yml +++ b/eng/common/core-templates/steps/source-index-stage1-publish.yml @@ -1,6 +1,6 @@ parameters: - sourceIndexUploadPackageVersion: 2.0.0-20250425.2 - sourceIndexProcessBinlogPackageVersion: 1.0.1-20250515.1 + sourceIndexUploadPackageVersion: 2.0.0-20250818.1 + sourceIndexProcessBinlogPackageVersion: 1.0.1-20250818.1 sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json binlogPath: artifacts/log/Debug/Build.binlog diff --git a/eng/common/sdk-task.ps1 b/eng/common/sdk-task.ps1 index a9d2a2d2699666..b62e132d32a40d 100644 --- a/eng/common/sdk-task.ps1 +++ b/eng/common/sdk-task.ps1 @@ -7,13 +7,14 @@ Param( [switch] $restore, [switch] $prepareMachine, [switch][Alias('nobl')]$excludeCIBinaryLog, + [switch]$noWarnAsError, [switch] $help, [Parameter(ValueFromRemainingArguments=$true)][String[]]$properties ) $ci = $true $binaryLog = if ($excludeCIBinaryLog) { $false } else { $true } -$warnAsError = $true +$warnAsError = if ($noWarnAsError) { $false } else { $true } . $PSScriptRoot\tools.ps1 diff --git a/eng/common/sdk-task.sh b/eng/common/sdk-task.sh index 2f83adc0269faf..0c92f81d74f7fa 100755 --- a/eng/common/sdk-task.sh +++ b/eng/common/sdk-task.sh @@ -10,6 +10,7 @@ show_usage() { echo "Advanced settings:" echo " --excludeCIBinarylog Don't output binary log (short: -nobl)" + echo " --noWarnAsError Do not warn as error echo "" echo "Command line arguments not listed above are passed thru to msbuild." } @@ -52,6 +53,7 @@ exclude_ci_binary_log=false restore=false help=false properties='' +warnAsError=true while (($# > 0)); do lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")" @@ -73,6 +75,10 @@ while (($# > 0)); do exclude_ci_binary_log=true shift 1 ;; + --noWarnAsError) + warnAsError=false + shift 1 + ;; --help) help=true shift 1 @@ -85,7 +91,6 @@ while (($# > 0)); do done ci=true -warnAsError=true if $help; then show_usage diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 4920464cc4ae3e..06b44de78709cf 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -553,7 +553,7 @@ function LocateVisualStudio([object]$vsRequirements = $null){ if (!(Test-Path $vsWhereExe)) { Create-Directory $vsWhereDir - Write-Host 'Downloading vswhere $vswhereVersion' + Write-Host "Downloading vswhere $vswhereVersion" $ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit Retry({ Invoke-WebRequest "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/vswhere/$vswhereVersion/vswhere.exe" -OutFile $vswhereExe diff --git a/global.json b/global.json index ba29488e891299..f5e2d057689f61 100644 --- a/global.json +++ b/global.json @@ -1,18 +1,18 @@ { "sdk": { - "version": "10.0.100-rc.1.25411.109", + "version": "10.0.100-rc.1.25420.111", "allowPrerelease": true, "rollForward": "major" }, "tools": { - "dotnet": "10.0.100-rc.1.25411.109" + "dotnet": "10.0.100-rc.1.25420.111" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25420.109", - "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25420.109", - "Microsoft.DotNet.SharedFramework.Sdk": "10.0.0-beta.25420.109", + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25426.115", + "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25426.115", + "Microsoft.DotNet.SharedFramework.Sdk": "10.0.0-beta.25426.115", "Microsoft.Build.NoTargets": "3.7.0", "Microsoft.Build.Traversal": "3.4.0", - "Microsoft.NET.Sdk.IL": "10.0.0-rc.2.25420.109" + "Microsoft.NET.Sdk.IL": "10.0.0-rc.2.25426.115" } } From 5c563e6e737302e68eeb90da3271ef61938268ba Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 29 Aug 2025 02:26:48 +0000 Subject: [PATCH 06/10] Backflow from https://github.com/dotnet/dotnet / 7ac1ca6 build 281128 [[ commit created by automation ]] --- .../src/System/ComAwareWeakReference.cs | 27 ++++++++++--------- .../src/System/WeakReference.T.cs | 4 +-- .../src/System/WeakReference.cs | 6 ++--- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/ComAwareWeakReference.cs b/src/libraries/System.Private.CoreLib/src/System/ComAwareWeakReference.cs index 623ba1230cf41b..199b64bc8bb4b4 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ComAwareWeakReference.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ComAwareWeakReference.cs @@ -100,24 +100,21 @@ private void SetTarget(object? target, ComInfo? comInfo) } } - internal object? Target => GCHandle.InternalGet(_weakHandle); + internal object? Target => GCHandle.InternalGet(_weakHandle) ?? RehydrateTarget(); - internal nint WeakHandle => _weakHandle; - - internal T? RehydrateTarget() where T: class? + private object? RehydrateTarget() { - T? target = null; + object? target = null; lock (this) { if (_comInfo != null) { - // Check if the target is still null - target = Unsafe.As(GCHandle.InternalGet(_weakHandle)); + // check if the target is still null + target = GCHandle.InternalGet(_weakHandle); if (target == null) { - // Resolve and reset. Perform runtime cast to catch bugs - // in COM interop where it rehydrates wrong type. - target = (T?)_comInfo.ResolveTarget(); + // resolve and reset + target = _comInfo.ResolveTarget(); if (target != null) GCHandle.InternalSet(_weakHandle, target); } @@ -150,10 +147,16 @@ private static ComAwareWeakReference EnsureComAwareReference(ref nint taggedHand } [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static ComAwareWeakReference GetFromTaggedReference(nint taggedHandle) + internal static object? GetTarget(nint taggedHandle) { Debug.Assert((taggedHandle & ComAwareBit) != 0); - return Unsafe.As(GCHandle.InternalGet(taggedHandle & ~HandleTagBits)); + return Unsafe.As(GCHandle.InternalGet(taggedHandle & ~HandleTagBits)).Target; + } + + internal static nint GetWeakHandle(nint taggedHandle) + { + Debug.Assert((taggedHandle & ComAwareBit) != 0); + return Unsafe.As(GCHandle.InternalGet(taggedHandle & ~HandleTagBits))._weakHandle; } [MethodImpl(MethodImplOptions.NoInlining)] diff --git a/src/libraries/System.Private.CoreLib/src/System/WeakReference.T.cs b/src/libraries/System.Private.CoreLib/src/System/WeakReference.T.cs index bd6359e61dfb9e..567ac2efe53a73 100644 --- a/src/libraries/System.Private.CoreLib/src/System/WeakReference.T.cs +++ b/src/libraries/System.Private.CoreLib/src/System/WeakReference.T.cs @@ -141,9 +141,7 @@ private T? Target #if FEATURE_COMINTEROP || FEATURE_COMWRAPPERS if ((th & ComAwareBit) != 0) { - ComAwareWeakReference cwr = ComAwareWeakReference.GetFromTaggedReference(th); - - target = Unsafe.As(cwr.Target) ?? cwr.RehydrateTarget(); + target = Unsafe.As(ComAwareWeakReference.GetTarget(th)); // must keep the instance alive as long as we use the handle. GC.KeepAlive(this); diff --git a/src/libraries/System.Private.CoreLib/src/System/WeakReference.cs b/src/libraries/System.Private.CoreLib/src/System/WeakReference.cs index 4d0a817f6e8b39..bc06bc7805deeb 100644 --- a/src/libraries/System.Private.CoreLib/src/System/WeakReference.cs +++ b/src/libraries/System.Private.CoreLib/src/System/WeakReference.cs @@ -107,7 +107,7 @@ internal nint WeakHandle #if FEATURE_COMINTEROP || FEATURE_COMWRAPPERS if ((th & ComAwareBit) != 0) - return ComAwareWeakReference.GetFromTaggedReference(th).WeakHandle; + return ComAwareWeakReference.GetWeakHandle(th); #endif return th & ~HandleTagBits; } @@ -166,9 +166,7 @@ public virtual object? Target #if FEATURE_COMINTEROP || FEATURE_COMWRAPPERS if ((th & ComAwareBit) != 0) { - ComAwareWeakReference cwr = ComAwareWeakReference.GetFromTaggedReference(th); - - target = cwr.Target ?? cwr.RehydrateTarget(); + target = ComAwareWeakReference.GetTarget(th); // must keep the instance alive as long as we use the handle. GC.KeepAlive(this); From 0d2e1729a67d138e4a55f714796b8109965ff8f7 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Fri, 29 Aug 2025 02:26:52 +0000 Subject: [PATCH 07/10] Update dependencies from https://github.com/dotnet/dotnet build 281128 Updated Dependencies: Microsoft.CodeAnalysis, Microsoft.CodeAnalysis.Analyzers, Microsoft.CodeAnalysis.CSharp, Microsoft.Net.Compilers.Toolset (Version 5.0.0-2.25426.115 -> 5.0.0-2.25427.104) Microsoft.CodeAnalysis.NetAnalyzers, Microsoft.DotNet.ApiCompat.Task, Microsoft.NET.Workload.Emscripten.Current.Manifest-10.0.100.Transport (Version 10.0.100-rc.1.25426.115 -> 10.0.100-rc.1.25427.104) Microsoft.DotNet.Arcade.Sdk, Microsoft.DotNet.Build.Tasks.Archives, Microsoft.DotNet.Build.Tasks.Feed, Microsoft.DotNet.Build.Tasks.Installers, Microsoft.DotNet.Build.Tasks.Packaging, Microsoft.DotNet.Build.Tasks.TargetFramework, Microsoft.DotNet.Build.Tasks.Templating, Microsoft.DotNet.Build.Tasks.Workloads, Microsoft.DotNet.CodeAnalysis, Microsoft.DotNet.GenAPI, Microsoft.DotNet.GenFacades, Microsoft.DotNet.Helix.Sdk, Microsoft.DotNet.PackageTesting, Microsoft.DotNet.RemoteExecutor, Microsoft.DotNet.SharedFramework.Sdk, Microsoft.DotNet.XliffTasks, Microsoft.DotNet.XUnitExtensions (Version 10.0.0-beta.25426.115 -> 10.0.0-beta.25427.104) Microsoft.DotNet.Cecil (Version 0.11.5-alpha.25426.115 -> 0.11.5-alpha.25427.104) Microsoft.DotNet.XUnitAssert, Microsoft.DotNet.XUnitConsoleRunner (Version 2.9.3-beta.25426.115 -> 2.9.3-beta.25427.104) Microsoft.NET.Sdk.IL, Microsoft.NETCore.App.Ref, Microsoft.NETCore.ILAsm, runtime.native.System.IO.Ports, System.Reflection.Metadata, System.Reflection.MetadataLoadContext, System.Text.Json (Version 10.0.0-rc.2.25426.115 -> 10.0.0-rc.2.25427.104) NuGet.Frameworks, NuGet.Packaging, NuGet.ProjectModel, NuGet.Versioning (Version 7.0.0-preview.1.42715 -> 7.0.0-preview.1.42804) System.CommandLine (Version 2.0.0-rc.2.25426.115 -> 2.0.0-rc.2.25427.104) --- eng/Version.Details.props | 79 ++++++++++--------- eng/Version.Details.xml | 158 +++++++++++++++++++------------------- global.json | 8 +- 3 files changed, 122 insertions(+), 123 deletions(-) diff --git a/eng/Version.Details.props b/eng/Version.Details.props index f7cc4f2b8f5bf5..2489d50a8af6e3 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -1,4 +1,3 @@ - - 5.0.0-2.25426.115 - 5.0.0-2.25426.115 - 5.0.0-2.25426.115 - 10.0.100-rc.1.25426.115 - 10.0.100-rc.1.25426.115 - 10.0.0-beta.25426.115 - 10.0.0-beta.25426.115 - 10.0.0-beta.25426.115 - 10.0.0-beta.25426.115 - 10.0.0-beta.25426.115 - 10.0.0-beta.25426.115 - 10.0.0-beta.25426.115 - 10.0.0-beta.25426.115 - 0.11.5-alpha.25426.115 - 10.0.0-beta.25426.115 - 10.0.0-beta.25426.115 - 10.0.0-beta.25426.115 - 10.0.0-beta.25426.115 - 10.0.0-beta.25426.115 - 10.0.0-beta.25426.115 - 10.0.0-beta.25426.115 - 10.0.0-beta.25426.115 - 2.9.3-beta.25426.115 - 2.9.3-beta.25426.115 - 10.0.0-beta.25426.115 - 5.0.0-2.25426.115 - 10.0.0-rc.2.25426.115 - 10.0.100-rc.1.25426.115 - 10.0.0-rc.2.25426.115 - 10.0.0-rc.2.25426.115 - 7.0.0-preview.1.42715 - 7.0.0-preview.1.42715 - 7.0.0-preview.1.42715 - 7.0.0-preview.1.42715 - 10.0.0-rc.2.25426.115 - 2.0.0-rc.2.25426.115 - 10.0.0-rc.2.25426.115 - 10.0.0-rc.2.25426.115 - 10.0.0-rc.2.25426.115 + 5.0.0-2.25427.104 + 5.0.0-2.25427.104 + 5.0.0-2.25427.104 + 10.0.100-rc.1.25427.104 + 10.0.100-rc.1.25427.104 + 10.0.0-beta.25427.104 + 10.0.0-beta.25427.104 + 10.0.0-beta.25427.104 + 10.0.0-beta.25427.104 + 10.0.0-beta.25427.104 + 10.0.0-beta.25427.104 + 10.0.0-beta.25427.104 + 10.0.0-beta.25427.104 + 0.11.5-alpha.25427.104 + 10.0.0-beta.25427.104 + 10.0.0-beta.25427.104 + 10.0.0-beta.25427.104 + 10.0.0-beta.25427.104 + 10.0.0-beta.25427.104 + 10.0.0-beta.25427.104 + 10.0.0-beta.25427.104 + 10.0.0-beta.25427.104 + 2.9.3-beta.25427.104 + 2.9.3-beta.25427.104 + 10.0.0-beta.25427.104 + 5.0.0-2.25427.104 + 10.0.0-rc.2.25427.104 + 10.0.100-rc.1.25427.104 + 10.0.0-rc.2.25427.104 + 10.0.0-rc.2.25427.104 + 7.0.0-preview.1.42804 + 7.0.0-preview.1.42804 + 7.0.0-preview.1.42804 + 7.0.0-preview.1.42804 + 10.0.0-rc.2.25427.104 + 2.0.0-rc.2.25427.104 + 10.0.0-rc.2.25427.104 + 10.0.0-rc.2.25427.104 + 10.0.0-rc.2.25427.104 10.0.0-beta.25310.1 10.0.0-beta.25310.1 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 2dff1ad8144c27..733a4aa10c1ba1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,5 +1,5 @@ - + https://github.com/dotnet/icu @@ -41,91 +41,91 @@ https://github.com/dotnet/llvm-project da5dd054a531e6fea65643b7e754285b73eab433 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 https://github.com/dotnet/runtime-assets @@ -263,33 +263,33 @@ https://github.com/dotnet/llvm-project da5dd054a531e6fea65643b7e754285b73eab433 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 https://github.com/dotnet/xharness @@ -303,9 +303,9 @@ https://github.com/dotnet/xharness 4c17e23fcb7575baa9de575e5a96258096cbaea1 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -331,29 +331,29 @@ https://github.com/dotnet/runtime-assets 385d085eb055cabeaed3dde958a900e7b31cf6ce - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -365,21 +365,21 @@ - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 - + https://github.com/dotnet/dotnet - 39ec54dcf651bb3f9fea7aa0ae946fad6d503954 + 7ac1ca67bb1fb8a381c1c94a9f82a97725f0ccf3 https://github.com/dotnet/node diff --git a/global.json b/global.json index f5e2d057689f61..20898d7a92384f 100644 --- a/global.json +++ b/global.json @@ -8,11 +8,11 @@ "dotnet": "10.0.100-rc.1.25420.111" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25426.115", - "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25426.115", - "Microsoft.DotNet.SharedFramework.Sdk": "10.0.0-beta.25426.115", + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25427.104", + "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25427.104", + "Microsoft.DotNet.SharedFramework.Sdk": "10.0.0-beta.25427.104", "Microsoft.Build.NoTargets": "3.7.0", "Microsoft.Build.Traversal": "3.4.0", - "Microsoft.NET.Sdk.IL": "10.0.0-rc.2.25426.115" + "Microsoft.NET.Sdk.IL": "10.0.0-rc.2.25427.104" } } From d2f50007843cdeff200b9ffc26e03fee31815f49 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Wed, 20 Aug 2025 10:21:48 -0700 Subject: [PATCH 08/10] Update path to Microsoft.CodeAnalysis.NetAnalyzers.dll --- .../LibraryImportGenerator.Unit.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/LibraryImportGenerator.Unit.Tests.csproj b/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/LibraryImportGenerator.Unit.Tests.csproj index f442060dc184b0..253e99c7fb0832 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/LibraryImportGenerator.Unit.Tests.csproj +++ b/src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/LibraryImportGenerator.Unit.Tests.csproj @@ -53,7 +53,7 @@ - + From 503100d4f68525828ee48fb7e1d0b92508402362 Mon Sep 17 00:00:00 2001 From: Elinor Fung Date: Fri, 29 Aug 2025 09:13:25 -0700 Subject: [PATCH 09/10] Make tests clear out DOTNET_ROOT_ when clearing DOTNET_ROOT --- src/installer/tests/TestUtils/CommandExtensions.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/installer/tests/TestUtils/CommandExtensions.cs b/src/installer/tests/TestUtils/CommandExtensions.cs index bc5303a1593b30..8d48c33c994324 100644 --- a/src/installer/tests/TestUtils/CommandExtensions.cs +++ b/src/installer/tests/TestUtils/CommandExtensions.cs @@ -46,9 +46,13 @@ public static Command DotNetRoot(this Command command, string dotNetRoot, string if (!string.IsNullOrEmpty(architecture)) return command.EnvironmentVariable(Constants.DotnetRoot.ArchitectureEnvironmentVariablePrefix + architecture.ToUpper(), dotNetRoot); + // If we are clearing out the variable, make sure we clear out any architecture-specific one too + if (string.IsNullOrEmpty(dotNetRoot)) + command = command.EnvironmentVariable($"{Constants.DotnetRoot.ArchitectureEnvironmentVariablePrefix}{TestContext.BuildArchitecture}", dotNetRoot); + return command - .EnvironmentVariable(Constants.DotnetRoot.EnvironmentVariable, dotNetRoot) - .EnvironmentVariable(Constants.DotnetRoot.WindowsX86EnvironmentVariable, dotNetRoot); + .EnvironmentVariable(Constants.DotnetRoot.EnvironmentVariable, dotNetRoot) + .EnvironmentVariable(Constants.DotnetRoot.WindowsX86EnvironmentVariable, dotNetRoot); } public static Command MultilevelLookup(this Command command, bool? enable) From db0d37a874514c0f7d9a8bdd3387362f1c74d31d Mon Sep 17 00:00:00 2001 From: Elinor Fung Date: Fri, 29 Aug 2025 13:10:45 -0700 Subject: [PATCH 10/10] Fix environment variable casing --- src/installer/tests/TestUtils/CommandExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/installer/tests/TestUtils/CommandExtensions.cs b/src/installer/tests/TestUtils/CommandExtensions.cs index 8d48c33c994324..70c18ab08ae25d 100644 --- a/src/installer/tests/TestUtils/CommandExtensions.cs +++ b/src/installer/tests/TestUtils/CommandExtensions.cs @@ -48,7 +48,7 @@ public static Command DotNetRoot(this Command command, string dotNetRoot, string // If we are clearing out the variable, make sure we clear out any architecture-specific one too if (string.IsNullOrEmpty(dotNetRoot)) - command = command.EnvironmentVariable($"{Constants.DotnetRoot.ArchitectureEnvironmentVariablePrefix}{TestContext.BuildArchitecture}", dotNetRoot); + command = command.EnvironmentVariable($"{Constants.DotnetRoot.ArchitectureEnvironmentVariablePrefix}{TestContext.BuildArchitecture.ToUpperInvariant()}", dotNetRoot); return command .EnvironmentVariable(Constants.DotnetRoot.EnvironmentVariable, dotNetRoot)