Skip to content

Commit

Permalink
Merge from github
Browse files Browse the repository at this point in the history
  • Loading branch information
wtgodbe committed Sep 23, 2021
2 parents c6732a9 + 60819f7 commit 1a95562
Show file tree
Hide file tree
Showing 20 changed files with 717 additions and 366 deletions.
3 changes: 2 additions & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
<add key="darc-int-dotnet-runtime-e1825b4" value="true" />
<!-- End: Package sources from dotnet-runtime -->
<!-- Begin: Package sources from dotnet-efcore -->
<add key="darc-int-dotnet-efcore-4953039" value="true" /> from dotnet-efcore -->
<add key="darc-int-dotnet-efcore-4953039" value="true" />
<!-- End: Package sources from dotnet-efcore -->
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
</disabledPackageSources>
</configuration>
416 changes: 208 additions & 208 deletions eng/Baseline.Designer.props

Large diffs are not rendered by default.

202 changes: 101 additions & 101 deletions eng/Baseline.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AspNetCoreMajorVersion>5</AspNetCoreMajorVersion>
<AspNetCoreMinorVersion>0</AspNetCoreMinorVersion>
<AspNetCorePatchVersion>11</AspNetCorePatchVersion>
<ValidateBaseline>false</ValidateBaseline>
<ValidateBaseline>true</ValidateBaseline>
<!--
When StabilizePackageVersion is set to 'true', this branch will produce stable outputs for 'Shipping' packages
-->
Expand Down Expand Up @@ -238,7 +238,7 @@
<!-- Packages from 2.1, 2.2, and 3.1 branches used for site extension build. -->
<MicrosoftAspNetCoreAzureAppServicesSiteExtension21PackageVersion>2.1.1</MicrosoftAspNetCoreAzureAppServicesSiteExtension21PackageVersion>
<MicrosoftAspNetCoreAzureAppServicesSiteExtension22PackageVersion>2.2.0</MicrosoftAspNetCoreAzureAppServicesSiteExtension22PackageVersion>
<MicrosoftAspNetCoreAzureAppServicesSiteExtension31PackageVersion>3.1.18-servicing-21365-4</MicrosoftAspNetCoreAzureAppServicesSiteExtension31PackageVersion>
<MicrosoftAspNetCoreAzureAppServicesSiteExtension31PackageVersion>3.1.19-servicing-21417-13</MicrosoftAspNetCoreAzureAppServicesSiteExtension31PackageVersion>
<MicrosoftAspNetCoreAzureAppServicesSiteExtension31x64PackageVersion>$(MicrosoftAspNetCoreAzureAppServicesSiteExtension31PackageVersion)</MicrosoftAspNetCoreAzureAppServicesSiteExtension31x64PackageVersion>
<MicrosoftAspNetCoreAzureAppServicesSiteExtension31x86PackageVersion>$(MicrosoftAspNetCoreAzureAppServicesSiteExtension31PackageVersion)</MicrosoftAspNetCoreAzureAppServicesSiteExtension31x86PackageVersion>
<!-- 3rd party dependencies -->
Expand Down
2 changes: 1 addition & 1 deletion eng/tools/BaselineGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ private async Task<int> Run()
WriteEndDocumentOnClose = true,
};

using (var stream = File.OpenWrite(documentPath))
using (var stream = File.Open(documentPath, FileMode.Create))
{
using (var writer = XmlWriter.Create(stream, settings))
{
Expand Down
8 changes: 4 additions & 4 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"sdk": {
"version": "5.0.206"
"version": "5.0.207"
},
"tools": {
"dotnet": "5.0.206",
"dotnet": "5.0.207",
"runtimes": {
"dotnet/x64": [
"2.1.29",
"2.1.30",
"$(MicrosoftNETCoreAppInternalPackageVersion)"
],
"dotnet/x86": [
"$(MicrosoftNETCoreAppInternalPackageVersion)"
],
"aspnetcore/x64": [
"3.1.18"
"3.1.19"
]
},
"Git": "2.22.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
<configuration>
<packageSources>
<clear />
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
<add key="extensions" value="https://dotnetfeed.blob.core.windows.net/aspnet-extensions/index.json" />
<add key="entityframeworkcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-entityframeworkcore/index.json" />
<add key="aspnetcore-tooling" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/index.json" />
<add key="aspnetcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
<add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
3 changes: 1 addition & 2 deletions src/Installers/Windows/SharedFrameworkBundle/Bundle.wxs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="$(var.BundleName)" Version="$(var.BundleVersion)" Manufacturer="Microsoft Corporation" UpgradeCode="$(var.BundleUpgradeCode)"
dep:ProviderKey="$(var.BundleProviderKey)">
<Bundle Name="$(var.BundleName)" Version="$(var.BundleVersion)" Manufacturer="Microsoft Corporation" UpgradeCode="$(var.BundleUpgradeCode)">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
<bal:WixStandardBootstrapperApplication LicenseUrl="https://go.microsoft.com/fwlink/?LinkId=329770"
LogoFile="DotNetLogo.bmp"
Expand Down
3 changes: 1 addition & 2 deletions src/Installers/Windows/WindowsHostingBundle/Bundle.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@
<PackageGroupRef Id="PG_ANCM" />
<PackageGroupRef Id="PG_DOTNET_REDIST_LTS_BUNDLE" />
<!--<PackageGroupRef Id="PG_DOTNET_REDIST_FTS_BUNDLE" />-->
<PackageGroupRef Id="PG_AspNetCoreSharedFramework_x86" />
<PackageGroupRef Id="PG_AspNetCoreSharedFramework_x64" />
<PackageGroupRef Id="PG_SHAREDFX_REDIST_BUNDLE" />
</Chain>
</Bundle>
</Wix>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<DotNetDarkOutputPath>$(IntermediateOutputPath)d\</DotNetDarkOutputPath>
<DepsPath>$(BaseIntermediateOutputPath)</DepsPath>
<DefineConstants>$(DefineConstants);DepsPath=$(DepsPath)</DefineConstants>
<DefineConstants>$(DefineConstants);InstallersOutputPath=$(InstallersOutputPath)</DefineConstants>
</PropertyGroup>

<ItemGroup>
Expand Down
44 changes: 44 additions & 0 deletions src/Installers/Windows/WindowsHostingBundle/SharedFramework.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Fragment>
<PackageGroup Id="PG_SHAREDFX_REDIST_BUNDLE">
<RollbackBoundary Id="RB_SHAREDFX_REDIST_BUNDLE" />

<ExePackage Id="SharedFxRedist_x64" SourceFile="$(var.InstallersOutputPath)\$(var.SharedFxRedistInstallerx64)"
Name="$(var.SharedFxRedistInstallerx64)"
Compressed="yes"
Vital="yes"
InstallCondition="VersionNT64 AND (NOT OPT_NO_SHAREDFX)"
InstallCommand="/quiet /norestart"
RepairCommand="/quiet /repair"
Permanent="yes"
DetectCondition="SharedFxRedistProductVersion_x64 = v$(var.SharedFxInstallerProductVersionx64)">
</ExePackage>

<ExePackage Id="SharedFxRedist_x86" SourceFile="$(var.InstallersOutputPath)\$(var.SharedFxRedistInstallerx86)"
Name="$(var.SharedFxRedistInstallerx86)"
Compressed="yes"
Vital="yes"
InstallCondition="(NOT OPT_NO_SHAREDFX) AND (NOT OPT_NO_X86)"
InstallCommand="/quiet /norestart"
RepairCommand="/quiet /repair"
Permanent="yes"
DetectCondition="SharedFxRedistProductVersion_x86 = v$(var.SharedFxInstallerProductVersionx86)">
</ExePackage>
</PackageGroup>
</Fragment>

<Fragment>
<util:ProductSearch Id="SharedFxRedistProductSearch_x86"
Condition="NOT VersionNT64"
ProductCode="$(var.SharedFxInstallerProductCodex86)"
Result="version"
Variable="SharedFxRedistProductVersion_x86" />

<util:ProductSearch Id="SharedFxRedistProductSearch_x64"
Condition="VersionNT64"
ProductCode="$(var.SharedFxInstallerProductCodex64)"
Result="version"
Variable="SharedFxRedistProductVersion_x64" />
</Fragment>
</Wix>
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<Compile Include="ANCM.wxs" />
<Compile Include="Bundle.wxs" />
<Compile Include="DotNetCore.wxs" />
<Compile Include="SharedFramework.wxs" />
<EmbeddedResource Include="thm.wxl" />
</ItemGroup>

Expand All @@ -53,19 +54,9 @@
<Private>True</Private>
<DoNotHarvest>true</DoNotHarvest>
</ProjectReference>
<ProjectReference Include="..\SharedFrameworkLib\SharedFrameworkLib.wixproj">
<SetPlatform>Platform=x86</SetPlatform>
<Name>SharedFrameworkLib_x86</Name>
<Project>{5244BC49-2568-4701-80A6-EAB8950AB5FA}</Project>
<ProjectReference Include="..\SharedFrameworkBundle\SharedFrameworkBundle.wixproj">
<Private>True</Private>
<DoNotHarvest>true</DoNotHarvest>
</ProjectReference>
<ProjectReference Include="..\SharedFrameworkLib\SharedFrameworkLib.wixproj">
<SetPlatform>Platform=x64</SetPlatform>
<Name>SharedFrameworkLib_x64</Name>
<Project>{5244BC49-2568-4701-80A6-EAB8950AB5FA}</Project>
<Private>True</Private>
<DoNotHarvest>true</DoNotHarvest>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>

Expand All @@ -77,6 +68,10 @@
<PackageFileName>dotnet-hosting-$(PackageVersion)-win$(TargetExt)</PackageFileName>

<BundleNameShort>Microsoft .NET $(PackageBrandingVersion)</BundleNameShort>
<SharedFxPackageVersion>$(PackageVersion)</SharedFxPackageVersion>
<SharedFxMsiVersion>$(PackageVersion)</SharedFxMsiVersion>
<SharedFxMsiVersion
Condition="! $(PackageVersion.Contains('$(_PreReleaseLabel)'))">$(PackageVersion)-$(_PreReleaseLabel)$(_BuildNumberLabels)</SharedFxMsiVersion>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -93,6 +88,19 @@
<BundleRegName>$(BundleNameFull)</BundleRegName>
</PropertyGroup>

<ItemGroup>
<SharedFxInstallers Include="$(InstallersOutputPath)$(RuntimeInstallerBaseName)-$(SharedFxPackageVersion)-win-x64.exe">
<TargetPlatform>x64</TargetPlatform>
<BundleNameProperty>SharedFxRedistInstallerx64</BundleNameProperty>
<Version>$(SharedFxPackageVersion)</Version>
</SharedFxInstallers>
<SharedFxInstallers Include="$(InstallersOutputPath)$(RuntimeInstallerBaseName)-$(SharedFxPackageVersion)-win-x86.exe">
<TargetPlatform>x86</TargetPlatform>
<BundleNameProperty>SharedFxRedistInstallerx86</BundleNameProperty>
<Version>$(SharedFxPackageVersion)</Version>
</SharedFxInstallers>
</ItemGroup>

<PropertyGroup>
<DefineConstants>$(DefineConstants);BundleName=$(BundleName)</DefineConstants>
<DefineConstants>$(DefineConstants);BundleNameFull=$(BundleNameFull)</DefineConstants>
Expand All @@ -104,4 +112,40 @@
<DefineConstants>$(DefineConstants);BundleRegFamily=$(BundleRegFamily)</DefineConstants>
<DefineConstants>$(DefineConstants);BundleRegName=$(BundleRegName)</DefineConstants>
</PropertyGroup>

<Target Name="ExtractPropertiesFromSharedFxMsi" DependsOnTargets="FetchDependencies" AfterTargets="ResolveProjectReferences">
<!-- Create properties that holds the executable name. These are passed to the bundles so we can reference them as variables
from inside the ExePackage authoring. -->
<CreateProperty Value="%(SharedFxInstallers.Filename)%(Extension)">
<Output TaskParameter="Value" PropertyName="%(SharedFxInstallers.BundleNameProperty)"/>
</CreateProperty>

<ItemGroup>
<SharedFxPayload Include="$(InstallersOutputPath)$(RuntimeInstallerBaseName)-$(SharedFxMsiVersion)-win-x64.msi">
<ProductVersionProperty>SharedFxInstallerProductVersionx64</ProductVersionProperty>
<ProductCodeProperty>SharedFxInstallerProductCodex64</ProductCodeProperty>
</SharedFxPayload>
<SharedFxPayload Include="$(InstallersOutputPath)$(RuntimeInstallerBaseName)-$(SharedFxMsiVersion)-win-x86.msi">
<ProductVersionProperty>SharedFxInstallerProductVersionx86</ProductVersionProperty>
<ProductCodeProperty>SharedFxInstallerProductCodex86</ProductCodeProperty>
</SharedFxPayload>
</ItemGroup>

<!-- Read MSI properties -->
<GetMsiProperty InstallPackage="%(SharedFxPayload.Identity)" Property="ProductVersion">
<Output TaskParameter="Value" PropertyName="%(ProductVersionProperty)" />
</GetMsiProperty>
<GetMsiProperty InstallPackage="%(SharedFxPayload.Identity)" Property="ProductCode">
<Output TaskParameter="Value" PropertyName="%(ProductCodeProperty)" />
</GetMsiProperty>

<PropertyGroup>
<DefineConstants>$(DefineConstants);SharedFxRedistInstallerx64=$(SharedFxRedistInstallerx64)</DefineConstants>
<DefineConstants>$(DefineConstants);SharedFxInstallerProductVersionx64=$(SharedFxInstallerProductVersionx64)</DefineConstants>
<DefineConstants>$(DefineConstants);SharedFxInstallerProductCodex64=$(SharedFxInstallerProductCodex64)</DefineConstants>
<DefineConstants>$(DefineConstants);SharedFxRedistInstallerx86=$(SharedFxRedistInstallerx86)</DefineConstants>
<DefineConstants>$(DefineConstants);SharedFxInstallerProductVersionx86=$(SharedFxInstallerProductVersionx86)</DefineConstants>
<DefineConstants>$(DefineConstants);SharedFxInstallerProductCodex86=$(SharedFxInstallerProductCodex86)</DefineConstants>
</PropertyGroup>
</Target>
</Project>
7 changes: 1 addition & 6 deletions src/Mvc/benchmarkapps/NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
<configuration>
<packageSources>
<clear />
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
<add key="extensions" value="https://dotnetfeed.blob.core.windows.net/aspnet-extensions/index.json" />
<add key="entityframeworkcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-entityframeworkcore/index.json" />
<add key="aspnetcore-tooling" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/index.json" />
<add key="aspnetcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
<add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
50 changes: 46 additions & 4 deletions src/Servers/Kestrel/Core/src/Internal/Http/Http1OutputProducer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ internal class Http1OutputProducer : IHttpOutputProducer, IDisposable

private readonly ConcurrentPipeWriter _pipeWriter;
private IMemoryOwner<byte> _fakeMemoryOwner;
private byte[] _fakeMemory;

// Chunked responses need to be treated uniquely when using GetMemory + Advance.
// We need to know the size of the data written to the chunk before calling Advance on the
Expand Down Expand Up @@ -419,6 +420,12 @@ public void Dispose()
_fakeMemoryOwner = null;
}

if (_fakeMemory != null)
{
ArrayPool<byte>.Shared.Return(_fakeMemory);
_fakeMemory = null;
}

// Call dispose on any memory that wasn't written.
if (_completedSegments != null)
{
Expand Down Expand Up @@ -656,13 +663,48 @@ private void WriteCurrentChunkMemoryToPipeWriter(ref BufferWriter<PipeWriter> wr
_advancedBytesForChunk = 0;
}

private Memory<byte> GetFakeMemory(int sizeHint)
internal Memory<byte> GetFakeMemory(int minSize)
{
if (_fakeMemoryOwner == null)
// Try to reuse _fakeMemoryOwner
if (_fakeMemoryOwner != null)
{
if (_fakeMemoryOwner.Memory.Length < minSize)
{
_fakeMemoryOwner.Dispose();
_fakeMemoryOwner = null;
}
else
{
return _fakeMemoryOwner.Memory;
}
}

// Try to reuse _fakeMemory
if (_fakeMemory != null)
{
if (_fakeMemory.Length < minSize)
{
ArrayPool<byte>.Shared.Return(_fakeMemory);
_fakeMemory = null;
}
else
{
return _fakeMemory;
}
}

// Requesting a bigger buffer could throw.
if (minSize <= _memoryPool.MaxBufferSize)
{
// Use the specified pool as it fits.
_fakeMemoryOwner = _memoryPool.Rent(minSize);
return _fakeMemoryOwner.Memory;
}
else
{
_fakeMemoryOwner = _memoryPool.Rent(sizeHint);
// Use the array pool. Its MaxBufferSize is int.MaxValue.
return _fakeMemory = ArrayPool<byte>.Shared.Rent(minSize);
}
return _fakeMemoryOwner.Memory;
}

private Memory<byte> LeasedMemory(int sizeHint)
Expand Down
Loading

0 comments on commit 1a95562

Please sign in to comment.