You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
Public API tracking: each release's public surface is recorded in PublicAPI.Shipped.txt, and the changes since the last release in PublicAPI.Unshipped.txt, so the build fails on a public API change neither file records.
Each pack is validated against NCode.Disposables 5.3.0, the last version on nuget.org, through PackageValidationBaselineVersion, so a change that would break 5.3.0's public API fails the pack. (#37, ADR-0147)
The changelog has a section for every release from 1.0.0 to 5.3.0, from their release notes. (#27)
src/NCode.Disposables/README.md is the package readme nuget.org shows: installation, the main samples, and absolute links to the full guide, the API overview, the changelog and the security policy.
Every C# sample in the READMEs is a compiled test in tests/NCode.Disposables.Tests/ReadmeSamplesTests.cs that MarkdownSnippets copies into the READMEs, and ./build/gate.ps1, which CI and the Landing section's gate run, fails when a README differs from its test, then runs ./build/dod.ps1. (ADR-1000)
The AsAsyncSharedReference() extension puts an IAsyncDisposable behind a reference count and returns its first AsyncSharedReferenceLease<T>, also for a type that implements IDisposable too, such as a Stream. (#55, ADR-1002)
Changed
AssemblyVersion is 6.0.0.0 for every 6.x release and moves only with the major version, set by assemblyVersion in version.json, so a later 6.x assembly replaces an earlier one without a binding redirect.
SharedReferenceOwner throws through ObjectDisposedException.ThrowIf; the exception type and object name are unchanged.
Updated the project from project-template v0.41.0 to v0.61.2: stricter analyzers, shared build settings, a Definition of Done script and CI updates.
Updated the project from project-template v0.61.2 to v0.112.2: package versions now come from version.json through Nerdbank.GitVersioning, the CI workflow checks out the full history and builds a release with -p:PublicRelease=true, the Commit attribution check and commit-msg hook are gone, and the project gains a code of conduct, governance, roadmap, architecture and assurance documents, a coverage and reproducible-build toolkit, and the Scorecard workflow. (#28)
The solution file is NCode.Disposables.slnx, the XML solution format current .NET SDKs create, in place of NCode.Disposables.sln, and the ReSharper and Rider settings layer moves with it to NCode.Disposables.slnx.DotSettings. dotnet build and dotnet test at the repository root work as before.
The package carries its description and tags again: Directory.Build.props imports src/NCode.Disposables/project.props, and the project files no longer repeat settings the project template makes or reference Microsoft.SourceLink.GitHub, which the .NET SDK includes. (#36)
NCode Review v1.5.0 reviews each pull request and approves a clean one; once the NCode Review Approver's key is stored, that approval meets a required approval. Pull requests the workflow commands open start as drafts (draft: yes). (#38, ADR-0036)
./build/dod.ps1 checks the C# formatting with CSharpier, the code and project files are formatted with it, and a C# file without the SPDX header fails the build: the project turned on the template's csharp_format answer. (#39, ADR-0148)
Packages reach nuget.org through .github/workflows/publish.yml, the project template's publishing workflow, from a published GitHub release: it tests and packs the tagged commit and pushes the packages through nuget.org trusted publishing once a maintainer approves the protected nuget environment, so no long-lived NuGet API key is stored. Each release also gets its packages, a signed build provenance file and an SBOM, attached by release-provenance.yml, and raise-baseline.yml opens the change that raises the package validation baseline. (#44, ADR-0135)
README.md is a guide to every type, in the layout of the other NCode Group projects: a tested sample for each disposable, the shared references, the async adapter and the extensions, their errors and edge cases, an API overview, thread safety, and NuGet, CI, target framework, license and OpenSSF Scorecard badges. Its hand-kept release notes are gone; CHANGELOG.md covers every release.
The package description reads "Building blocks for IDisposable and IAsyncDisposable in .NET", followed by what the library does, without the Markdown backticks nuget.org showed as text.
Updated the project from project-template v0.112.2 to v0.113.1: Claude Code's project settings no longer ask before a command that mentions .env or secrets/, the release workflows and the template's scripts accept a version only in ASCII digits after a lowercase v, and the template's Best Practices record is ADR-0037, renumbered from ADR-0153.
docs/architecture.md describes the components, the factories, the disposables, the shared references and the extensions, as a diagram and a table. (#56)
Removed
Breaking:AsyncDisposableExtensions.AsSharedReference() is deleted: call AsAsyncSharedReference() for an AsyncSharedReferenceLease<T> that disposes with DisposeAsync. AsSharedReference() is DisposableExtensions.AsSharedReference() alone, so on a type that implements both IDisposable and IAsyncDisposable, such as a MemoryStream, it compiles and returns a SharedReferenceLease<T> that disposes with Dispose. No release marks it obsolete first: 5.3.0, the last release, ships it without [Obsolete], so code built against 5.3.0 gets no NCDISP001 warning before the deletion. (#59, #55, ADR-1002)
Breaking: The net8.0 target framework: the package targets net10.0 alone, since .NET 8 left Microsoft support on 2026-11-10. Apps on .NET 8 or 9 stay on 5.3.0. (ADR-1003)
.github/workflows/main.yml: its build and test jobs repeated ci.yml's build-and-test on every push and pull request, and publish.yml replaces its publish job. (#43, #44)
Fixed
DisposeAll(ignoreExceptions: true) ignores the failures of the items disposed after an item that implements only IAsyncDisposable; the InvalidOperationException for that item is still thrown. (#53)
Disposable.Collection(...).Dispose() and DisposeAll() dispose an item that implements both IDisposable and IAsyncDisposable, such as a Stream or a DbConnection, through IDisposable.Dispose instead of throwing InvalidOperationException, which DisposeAll() throws only for an item that implements IAsyncDisposable alone. Its message reads The collection contains an item that implements IAsyncDisposable but not IDisposable; dispose it with DisposeAllAsync. (#54, ADR-1001)
The XML docs of DisposableCollection and AsyncDisposableCollection say that Add, Remove, Clear and enumeration take no lock, and Disposable.Collection's docs say that several failures are thrown together as an AggregateException.