|
2 | 2 |
|
3 | 3 | ## Implementation Changes |
4 | 4 |
|
5 | | -- [ ] **`HdrHistogram/HdrHistogram.csproj` line 4** — Remove `netstandard2.0` from `<TargetFrameworks>`, leaving `net10.0;net9.0;net8.0`. |
| 5 | +- [x] **`HdrHistogram/HdrHistogram.csproj` line 4** — Remove `netstandard2.0` from `<TargetFrameworks>`, leaving `net10.0;net9.0;net8.0`. |
6 | 6 | - **Why:** Drops the legacy target entirely. |
7 | 7 | - **Verify:** `<TargetFrameworks>` value contains no `netstandard2.0` token. |
8 | 8 |
|
9 | | -- [ ] **`HdrHistogram/HdrHistogram.csproj` lines 24–34** — Collapse the three per-framework Release `PropertyGroup` blocks (one each for `net8.0`, `net9.0`, `net10.0`) into a single `PropertyGroup Condition="'$(Configuration)' == 'Release'"` block with a single `<DocumentationFile>` element that resolves via `$(TargetFramework)`. |
| 9 | +- [x] **`HdrHistogram/HdrHistogram.csproj` lines 24–34** — Collapse the three per-framework Release `PropertyGroup` blocks (one each for `net8.0`, `net9.0`, `net10.0`) into a single `PropertyGroup Condition="'$(Configuration)' == 'Release'"` block with a single `<DocumentationFile>` element that resolves via `$(TargetFramework)`. |
10 | 10 | - **Why:** Eliminates duplicated XML and the framework-specific condition strings. |
11 | 11 | - **Verify:** Only one Release `PropertyGroup` exists; it contains no `$(TargetFramework)` literals in the condition string. |
12 | 12 |
|
13 | | -- [ ] **`HdrHistogram/HdrHistogram.csproj` lines 36–39** — Delete the `netstandard2.0` `PropertyGroup` block (the one setting `DefineConstants` to `RELEASE;NETSTANDARD2_0`). |
| 13 | +- [x] **`HdrHistogram/HdrHistogram.csproj` lines 36–39** — Delete the `netstandard2.0` `PropertyGroup` block (the one setting `DefineConstants` to `RELEASE;NETSTANDARD2_0`). |
14 | 14 | - **Why:** The constant `NETSTANDARD2_0` is no longer needed once the target is removed. |
15 | 15 | - **Verify:** No `PropertyGroup` referencing `netstandard2.0` or `NETSTANDARD2_0` remains in the file. |
16 | 16 |
|
17 | | -- [ ] **`HdrHistogram/Utilities/Bitwise.cs` lines 23–44** — Simplify `NumberOfLeadingZeros(long)` to call `System.Numerics.BitOperations.LeadingZeroCount((ulong)value)` directly; remove the `#if NET5_0_OR_GREATER` / `#else` / `#endif` guards and delete the private `IntrinsicNumberOfLeadingZeros` helper. |
| 17 | +- [x] **`HdrHistogram/Utilities/Bitwise.cs` lines 23–44** — Simplify `NumberOfLeadingZeros(long)` to call `System.Numerics.BitOperations.LeadingZeroCount((ulong)value)` directly; remove the `#if NET5_0_OR_GREATER` / `#else` / `#endif` guards and delete the private `IntrinsicNumberOfLeadingZeros` helper. |
18 | 18 | - **Why:** All supported targets (net8.0+) provide `BitOperations.LeadingZeroCount`; the conditional dispatch is dead code. |
19 | 19 | - **Verify:** `NumberOfLeadingZeros` body is a single `return System.Numerics.BitOperations.LeadingZeroCount((ulong)value);` statement; no `#if` directives remain in the method or immediately around it. |
20 | 20 |
|
21 | | -- [ ] **`HdrHistogram/Utilities/Bitwise.cs` lines 55–109** — Delete the entire `Bitwise.Imperative` nested public static class (including the `Lookup` table, `NumberOfLeadingZeros`, `NumberOfLeadingZerosLong`, and `Log2` methods). |
| 21 | +- [x] **`HdrHistogram/Utilities/Bitwise.cs` lines 55–109** — Delete the entire `Bitwise.Imperative` nested public static class (including the `Lookup` table, `NumberOfLeadingZeros`, `NumberOfLeadingZerosLong`, and `Log2` methods). |
22 | 22 | - **Why:** The imperative fallback path is unreachable on net8.0+; removing it eliminates dead code and the public surface that the benchmark references. |
23 | 23 | - **Verify:** No `class Imperative` or `Bitwise.Imperative` identifier exists anywhere in the solution. |
24 | 24 |
|
25 | | -- [ ] **`HdrHistogram/HistogramLogReader.cs` lines 241–248** — Remove the `#if NETSTANDARD2_0` / `#else` / `#endif` block inside `IsComment(string line)`, keeping only `return line.StartsWith('#');`. |
| 25 | +- [x] **`HdrHistogram/HistogramLogReader.cs` lines 241–248** — Remove the `#if NETSTANDARD2_0` / `#else` / `#endif` block inside `IsComment(string line)`, keeping only `return line.StartsWith('#');`. |
26 | 26 | - **Why:** The `char` overload of `StartsWith` is available on all net8.0+ targets; the string-overload fallback is dead code. |
27 | 27 | - **Verify:** `IsComment` contains no `#if` directives; the method body is `return line.StartsWith('#');`. |
28 | 28 |
|
29 | | -- [ ] **`HdrHistogram.Benchmarking/LeadingZeroCount/LeadingZeroCountBenchmarkBase.cs`** — Remove the `"Imperative"` entry from the validation dictionary (line 56) and delete the `ImperativeImplementation()` benchmark method (lines 124–133). |
| 29 | +- [x] **`HdrHistogram.Benchmarking/LeadingZeroCount/LeadingZeroCountBenchmarkBase.cs`** — Remove the `"Imperative"` entry from the validation dictionary (line 56) and delete the `ImperativeImplementation()` benchmark method (lines 124–133). |
30 | 30 | - **Why:** Both reference `Bitwise.Imperative` which will no longer exist; leaving them causes a compile error. |
31 | 31 | - **Verify:** `dotnet build HdrHistogram.Benchmarking/ -c Release` exits with code 0; no reference to `Bitwise.Imperative` remains in the file. |
32 | 32 |
|
33 | 33 | ## Unit Tests |
34 | 34 |
|
35 | | -- [ ] **`HdrHistogram.UnitTests/`** — Add a focused unit test class `BitwiseTests` (e.g. `HdrHistogram.UnitTests/Utilities/BitwiseTests.cs`) that asserts `Bitwise.NumberOfLeadingZeros` returns correct results for representative inputs: `0`, `1`, `2`, powers of two up to 2⁶², and `long.MaxValue`. |
| 35 | +- [x] **`HdrHistogram.UnitTests/`** — Add a focused unit test class `BitwiseTests` (e.g. `HdrHistogram.UnitTests/Utilities/BitwiseTests.cs`) that asserts `Bitwise.NumberOfLeadingZeros` returns correct results for representative inputs: `0`, `1`, `2`, powers of two up to 2⁶², and `long.MaxValue`. |
36 | 36 | - **Why:** No existing test directly covers `Bitwise`; this provides a regression anchor if the method is ever touched again. |
37 | 37 | - **Verify:** Test class exists; `dotnet test -c Release` reports the new tests as passing on all three target frameworks. |
38 | 38 |
|
39 | | -- [ ] **Run the full unit-test suite** — Execute `dotnet test -c Release` across all three target frameworks (net8.0, net9.0, net10.0). |
| 39 | +- [x] **Run the full unit-test suite** — Execute `dotnet test -c Release` across all three target frameworks (net8.0, net9.0, net10.0). |
40 | 40 | - **Why:** Confirms that removing the netstandard2.0 conditional paths has not broken any indirect consumer of `Bitwise` or `HistogramLogReader`. |
41 | 41 | - **Verify:** Zero test failures; zero skipped tests that were previously passing. |
42 | 42 |
|
43 | 43 | ## Documentation |
44 | 44 |
|
45 | | -- [ ] **`spec/tech-standards/build-system.md` line 25** — Remove `netstandard2.0` from the `<TargetFrameworks>` code block example. |
| 45 | +- [x] **`spec/tech-standards/build-system.md` line 25** — Remove `netstandard2.0` from the `<TargetFrameworks>` code block example. |
46 | 46 | - **Why:** The spec must reflect the actual supported targets. |
47 | 47 | - **Verify:** The code block contains only `net10.0;net9.0;net8.0`. |
48 | 48 |
|
49 | | -- [ ] **`spec/tech-standards/build-system.md` line 33** — Delete the `| \`netstandard2.0\` | Broad compatibility (.NET Framework 4.6.1+, .NET Core 2.0+) |` row from the target table. |
| 49 | +- [x] **`spec/tech-standards/build-system.md` line 33** — Delete the `| \`netstandard2.0\` | Broad compatibility (.NET Framework 4.6.1+, .NET Core 2.0+) |` row from the target table. |
50 | 50 | - **Why:** The target no longer exists; the row is misleading. |
51 | 51 | - **Verify:** No mention of `netstandard2.0` remains anywhere in `build-system.md`. |
52 | 52 |
|
|
0 commit comments