Skip to content

[main] Source code updates from dotnet/dotnet #63109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9015be4
Backflow from https://github.com/dotnet/dotnet / 8b29a16 build 277635
dotnet-maestro[bot] Aug 4, 2025
412bd92
Merge main into darc-main-3d5cc7ef-a367-4705-bbbd-46477514215d
dotnet-maestro[bot] Aug 4, 2025
64c2f8f
Update dependencies from https://github.com/dotnet/dotnet build 277635
dotnet-maestro[bot] Aug 4, 2025
78fef53
Backflow from https://github.com/dotnet/dotnet / 8cb85e0 build 278022
dotnet-maestro[bot] Aug 6, 2025
b9b3ea1
Update dependencies from https://github.com/dotnet/dotnet build 278022
dotnet-maestro[bot] Aug 6, 2025
2eadab8
Merge branch 'main' into darc-main-3d5cc7ef-a367-4705-bbbd-46477514215d
lewing Aug 6, 2025
9ebd69b
Backflow from https://github.com/dotnet/dotnet / 30bc8f9 build 278224
dotnet-maestro[bot] Aug 7, 2025
fc4033d
Update dependencies from https://github.com/dotnet/dotnet build 278224
dotnet-maestro[bot] Aug 7, 2025
9e28a3d
Enable restore graph logging for more diagnostics
jkoritzinsky Aug 7, 2025
2a04856
Revert "Enable restore graph logging for more diagnostics"
jkoritzinsky Aug 7, 2025
aa77ee0
Update KnownILLinkPack/KnownILCompilerPack instead of using a Package…
jkoritzinsky Aug 7, 2025
232f623
Apply suggestions from code review
BrennanConroy Aug 7, 2025
3054439
Merge main into darc-main-3d5cc7ef-a367-4705-bbbd-46477514215d
dotnet-maestro[bot] Aug 8, 2025
4f6102c
Update dependencies from https://github.com/dotnet/dotnet build 278405
dotnet-maestro[bot] Aug 8, 2025
2b4d47c
Apply suggestions from code review
BrennanConroy Aug 8, 2025
8c90285
Add base href for GlobalizationWasmApp
maraf Aug 8, 2025
706067e
Merge main into darc-main-3d5cc7ef-a367-4705-bbbd-46477514215d
dotnet-maestro[bot] Aug 9, 2025
ebe715a
Update dependencies from https://github.com/dotnet/dotnet build 278512
dotnet-maestro[bot] Aug 9, 2025
2846040
Disable HotReload in WasmMinimal
maraf Aug 9, 2025
b92451b
Disable HotReload in CustomBasePathApp and HostedInAspNet.Client
maraf Aug 9, 2025
6e1e958
Apply suggestions from code review
BrennanConroy Aug 10, 2025
037aba8
Backflow from https://github.com/dotnet/dotnet / e9f665e build 278626
dotnet-maestro[bot] Aug 11, 2025
a4b66b3
Merge main into darc-main-3d5cc7ef-a367-4705-bbbd-46477514215d
dotnet-maestro[bot] Aug 11, 2025
f2ccafb
Update dependencies from https://github.com/dotnet/dotnet build 278626
dotnet-maestro[bot] Aug 11, 2025
a9b6a96
Add base href for GlobalizationWasmApp
maraf Aug 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
192 changes: 95 additions & 97 deletions eng/Version.Details.props

Large diffs are not rendered by default.

376 changes: 188 additions & 188 deletions eng/Version.Details.xml

Large diffs are not rendered by default.

30 changes: 14 additions & 16 deletions eng/common/core-templates/job/onelocbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ parameters:

# Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool
pool: ''

CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex
GithubPat: $(BotAccount-dotnet-bot-repo-PAT)

Expand All @@ -27,7 +27,7 @@ parameters:
is1ESPipeline: ''
jobs:
- job: OneLocBuild${{ parameters.JobNameSuffix }}

dependsOn: ${{ parameters.dependsOn }}

displayName: OneLocBuild${{ parameters.JobNameSuffix }}
Expand Down Expand Up @@ -99,22 +99,20 @@ jobs:
mirrorBranch: ${{ parameters.MirrorBranch }}
condition: ${{ parameters.condition }}

- template: /eng/common/core-templates/steps/publish-build-artifacts.yml
parameters:
is1ESPipeline: ${{ parameters.is1ESPipeline }}
args:
displayName: Publish Localization Files
pathToPublish: '$(Build.ArtifactStagingDirectory)/loc'
publishLocation: Container
artifactName: Loc
condition: ${{ parameters.condition }}
# Copy the locProject.json to the root of the Loc directory, then publish a pipeline artifact
- task: CopyFiles@2
displayName: Copy LocProject.json
inputs:
SourceFolder: '$(Build.SourcesDirectory)/eng/Localize/'
Contents: 'LocProject.json'
TargetFolder: '$(Build.ArtifactStagingDirectory)/loc'
condition: ${{ parameters.condition }}

- template: /eng/common/core-templates/steps/publish-build-artifacts.yml
- template: /eng/common/core-templates/steps/publish-pipeline-artifacts.yml
parameters:
is1ESPipeline: ${{ parameters.is1ESPipeline }}
args:
displayName: Publish LocProject.json
pathToPublish: '$(Build.SourcesDirectory)/eng/Localize/'
publishLocation: Container
artifactName: Loc
targetPath: '$(Build.ArtifactStagingDirectory)/loc'
artifactName: 'Loc'
displayName: 'Publish Localization Files'
condition: ${{ parameters.condition }}
13 changes: 13 additions & 0 deletions eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,20 @@ function Retry($downloadBlock, $maxRetries = 5) {

function GetDotNetInstallScript([string] $dotnetRoot) {
$installScript = Join-Path $dotnetRoot 'dotnet-install.ps1'
$shouldDownload = $false

if (!(Test-Path $installScript)) {
$shouldDownload = $true
} else {
# Check if the script is older than 30 days
$fileAge = (Get-Date) - (Get-Item $installScript).LastWriteTime
if ($fileAge.Days -gt 30) {
Write-Host "Existing install script is too old, re-downloading..."
$shouldDownload = $true
}
}

if ($shouldDownload) {
Create-Directory $dotnetRoot
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
$uri = "https://builds.dotnet.microsoft.com/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.ps1"
Expand Down
24 changes: 24 additions & 0 deletions eng/common/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,29 @@ function GetDotNetInstallScript {
local root=$1
local install_script="$root/dotnet-install.sh"
local install_script_url="https://builds.dotnet.microsoft.com/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.sh"
local timestamp_file="$root/.dotnet-install.timestamp"
local should_download=false

if [[ ! -a "$install_script" ]]; then
should_download=true
elif [[ -f "$timestamp_file" ]]; then
# Check if the script is older than 30 days using timestamp file
local download_time=$(cat "$timestamp_file" 2>/dev/null || echo "0")
local current_time=$(date +%s)
local age_seconds=$((current_time - download_time))

# 30 days = 30 * 24 * 60 * 60 = 2592000 seconds
if [[ $age_seconds -gt 2592000 ]]; then
echo "Existing install script is too old, re-downloading..."
should_download=true
fi
else
# No timestamp file exists, assume script is old and re-download
echo "No timestamp found for existing install script, re-downloading..."
should_download=true
fi

if [[ "$should_download" == true ]]; then
mkdir -p "$root"

echo "Downloading '$install_script_url'"
Expand All @@ -328,6 +349,9 @@ function GetDotNetInstallScript {
ExitWithExitCode $exit_code
}
fi

# Create timestamp file to track download time in seconds from epoch
date +%s > "$timestamp_file"
fi
# return value
_GetDotNetInstallScript="$install_script"
Expand Down
7 changes: 6 additions & 1 deletion eng/targets/CSharp.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@
<_Parameter2>$(RepositoryUrl)/tree/$(SourceRevisionId)</_Parameter2>
</AssemblyAttribute>

<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(Serviceable)' == 'true'">
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(RepoOriginalSourceRevisionId)' != ''">
<_Parameter1>OriginalRepoCommitHash</_Parameter1>
<_Parameter2>$(RepoOriginalSourceRevisionId)</_Parameter2>
</AssemblyAttribute>

<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(Serviceable)' == 'true'">
<_Parameter1>Serviceable</_Parameter1>
<_Parameter2>True</_Parameter2>
</AssemblyAttribute>
Expand Down
2 changes: 1 addition & 1 deletion eng/targets/Wix.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<!-- Everything built in those projects _except_ the final package & MSI are shipping assets. -->
<_GeneratedPackageVersion>$(PackageVersion)</_GeneratedPackageVersion>
<_GeneratedPackageVersion
Condition="! $(PackageVersion.Contains('$(_PreReleaseLabel)'))">$(PackageVersion)-$(_PreReleaseLabel)$(_BuildNumberLabels)</_GeneratedPackageVersion>
Condition="! $(PackageVersion.Contains('$(_BuildNumberLabels)'))">$(VersionPrefix)-$(_PreReleaseLabel)$(_BuildNumberLabels)</_GeneratedPackageVersion>
<!-- Insert PackageVersion into OutputName for SharedFx & TargetingPack -->
<OutputName Condition="'$(OutputNamePrefix)' != '' AND '$(OutputNameSuffix)' != ''">$(OutputNamePrefix)$(_GeneratedPackageVersion)$(OutputNameSuffix)</OutputName>

Expand Down
10 changes: 5 additions & 5 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"sdk": {
"version": "10.0.100-preview.7.25322.101"
"version": "10.0.100-preview.7.25372.107"
},
"tools": {
"dotnet": "10.0.100-preview.7.25322.101",
"dotnet": "10.0.100-preview.7.25372.107",
"runtimes": {
"dotnet/x86": [
"$(MicrosoftInternalRuntimeAspNetCoreTransportVersion)"
Expand All @@ -27,9 +27,9 @@
"jdk": "latest"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25377.103",
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25377.103",
"Microsoft.DotNet.SharedFramework.Sdk": "10.0.0-beta.25377.103",
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25409.103",
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25409.103",
"Microsoft.DotNet.SharedFramework.Sdk": "10.0.0-beta.25409.103",
"Microsoft.Build.NoTargets": "3.7.0",
"Microsoft.Build.Traversal": "3.4.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<WasmEnableHotReload>false</WasmEnableHotReload>
<StaticWebAssetBasePath>/app</StaticWebAssetBasePath>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<WasmEnableHotReload>false</WasmEnableHotReload>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<StaticWebAssetBasePath>WasmMinimal</StaticWebAssetBasePath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<WasmEnableHotReload>false</WasmEnableHotReload>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!DOCTYPE html>
<head>
<base href="/subdir/" />
<style>
#blazor-error-ui { display: none }
</style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public interface IMemoryPoolFactory<T>
/// <summary>
/// Creates a new instance of a memory pool.
/// </summary>
/// <param name="options">Options for configuring the memory pool.</param>
/// <returns>A new memory pool instance.</returns>
MemoryPool<T> Create(MemoryPoolOptions? options = null);
MemoryPool<T> Create();
}
15 changes: 0 additions & 15 deletions src/Servers/Connections.Abstractions/src/MemoryPoolOptions.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#nullable enable
Microsoft.AspNetCore.Connections.IMemoryPoolFactory<T>
Microsoft.AspNetCore.Connections.IMemoryPoolFactory<T>.Create(Microsoft.AspNetCore.Connections.MemoryPoolOptions? options = null) -> System.Buffers.MemoryPool<T>!
Microsoft.AspNetCore.Connections.MemoryPoolOptions
Microsoft.AspNetCore.Connections.MemoryPoolOptions.MemoryPoolOptions() -> void
Microsoft.AspNetCore.Connections.MemoryPoolOptions.Owner.get -> string?
Microsoft.AspNetCore.Connections.MemoryPoolOptions.Owner.set -> void
Microsoft.AspNetCore.Connections.IMemoryPoolFactory<T>.Create() -> System.Buffers.MemoryPool<T>!
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#nullable enable
Microsoft.AspNetCore.Connections.IMemoryPoolFactory<T>
Microsoft.AspNetCore.Connections.IMemoryPoolFactory<T>.Create(Microsoft.AspNetCore.Connections.MemoryPoolOptions? options = null) -> System.Buffers.MemoryPool<T>!
Microsoft.AspNetCore.Connections.MemoryPoolOptions
Microsoft.AspNetCore.Connections.MemoryPoolOptions.MemoryPoolOptions() -> void
Microsoft.AspNetCore.Connections.MemoryPoolOptions.Owner.get -> string?
Microsoft.AspNetCore.Connections.MemoryPoolOptions.Owner.set -> void
Microsoft.AspNetCore.Connections.IMemoryPoolFactory<T>.Create() -> System.Buffers.MemoryPool<T>!
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#nullable enable
Microsoft.AspNetCore.Connections.IMemoryPoolFactory<T>
Microsoft.AspNetCore.Connections.IMemoryPoolFactory<T>.Create(Microsoft.AspNetCore.Connections.MemoryPoolOptions? options = null) -> System.Buffers.MemoryPool<T>!
Microsoft.AspNetCore.Connections.MemoryPoolOptions
Microsoft.AspNetCore.Connections.MemoryPoolOptions.MemoryPoolOptions() -> void
Microsoft.AspNetCore.Connections.MemoryPoolOptions.Owner.get -> string?
Microsoft.AspNetCore.Connections.MemoryPoolOptions.Owner.set -> void
Microsoft.AspNetCore.Connections.IMemoryPoolFactory<T>.Create() -> System.Buffers.MemoryPool<T>!
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#nullable enable
Microsoft.AspNetCore.Connections.IMemoryPoolFactory<T>
Microsoft.AspNetCore.Connections.IMemoryPoolFactory<T>.Create(Microsoft.AspNetCore.Connections.MemoryPoolOptions? options = null) -> System.Buffers.MemoryPool<T>!
Microsoft.AspNetCore.Connections.MemoryPoolOptions
Microsoft.AspNetCore.Connections.MemoryPoolOptions.MemoryPoolOptions() -> void
Microsoft.AspNetCore.Connections.MemoryPoolOptions.Owner.get -> string?
Microsoft.AspNetCore.Connections.MemoryPoolOptions.Owner.set -> void
Microsoft.AspNetCore.Connections.IMemoryPoolFactory<T>.Create() -> System.Buffers.MemoryPool<T>!
2 changes: 1 addition & 1 deletion src/Servers/HttpSys/src/HttpSysListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public HttpSysListener(HttpSysOptions options, IMemoryPoolFactory<byte> memoryPo
throw new PlatformNotSupportedException();
}

MemoryPool = memoryPoolFactory.Create(new MemoryPoolOptions { Owner = "httpsys" });
MemoryPool = memoryPoolFactory.Create();

Options = options;

Expand Down
2 changes: 1 addition & 1 deletion src/Servers/IIS/IIS/src/Core/IISHttpServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public IISHttpServer(
ILogger<IISHttpServer> logger
)
{
_memoryPool = memoryPoolFactory.Create(new MemoryPoolOptions { Owner = "iis" });
_memoryPool = memoryPoolFactory.Create();
_nativeApplication = nativeApplication;
_applicationLifetime = applicationLifetime;
_logger = logger;
Expand Down
1 change: 0 additions & 1 deletion src/Servers/IIS/IIS/src/WebHostBuilderIISExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public static IWebHostBuilder UseIIS(this IWebHostBuilder hostBuilder)
);

services.TryAddSingleton<IMemoryPoolFactory<byte>, DefaultMemoryPoolFactory>();
services.TryAddSingleton<MemoryPoolMetrics>();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System.Buffers;
using System.Collections.Concurrent;
using System.Diagnostics.Metrics;
using Microsoft.AspNetCore.Connections;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
using Microsoft.Extensions.Logging;
Expand All @@ -11,22 +12,22 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal;

internal sealed class PinnedBlockMemoryPoolFactory : IMemoryPoolFactory<byte>, IHeartbeatHandler
{
private readonly MemoryPoolMetrics _metrics;
private readonly IMeterFactory _meterFactory;
private readonly ILogger? _logger;
private readonly TimeProvider _timeProvider;
// micro-optimization: Using nuint as the value type to avoid GC write barriers; could replace with ConcurrentHashSet if that becomes available
private readonly ConcurrentDictionary<PinnedBlockMemoryPool, nuint> _pools = new();

public PinnedBlockMemoryPoolFactory(MemoryPoolMetrics metrics, TimeProvider? timeProvider = null, ILogger<PinnedBlockMemoryPoolFactory>? logger = null)
public PinnedBlockMemoryPoolFactory(IMeterFactory meterFactory, TimeProvider? timeProvider = null, ILogger<PinnedBlockMemoryPoolFactory>? logger = null)
{
_timeProvider = timeProvider ?? TimeProvider.System;
_metrics = metrics;
_meterFactory = meterFactory;
_logger = logger;
}

public MemoryPool<byte> Create(MemoryPoolOptions? options = null)
public MemoryPool<byte> Create()
{
var pool = new PinnedBlockMemoryPool(options?.Owner, _metrics, _logger);
var pool = new PinnedBlockMemoryPool(_meterFactory, _logger);

_pools.TryAdd(pool, nuint.Zero);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Buffers;
using System.Collections.Concurrent;
using System.Reflection;
using Microsoft.AspNetCore.Connections;
using Microsoft.AspNetCore.InternalTesting;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal;
using Microsoft.Extensions.Time.Testing;
Expand All @@ -16,26 +15,16 @@ public class PinnedBlockMemoryPoolFactoryTests
[Fact]
public void CreatePool()
{
var factory = CreateMemoryPoolFactory();
var factory = new PinnedBlockMemoryPoolFactory(new TestMeterFactory());
var pool = factory.Create();
Assert.NotNull(pool);
Assert.IsType<PinnedBlockMemoryPool>(pool);
Assert.Null(Assert.IsType<PinnedBlockMemoryPool>(pool).Owner);
}

[Fact]
public void CreatePoolWithOwner()
{
var factory = CreateMemoryPoolFactory();
var pool = factory.Create(new MemoryPoolOptions { Owner = "test" });
Assert.NotNull(pool);
Assert.Equal("test", Assert.IsType<PinnedBlockMemoryPool>(pool).Owner);
}

[Fact]
public void CreateMultiplePools()
{
var factory = CreateMemoryPoolFactory();
var factory = new PinnedBlockMemoryPoolFactory(new TestMeterFactory());
var pool1 = factory.Create();
var pool2 = factory.Create();

Expand All @@ -47,7 +36,7 @@ public void CreateMultiplePools()
[Fact]
public void DisposePoolRemovesFromFactory()
{
var factory = CreateMemoryPoolFactory();
var factory = new PinnedBlockMemoryPoolFactory(new TestMeterFactory());
var pool = factory.Create();
Assert.NotNull(pool);

Expand All @@ -64,7 +53,7 @@ public void DisposePoolRemovesFromFactory()
public async Task FactoryHeartbeatWorks()
{
var timeProvider = new FakeTimeProvider(DateTimeOffset.UtcNow.AddDays(1));
var factory = CreateMemoryPoolFactory(timeProvider);
var factory = new PinnedBlockMemoryPoolFactory(new TestMeterFactory(), timeProvider);

// Use 2 pools to make sure they all get triggered by the heartbeat
var pool = Assert.IsType<PinnedBlockMemoryPool>(factory.Create());
Expand Down Expand Up @@ -121,11 +110,4 @@ static async Task VerifyPoolEviction(PinnedBlockMemoryPool pool, int previousCou
Assert.InRange(pool.BlockCount(), previousCount - (previousCount / 10), previousCount - (previousCount / 30));
}
}

private static PinnedBlockMemoryPoolFactory CreateMemoryPoolFactory(TimeProvider timeProvider = null)
{
return new PinnedBlockMemoryPoolFactory(
new MemoryPoolMetrics(new TestMeterFactory()),
timeProvider: timeProvider);
}
}
Loading
Loading