From cf10b138960493b1011910c9780444f12e39a113 Mon Sep 17 00:00:00 2001 From: Ben Watson Date: Thu, 18 Dec 2025 14:56:35 -0800 Subject: [PATCH 01/25] Remove net6.0 target in favor of net8.0. Update Changes.md. Update version. --- CHANGES.md | 5 +++++ src/Microsoft.IO.RecyclableMemoryStream.csproj | 4 ++-- src/Properties/AssemblyInfo.cs | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 8f106dc0..ee34a1c9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +# Version 4.x (Draft) +Breaking Changes +* Drop direct support of net6.0. Supported target frameworks are now netstandard2.0, netstandard2.1, and net8.0. +* The library is now trimmable. + # Version 3.0.1 **Bug Fix** diff --git a/src/Microsoft.IO.RecyclableMemoryStream.csproj b/src/Microsoft.IO.RecyclableMemoryStream.csproj index 9b7dda10..49fff654 100644 --- a/src/Microsoft.IO.RecyclableMemoryStream.csproj +++ b/src/Microsoft.IO.RecyclableMemoryStream.csproj @@ -1,13 +1,13 @@ - netstandard2.0;netstandard2.1;net6.0 + netstandard2.0;netstandard2.1;net8.0 false false Microsoft.IO bin\$(Configuration)\$(TargetFramework)\Microsoft.IO.RecyclableMemoryStream.xml Microsoft.IO.RecyclableMemoryStream - 3.0.1 + 4.0.0-Preview Microsoft.IO.RecyclableMemoryStream Microsoft A pooled MemoryStream allocator to decrease GC load and improve performance on highly scalable systems. diff --git a/src/Properties/AssemblyInfo.cs b/src/Properties/AssemblyInfo.cs index dc7d6251..2d244776 100644 --- a/src/Properties/AssemblyInfo.cs +++ b/src/Properties/AssemblyInfo.cs @@ -33,8 +33,8 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.1.0")] -[assembly: AssemblyFileVersion("3.0.1.0")] +[assembly: AssemblyVersion("4.0.0.0")] +[assembly: AssemblyFileVersion("4.0.0.0")] [assembly: CLSCompliant(true)] From 1c6d8d7ad5e097debc5ec2226e2db993908cc6db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Jan 2026 10:19:55 -0800 Subject: [PATCH 02/25] Bump NUnit3TestAdapter from 6.0.0 to 6.1.0 (#411) --- updated-dependencies: - dependency-name: NUnit3TestAdapter dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- UnitTests/UnitTests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnitTests/UnitTests.csproj b/UnitTests/UnitTests.csproj index 4c0ba6fb..ae67f364 100644 --- a/UnitTests/UnitTests.csproj +++ b/UnitTests/UnitTests.csproj @@ -10,7 +10,7 @@ - + From 6c9654a4341e459894317d1cf181886891084440 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 15:24:50 -0800 Subject: [PATCH 03/25] Bump Microsoft.SourceLink.GitHub from 8.0.0 to 10.0.103 (#414) --- updated-dependencies: - dependency-name: Microsoft.SourceLink.GitHub dependency-version: 10.0.103 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/Microsoft.IO.RecyclableMemoryStream.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.IO.RecyclableMemoryStream.csproj b/src/Microsoft.IO.RecyclableMemoryStream.csproj index 9b7dda10..306dfed0 100644 --- a/src/Microsoft.IO.RecyclableMemoryStream.csproj +++ b/src/Microsoft.IO.RecyclableMemoryStream.csproj @@ -43,7 +43,7 @@ - + From 784c38443f3ee13c7c181c47a6ca18a761668d88 Mon Sep 17 00:00:00 2001 From: inklesspen_rus Date: Fri, 13 Feb 2026 02:25:57 +0300 Subject: [PATCH 04/25] Switch MemoryStreamDoubleDispose event level from Critical to Verbose (#406) * Switch MemoryStreamDoubleDispose event level from Critical to Verbose * Avoided unnecessary stacktrace allocation on double dispose * Removed unnecessary using --- README.md | 2 +- src/Events.cs | 2 +- src/RecyclableMemoryStream.cs | 2 +- src/RecyclableMemoryStreamManager.cs | 8 ++++++++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 05869143..b7a2ae36 100644 --- a/README.md +++ b/README.md @@ -211,7 +211,7 @@ You can optionally configure the `RecyclableStreamManager.ThrowExceptionOnToArra | -----|-------|-------------| | MemoryStreamCreated | Verbose | Logged every time a stream object is allocated. Fields: `guid`, `tag`, `requestedSize`, `actualSize`. | | MemoryStreamDisposed | Verbose | Logged every time a stream object is disposed. Fields: `guid`, `tag`, `allocationStack`, `disposeStack`. | -| MemoryStreamDoubleDispose | Critical | Logged if a stream is disposed more than once. This indicates a logic error by the user of the stream. Dispose should happen exactly once per stream to avoid resource usage bugs. Fields: `guid`, `tag`, `allocationStack`, `disposeStack1`, `disposeStack2`. | +| MemoryStreamDoubleDispose | Verbose | Logged if a stream is disposed more than once. This indicates a logic error by the user of the stream. Dispose should happen exactly once per stream to avoid resource usage bugs. Fields: `guid`, `tag`, `allocationStack`, `disposeStack1`, `disposeStack2`. | | MemoryStreamFinalized | Error | Logged if a stream has gone out of scope without being disposed. This indicates a resource leak. Fields: `guid`, `tag`, `allocationStack`.| | MemoryStreamToArray | Verbose | Logged whenever `ToArray` is called. This indicates a potential problem, as calling `ToArray` goes against the concepts of good memory practice which `RecyclableMemoryStream` is trying to solve. Fields: `guid`, `tag`, `stack`, `size`.| | MemoryStreamManagerInitialized| Informational | Logged when the `RecyclableMemoryStreamManager` is initialized. Fields: `blockSize`, `largeBufferMultiple`, `maximumBufferSize`.| diff --git a/src/Events.cs b/src/Events.cs index 076685bf..3a4d8799 100644 --- a/src/Events.cs +++ b/src/Events.cs @@ -110,7 +110,7 @@ public void MemoryStreamDisposed(Guid guid, string? tag, long lifetimeMs, string /// Call stack of the first dispose. /// Call stack of the second dispose. /// Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true. - [Event(3, Level = EventLevel.Critical)] + [Event(3, Level = EventLevel.Verbose)] public void MemoryStreamDoubleDispose(Guid guid, string? tag, string? allocationStack, string? disposeStack1, string? disposeStack2) { diff --git a/src/RecyclableMemoryStream.cs b/src/RecyclableMemoryStream.cs index 42f16431..27a2064f 100644 --- a/src/RecyclableMemoryStream.cs +++ b/src/RecyclableMemoryStream.cs @@ -280,7 +280,7 @@ protected override void Dispose(bool disposing) if (this.disposed) { string? doubleDisposeStack = null; - if (this.memoryManager.options.GenerateCallStacks) + if (this.memoryManager.GenerateDoubleDisposedStackTrace) { doubleDisposeStack = Environment.StackTrace; } diff --git a/src/RecyclableMemoryStreamManager.cs b/src/RecyclableMemoryStreamManager.cs index 985309b7..5f8f85f9 100644 --- a/src/RecyclableMemoryStreamManager.cs +++ b/src/RecyclableMemoryStreamManager.cs @@ -25,6 +25,7 @@ namespace Microsoft.IO using System; using System.Collections.Concurrent; using System.Collections.Generic; + using System.Diagnostics.Tracing; using System.Runtime.CompilerServices; using System.Threading; @@ -82,6 +83,13 @@ public partial class RecyclableMemoryStreamManager internal readonly Options options; + internal bool GenerateDoubleDisposedStackTrace => + this.options.GenerateCallStacks && + ( + this.StreamDoubleDisposed != null || + Events.Writer.IsEnabled(EventLevel.Verbose, EventKeywords.None) + ); + /// /// Settings for controlling the behavior of RecyclableMemoryStream /// From 540a934caddd7b03686d47b174cc376626fd9577 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Feb 2026 10:19:54 -0800 Subject: [PATCH 05/25] Bump Microsoft.NET.Test.Sdk from 18.0.1 to 18.3.0 (#417) --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- UnitTests/UnitTests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnitTests/UnitTests.csproj b/UnitTests/UnitTests.csproj index ae67f364..87beed1d 100644 --- a/UnitTests/UnitTests.csproj +++ b/UnitTests/UnitTests.csproj @@ -11,7 +11,7 @@ - + From 3eeaa5ad78eaa8b9241cadc471e2c87070b71e0c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 14:22:15 -0700 Subject: [PATCH 06/25] Bump actions/upload-artifact from 6 to 7 (#418) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci-cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index d8d1cf09..1dd78686 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -38,7 +38,7 @@ jobs: --no-build - name: Upload test results as pipeline artifact - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: Test results path: 'Test results/' @@ -65,7 +65,7 @@ jobs: } - name: Upload publish output as pipeline artifact - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: Publish outputs path: 'Publish outputs/' From 93a3c28a5b7a43f21e7edb156f7f70d6d909ed25 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 14:25:27 -0700 Subject: [PATCH 07/25] Bump NUnit.Analyzers from 4.11.2 to 4.12.0 (#420) --- updated-dependencies: - dependency-name: NUnit.Analyzers dependency-version: 4.12.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- UnitTests/UnitTests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnitTests/UnitTests.csproj b/UnitTests/UnitTests.csproj index 87beed1d..8d3552a2 100644 --- a/UnitTests/UnitTests.csproj +++ b/UnitTests/UnitTests.csproj @@ -12,7 +12,7 @@ - + From ef979f79d6ff20b8a86db04263f85332d98a0753 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 14:26:13 -0700 Subject: [PATCH 08/25] Bump NUnit3TestAdapter from 6.1.0 to 6.2.0 (#424) --- updated-dependencies: - dependency-name: NUnit3TestAdapter dependency-version: 6.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- UnitTests/UnitTests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnitTests/UnitTests.csproj b/UnitTests/UnitTests.csproj index 8d3552a2..0913a94c 100644 --- a/UnitTests/UnitTests.csproj +++ b/UnitTests/UnitTests.csproj @@ -10,7 +10,7 @@ - + From aad21cb24a01b4a473c5a441a793a0848b1e5764 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 08:48:00 -0700 Subject: [PATCH 09/25] Bump Microsoft.NET.Test.Sdk from 18.3.0 to 18.4.0 (#425) --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- UnitTests/UnitTests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnitTests/UnitTests.csproj b/UnitTests/UnitTests.csproj index 0913a94c..25f21220 100644 --- a/UnitTests/UnitTests.csproj +++ b/UnitTests/UnitTests.csproj @@ -11,7 +11,7 @@ - + From 22f2f7648a23b8b6868aef4d888a8efe864c0617 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 08:48:40 -0700 Subject: [PATCH 10/25] Bump Microsoft.SourceLink.GitHub from 10.0.103 to 10.0.203 (#429) --- updated-dependencies: - dependency-name: Microsoft.SourceLink.GitHub dependency-version: 10.0.203 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/Microsoft.IO.RecyclableMemoryStream.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.IO.RecyclableMemoryStream.csproj b/src/Microsoft.IO.RecyclableMemoryStream.csproj index 306dfed0..d110b5e1 100644 --- a/src/Microsoft.IO.RecyclableMemoryStream.csproj +++ b/src/Microsoft.IO.RecyclableMemoryStream.csproj @@ -43,7 +43,7 @@ - + From e6db6faff0297f55506e52ac0ded35438f67d15c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 09:20:37 -0700 Subject: [PATCH 11/25] Bump Microsoft.NET.Test.Sdk from 18.4.0 to 18.5.1 (#430) --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.5.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- UnitTests/UnitTests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnitTests/UnitTests.csproj b/UnitTests/UnitTests.csproj index 25f21220..765d3b7e 100644 --- a/UnitTests/UnitTests.csproj +++ b/UnitTests/UnitTests.csproj @@ -11,7 +11,7 @@ - + From be7ddc74cf0d0b325691431aba723f58b5bc1b69 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 29 Apr 2026 14:06:14 -0700 Subject: [PATCH 12/25] Update CHANGES.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index ee34a1c9..3dc48927 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,5 @@ # Version 4.x (Draft) -Breaking Changes +**Breaking Changes** * Drop direct support of net6.0. Supported target frameworks are now netstandard2.0, netstandard2.1, and net8.0. * The library is now trimmable. From 80cdf9b236e65c2fb4b9bc6e3185a1e37b9ec234 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 29 Apr 2026 14:06:40 -0700 Subject: [PATCH 13/25] Update CHANGES.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- CHANGES.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 3dc48927..e6d82844 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,6 @@ # Version 4.x (Draft) **Breaking Changes** * Drop direct support of net6.0. Supported target frameworks are now netstandard2.0, netstandard2.1, and net8.0. -* The library is now trimmable. # Version 3.0.1 From 870f9200248270e1834acbf0fac504485ca5ee33 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 13:03:46 -0700 Subject: [PATCH 14/25] Bump Microsoft.SourceLink.GitHub from 10.0.203 to 10.0.300 (#433) --- updated-dependencies: - dependency-name: Microsoft.SourceLink.GitHub dependency-version: 10.0.300 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/Microsoft.IO.RecyclableMemoryStream.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.IO.RecyclableMemoryStream.csproj b/src/Microsoft.IO.RecyclableMemoryStream.csproj index d110b5e1..84ec4446 100644 --- a/src/Microsoft.IO.RecyclableMemoryStream.csproj +++ b/src/Microsoft.IO.RecyclableMemoryStream.csproj @@ -43,7 +43,7 @@ - + From fd061e655ab1efaf9c96d7dd6f6b79f4439303db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 13:04:39 -0700 Subject: [PATCH 15/25] Bump actions/checkout from 6 to 7 (#439) Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/benchmark.yml | 2 +- .github/workflows/ci-cd.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 749de4d3..3c1a1bb2 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -13,7 +13,7 @@ jobs: name: Run Benchmark.Net runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: actions/setup-dotnet@v5 with: dotnet-version: 8.0.100 diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 1dd78686..c56975e9 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@v7 # Tooling setup diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d47e077e..16498119 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -21,7 +21,7 @@ jobs: dotnet-version: 8.0.100 - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Initialize CodeQL uses: github/codeql-action/init@v4 From fb7a6a863e8d0f6dbb3fb38e3263b5eef3973870 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 13:05:50 -0700 Subject: [PATCH 16/25] Bump Microsoft.NET.Test.Sdk from 18.5.1 to 18.6.0 (#435) --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.6.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- UnitTests/UnitTests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnitTests/UnitTests.csproj b/UnitTests/UnitTests.csproj index 765d3b7e..542f23c3 100644 --- a/UnitTests/UnitTests.csproj +++ b/UnitTests/UnitTests.csproj @@ -11,7 +11,7 @@ - + From c67eaaac0fda4afd21398dfaf385f1aa2bd8d692 Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 10 Jul 2026 15:34:35 -0700 Subject: [PATCH 17/25] Update workflows to use flexible .NET versions. (#431) Co-authored-by: Ben Watson --- .github/workflows/benchmark.yml | 2 +- .github/workflows/ci-cd.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 3c1a1bb2..93ddc7da 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v7 - uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.100 + dotnet-version: 8.0.x - name: Run benchmark run: cd BenchmarkTests && dotnet run -c Release --framework net8.0 --exporters json --filter '*' diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index c56975e9..d7868e5c 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -15,7 +15,7 @@ jobs: - name: Install .NET SDK uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.100 + dotnet-version: 8.0.x # Build and test validation diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 16498119..fda2b65e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -18,7 +18,7 @@ jobs: - name: Setup .NET SDK uses: actions/setup-dotnet@v5 with: - dotnet-version: 8.0.100 + dotnet-version: 8.0.x - name: Checkout repository uses: actions/checkout@v7 From 151d4ddbd8da6ed0d0c4b5871a0fe56dffa96aa7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 15:38:56 -0700 Subject: [PATCH 18/25] Bump NUnit from 4.4.0 to 4.5.1 (#419) --- updated-dependencies: - dependency-name: NUnit dependency-version: 4.5.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: benmwatson <9598598+benmwatson@users.noreply.github.com> --- UnitTests/UnitTests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnitTests/UnitTests.csproj b/UnitTests/UnitTests.csproj index 542f23c3..f88171e0 100644 --- a/UnitTests/UnitTests.csproj +++ b/UnitTests/UnitTests.csproj @@ -9,7 +9,7 @@ NUnit2045 - + From 899c40b8366ca18487bbf9aca91a35ab9c09169d Mon Sep 17 00:00:00 2001 From: Ben Watson Date: Fri, 10 Jul 2026 15:51:02 -0700 Subject: [PATCH 19/25] Resolve PR comments, update version, documentation. --- CHANGES.md | 9 +++++++-- src/Microsoft.IO.RecyclableMemoryStream.csproj | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index e6d82844..8178e10c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,11 @@ -# Version 4.x (Draft) +# Version 4.0.0 + **Breaking Changes** -* Drop direct support of net6.0. Supported target frameworks are now netstandard2.0, netstandard2.1, and net8.0. +* Dropping net6.0 will more easily support trimming [PR #409](https://github.com/microsoft/Microsoft.IO.RecyclableMemoryStream/pull/409) +* Switch `MemoryStreamDoubleDispose` event level from Critical to Verbose [PR #406](https://github.com/microsoft/Microsoft.IO.RecyclableMemoryStream/pull/406) + +**Other Changes** +* Readme: Add clarity for the large pool of buffers and the GetBuffer method pertaining to the .NET max array length [PR #370](https://github.com/microsoft/Microsoft.IO.RecyclableMemoryStream/pull/370) # Version 3.0.1 diff --git a/src/Microsoft.IO.RecyclableMemoryStream.csproj b/src/Microsoft.IO.RecyclableMemoryStream.csproj index 49fff654..9b858ec5 100644 --- a/src/Microsoft.IO.RecyclableMemoryStream.csproj +++ b/src/Microsoft.IO.RecyclableMemoryStream.csproj @@ -7,7 +7,7 @@ bin\$(Configuration)\$(TargetFramework)\Microsoft.IO.RecyclableMemoryStream.xml Microsoft.IO.RecyclableMemoryStream - 4.0.0-Preview + 4.0.0-alpha Microsoft.IO.RecyclableMemoryStream Microsoft A pooled MemoryStream allocator to decrease GC load and improve performance on highly scalable systems. From 0fbca21ab4e0ad38d212ce785e4109a370a5f1c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 08:42:51 -0700 Subject: [PATCH 20/25] Bump NUnit.Analyzers from 4.12.0 to 4.14.0 (#436) * Bump NUnit.Analyzers from 4.12.0 to 4.14.0 --- updated-dependencies: - dependency-name: NUnit.Analyzers dependency-version: 4.14.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Remove obsolete use of Timeout attribute. --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ben Watson --- UnitTests/Tests.cs | 5 ++--- UnitTests/UnitTests.csproj | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/UnitTests/Tests.cs b/UnitTests/Tests.cs index 8751a515..c5380b53 100644 --- a/UnitTests/Tests.cs +++ b/UnitTests/Tests.cs @@ -4057,9 +4057,8 @@ protected override void TestDroppingLargeBuffer(long maxFreeLargeBufferSize) } } } -#pragma warning disable 618 // Timeout is obsolete because it kills the thread, which isn't allowed, but it's still handy - // for tests that are expected to run indefinitely in the failure case. - [Test, Timeout(10000)] + + [Test, MaxTime(10000)] public void TryGetBuffer_InfiniteLoop_Issue344() { // see https://github.com/microsoft/Microsoft.IO.RecyclableMemoryStream/issues/344 diff --git a/UnitTests/UnitTests.csproj b/UnitTests/UnitTests.csproj index f88171e0..5c3eaa61 100644 --- a/UnitTests/UnitTests.csproj +++ b/UnitTests/UnitTests.csproj @@ -12,7 +12,7 @@ - + From d87c68175caf2c2c866cdfba258c38956c5937f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 11:05:17 -0700 Subject: [PATCH 21/25] Bump dotnet-sdk from 8.0.416 to 8.0.422 (#437) Bumps [dotnet-sdk](https://github.com/dotnet/sdk) from 8.0.416 to 8.0.422. - [Release notes](https://github.com/dotnet/sdk/releases) - [Commits](https://github.com/dotnet/sdk/compare/v8.0.416...v8.0.422) --- updated-dependencies: - dependency-name: dotnet-sdk dependency-version: 8.0.422 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index ad3aafa3..d1615c2c 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.416", + "version": "8.0.422", "rollForward": "latestMinor" } } From cc74e97602688af03f87b4360eeaf1ec47da5b63 Mon Sep 17 00:00:00 2001 From: Ben Watson Date: Thu, 18 Dec 2025 14:56:35 -0800 Subject: [PATCH 22/25] Remove net6.0 target in favor of net8.0. Update Changes.md. Update version. --- CHANGES.md | 5 +++++ src/Microsoft.IO.RecyclableMemoryStream.csproj | 4 ++-- src/Properties/AssemblyInfo.cs | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 8f106dc0..ee34a1c9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +# Version 4.x (Draft) +Breaking Changes +* Drop direct support of net6.0. Supported target frameworks are now netstandard2.0, netstandard2.1, and net8.0. +* The library is now trimmable. + # Version 3.0.1 **Bug Fix** diff --git a/src/Microsoft.IO.RecyclableMemoryStream.csproj b/src/Microsoft.IO.RecyclableMemoryStream.csproj index 84ec4446..612c2c91 100644 --- a/src/Microsoft.IO.RecyclableMemoryStream.csproj +++ b/src/Microsoft.IO.RecyclableMemoryStream.csproj @@ -1,13 +1,13 @@ - netstandard2.0;netstandard2.1;net6.0 + netstandard2.0;netstandard2.1;net8.0 false false Microsoft.IO bin\$(Configuration)\$(TargetFramework)\Microsoft.IO.RecyclableMemoryStream.xml Microsoft.IO.RecyclableMemoryStream - 3.0.1 + 4.0.0-Preview Microsoft.IO.RecyclableMemoryStream Microsoft A pooled MemoryStream allocator to decrease GC load and improve performance on highly scalable systems. diff --git a/src/Properties/AssemblyInfo.cs b/src/Properties/AssemblyInfo.cs index dc7d6251..2d244776 100644 --- a/src/Properties/AssemblyInfo.cs +++ b/src/Properties/AssemblyInfo.cs @@ -33,8 +33,8 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.1.0")] -[assembly: AssemblyFileVersion("3.0.1.0")] +[assembly: AssemblyVersion("4.0.0.0")] +[assembly: AssemblyFileVersion("4.0.0.0")] [assembly: CLSCompliant(true)] From bea598f31156917b966c677327de231f4afc0406 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 29 Apr 2026 14:06:14 -0700 Subject: [PATCH 23/25] Update CHANGES.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index ee34a1c9..3dc48927 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,5 @@ # Version 4.x (Draft) -Breaking Changes +**Breaking Changes** * Drop direct support of net6.0. Supported target frameworks are now netstandard2.0, netstandard2.1, and net8.0. * The library is now trimmable. From 34b170b15eeb1aae5692f30a5e238bdff382696c Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 29 Apr 2026 14:06:40 -0700 Subject: [PATCH 24/25] Update CHANGES.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- CHANGES.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 3dc48927..e6d82844 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,6 @@ # Version 4.x (Draft) **Breaking Changes** * Drop direct support of net6.0. Supported target frameworks are now netstandard2.0, netstandard2.1, and net8.0. -* The library is now trimmable. # Version 3.0.1 From 5a5f502f2096001612bb744c81e81c752cb65228 Mon Sep 17 00:00:00 2001 From: Ben Watson Date: Fri, 10 Jul 2026 15:51:02 -0700 Subject: [PATCH 25/25] Resolve PR comments, update version, documentation. --- CHANGES.md | 9 +++++++-- src/Microsoft.IO.RecyclableMemoryStream.csproj | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index e6d82844..8178e10c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,11 @@ -# Version 4.x (Draft) +# Version 4.0.0 + **Breaking Changes** -* Drop direct support of net6.0. Supported target frameworks are now netstandard2.0, netstandard2.1, and net8.0. +* Dropping net6.0 will more easily support trimming [PR #409](https://github.com/microsoft/Microsoft.IO.RecyclableMemoryStream/pull/409) +* Switch `MemoryStreamDoubleDispose` event level from Critical to Verbose [PR #406](https://github.com/microsoft/Microsoft.IO.RecyclableMemoryStream/pull/406) + +**Other Changes** +* Readme: Add clarity for the large pool of buffers and the GetBuffer method pertaining to the .NET max array length [PR #370](https://github.com/microsoft/Microsoft.IO.RecyclableMemoryStream/pull/370) # Version 3.0.1 diff --git a/src/Microsoft.IO.RecyclableMemoryStream.csproj b/src/Microsoft.IO.RecyclableMemoryStream.csproj index 612c2c91..5d6a3fdf 100644 --- a/src/Microsoft.IO.RecyclableMemoryStream.csproj +++ b/src/Microsoft.IO.RecyclableMemoryStream.csproj @@ -7,7 +7,7 @@ bin\$(Configuration)\$(TargetFramework)\Microsoft.IO.RecyclableMemoryStream.xml Microsoft.IO.RecyclableMemoryStream - 4.0.0-Preview + 4.0.0-alpha Microsoft.IO.RecyclableMemoryStream Microsoft A pooled MemoryStream allocator to decrease GC load and improve performance on highly scalable systems.