Skip to content

Conversation

@bitfaster
Copy link
Owner

No description provided.

@bitfaster bitfaster requested a review from Copilot June 30, 2025 18:59
@coveralls
Copy link

coveralls commented Jun 30, 2025

Coverage Status

coverage: 99.006% (-0.02%) from 99.023%
when pulling c94355d on users/alexpeck/proproc
into eef629a on main.

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

This PR cleans up preprocessor directives across tests and benchmark projects by replacing legacy conditions (e.g. NETCOREAPP3_1_OR_GREATER and NET48) with unified symbols (NET and NETFRAMEWORK) to better align with current target framework definitions.

  • Update preprocessor conditions in unit tests, benchmarks, and intrinsic-related files
  • Normalize legacy symbols to new conditional symbols for streamlined maintenance

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
BitFaster.Caching.UnitTests/Lru/TlruStopwatchPolicyTests.cs Replaces "#if !NETCOREAPP3_1_OR_GREATER" with "#if !NET" for test exclusion logic.
BitFaster.Caching.UnitTests/Lru/TelemetryPolicyTests.cs Updates the preprocessor condition from "#if NETCOREAPP3_1_OR_GREATER" to "#if NET".
BitFaster.Caching.UnitTests/Lru/TLruTickCount64PolicyTests .cs Changes the conditional directive, though note the file name includes an extra space.
BitFaster.Caching.UnitTests/Intrinsics.cs Adjusts preprocessor condition for environment support using "#if NET".
BitFaster.Caching.UnitTests/CacheMetricsTests.cs Modifies preprocessor directives to use "#if NET".
BitFaster.Caching.UnitTests/CacheEventsTests.cs Adopts unified preprocessor logic for test execution.
BitFaster.Caching.Benchmarks/Lfu/CmSketchNoPin.cs Replaces legacy "#if NET48" with "#if NETFRAMEWORK".
BitFaster.Caching.Benchmarks/Lfu/CmSketchFlat.cs Updates multiple preprocessor blocks to use "#if NET" and inversely, "#if !NET".
BitFaster.Caching.Benchmarks/DrainBenchmarks.cs Replaces outdated directives with "#if NET" in benchmark draining logic.
Comments suppressed due to low confidence (2)

BitFaster.Caching.UnitTests/Lru/TLruTickCount64PolicyTests .cs:1

  • The file name 'TLruTickCount64PolicyTests .cs' contains an extra space before the extension. Consider renaming it to 'TLruTickCount64PolicyTests.cs' for consistency.
#if NET

BitFaster.Caching.UnitTests/Intrinsics.cs:16

  • [nitpick] To improve clarity, add a comment explaining the rationale behind replacing legacy preprocessor conditions with 'NET' and 'NETFRAMEWORK', so future maintainers understand which framework targets are covered.
#if NET

@bitfaster bitfaster marked this pull request as ready for review June 30, 2025 20:45
@bitfaster bitfaster merged commit 1bafa48 into main Jun 30, 2025
16 checks passed
@bitfaster bitfaster deleted the users/alexpeck/proproc branch June 30, 2025 21: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