-
Notifications
You must be signed in to change notification settings - Fork 39
add net9 target and tests #692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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+ inDefaults.cs - Add
net9.0to both library and test project target frameworks and bump testLangVersionto 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
ConcurrencyLevelto explain that-1maps 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
-1default on .NET 8+; consider adding a framework-specific test to ensure the correct behavior under .NET 9.
public static int ConcurrencyLevel => -1;
No description provided.