Skip to content

Conversation

@bitfaster
Copy link
Owner

No description provided.

@bitfaster bitfaster requested a review from Copilot June 29, 2025 00:38

This comment was marked as outdated.

@bitfaster bitfaster requested a review from Copilot June 29, 2025 01:25

This comment was marked as outdated.

@bitfaster bitfaster requested a review from Copilot June 29, 2025 01:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds support for .NET 9.0 alongside updating defaults for .NET 8+ and extending CI/tests accordingly

  • Introduce conditional default concurrency level (-1) on .NET 8+ in Defaults.cs
  • Add net9.0 to both library and test project target frameworks and bump test LangVersion to 10.0
  • Update LRU/LFU builder tests and expand GitHub Actions to build/test/publish on .NET 9 and .NET 8

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
BitFaster.Caching/Lru/Defaults.cs Added #if NET8_0_OR_GREATER branch to set concurrency default
BitFaster.Caching/BitFaster.Caching.csproj Appended net9.0 to <TargetFrameworks>
UnitTests/Lru/ConcurrentLruBuilderTests.cs Changed .WithConcurrencyLevel(-1) to .WithConcurrencyLevel(0)
UnitTests/Lfu/ConcurrentLfuBuilderTests.cs Changed .WithConcurrencyLevel(-1) to .WithConcurrencyLevel(0)
BitFaster.Caching.UnitTests.csproj Appended net9.0 and bumped <LangVersion> to 10.0
.github/workflows/gate.yml Added a second Windows job for .NET 6/8/9, updated test/coverage steps
Comments suppressed due to low confidence (3)

BitFaster.Caching/Lru/Defaults.cs:7

  • Consider adding XML doc comments on ConcurrencyLevel to explain that -1 maps to the runtime default and how it differs when targeting < .NET 8.
#if NET8_0_OR_GREATER

.github/workflows/gate.yml:61

  • [nitpick] The two Windows jobs share nearly identical steps; you could switch to a matrix strategy to reduce duplication and simplify adding future target versions.
  win2:

BitFaster.Caching/Lru/Defaults.cs:9

  • There aren't explicit unit tests verifying the new -1 default on .NET 8+; consider adding a framework-specific test to ensure the correct behavior under .NET 9.
        public static int ConcurrencyLevel => -1;

@coveralls
Copy link

coveralls commented Jun 29, 2025

Coverage Status

coverage: 99.086% (-0.02%) from 99.102%
when pulling 624cae9 on users/alexpeck/target9
into 28e4692 on main.

@bitfaster bitfaster marked this pull request as ready for review June 29, 2025 02:17
@bitfaster bitfaster merged commit 019070a into main Jun 29, 2025
14 checks passed
@bitfaster bitfaster deleted the users/alexpeck/target9 branch June 29, 2025 02:17
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.

3 participants