Thanks to visit codestin.com
Credit goes to github.com

Skip to content

.NET 8.0 support via Backport.System.Threading.Lock - #172

Closed
berik-99 wants to merge 2 commits into
ZoneTree:mainfrom
berik-99:main
Closed

.NET 8.0 support via Backport.System.Threading.Lock#172
berik-99 wants to merge 2 commits into
ZoneTree:mainfrom
berik-99:main

Conversation

@berik-99

@berik-99 berik-99 commented Aug 4, 2026

Copy link
Copy Markdown

Description

This PR introduces support for .NET 8.0 across the library and test projects to ensure full compatibility with the current Long Term Support (LTS) release, which remains actively supported and widely used in production.

To maintain System.Threading.Lock optimizations without introducing runtime dependencies, the Backport.System.Threading.Lock source generator has been integrated.

Summary of Changes

  • Multi-targeting update: Added net8.0 to the target frameworks in the main library .csproj.
  • Zero runtime dependency backport: Included Backport.System.Threading.Lock as an analyzer/source generator, enabling modern locking patterns across supported target frameworks without adding external runtime package dependencies.
  • Test suite multi-targeting: Updated test project targets to execute unit tests against all supported target frameworks.

Testing

  • Ran the complete unit test suite across all configured target frameworks.
  • All tests passed successfully with zero regressions.

Copilot AI lite review requested due to automatic review settings August 4, 2026 14:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds .NET 8 (LTS) compatibility to ZoneTree by multi-targeting the main library and unit tests, while preserving System.Threading.Lock-style optimizations via an analyzer/source-generator backport without introducing runtime dependencies.

Changes:

  • Multi-target ZoneTree library to include net8.0.
  • Add Backport.System.Threading.Lock as an analyzer for net8.0 builds.
  • Update the unit test project to multi-target and apply the analyzer for net8.0.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/ZoneTree/ZoneTree.csproj Adds net8.0 target framework and conditionally includes the lock backport analyzer for net8.0.
src/ZoneTree.UnitTests/ZoneTree.UnitTests.csproj Multi-targets tests and conditionally includes the lock backport analyzer for net8.0 (but currently misses net9.0).
src/ZoneTree.UnitTests/BottomSegmentMergeTests.cs Minor test code tweak (queue initialization) and using cleanup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ZoneTree.UnitTests/ZoneTree.UnitTests.csproj Outdated
Comment thread src/ZoneTree.UnitTests/ZoneTree.UnitTests.csproj
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@koculu

koculu commented Aug 4, 2026

Copy link
Copy Markdown
Member

Thank you for this PR.
The .Net version backward compatibility is expanded via the following PR without depending on 3rd party lib.
#173

@koculu koculu closed this Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants