Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,19 @@ jobs:
throw 'Packages contain Roslyn runtime assets.'
}

- name: Validate package symbols
shell: pwsh
run: |
$version = '${{ steps.gitversion.outputs.semver }}'
$feed = (Resolve-Path '${{ env.PACKAGE_OUTPUT }}').Path
$symbolPairs = @()
foreach ($packageId in @('Mammoth.LiteMapper.Abstractions', 'Mammoth.LiteMapper.Generator', 'Mammoth.LiteMapper')) {
$symbolPairs += Join-Path $feed "$packageId.$version.nupkg"
$symbolPairs += Join-Path $feed "$packageId.$version.snupkg"
}
dotnet run --project tools/Mammoth.LiteMapper.PackageValidation/Mammoth.LiteMapper.PackageValidation.csproj -c Release --no-restore -- @symbolPairs
if ($LASTEXITCODE -ne 0) { throw "Package symbol validation failed with exit code $LASTEXITCODE." }

- name: Validate final package consumers
shell: pwsh
run: |
Expand Down
9 changes: 9 additions & 0 deletions DECISIONS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Mammoth.LiteMapper Decision Log

## Generator symbol package layout (2026-10-15)

- Contract: specification sections 4.1, 22.19 and 24.6 require analyzer isolation, valid shipping packages and portable reproducible symbols. No public API or mapping semantic change is needed.
- Cause: the published 4.0.1 generator DLL lives under analyzers/dotnet/cs, while automatic debug-output packing placed its matching PDB under lib/netstandard2.0. Removing BuiltProjectOutputGroupOutput did not remove the separate debug-symbol output group.
- Packing: disable automatic generator build-output packing and explicitly pack its DLL and PDB at the analyzer path. The PDB is also included beside the analyzer DLL in the regular generator package; neither becomes a runtime lib/ref asset.
- Validation: use one standalone .NET validator in package tests, release CI before artifact promotion, and the manual publication script, including -SkipValidation and dry runs. Check metadata, path pairing, portable format, PE/PDB association and the compiler checksum with the PDB ID zeroed. Determinism and checksum manifests remain required but do not prove symbol validity.
- Coverage follows NuGet's supplied-PDB-to-assembly rule; it does not require a duplicate PDB for every packaged DLL. Shipping tests require the Abstractions and primary runtime PDBs plus the standalone generator's analyzer PDB. The primary package's duplicated analyzer DLL does not need a second copy of those globally indexed symbols.
- Recovery: the original release PDB matches the immutable 4.0.1 DLL. A separately prepared snupkg changes only that entry's path and can be submitted independently at the existing ID/version. Preparation and PR creation do not authorize publication. The PR targets develop because 4.0.1 is published and its release branch was removed.

## Issues #55 and #56: legal target accessors and required construction (2026-10-15)

- Contract: specification sections 6.4, 9.1, 10.4-10.5, 14.1, 16.1 and 20.1-20.3 already define legal target assignment and mandatory required-member diagnostics. No normative change or new API is needed.
Expand Down
8 changes: 8 additions & 0 deletions IMPLEMENTATION_PLAN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Mammoth.LiteMapper Implementation Plan

## Generator symbol package repair (2026-10-15)

- Scope: user-authorized packaging maintenance on an isolated branch from develop after the 4.0.1 release. Prepare corrected 4.0.1 symbols separately, then open a draft PR against develop; the release branch has been removed. This is direct maintenance, not a claimed tracker item.
- Test-first: validate every shipping nupkg/snupkg pair, reproducing the generator PDB path mismatch before changing its pack configuration. Reject mismatched PE/PDB identity, compiler checksum, nonportable symbols, and inconsistent package metadata.
- Implementation: disable automatic generator build-output packing and explicitly place its DLL and portable PDB together under analyzers/dotnet/cs. Reuse one archive/identity/checksum validator in tests, release CI and the manual publishing script before publication.
- Validation: focused regressions, full correctness and packaging coverage excluding local benchmark-launching tests, independent review, and terminal exact-head Windows/Linux and Roslyn CI. Preserve existing CI gates, skill content, and performance tests.
- Boundary: corrected symbols are delivered for a separate human upload. No NuGet push, package replacement/unlisting, tag, merge, credential changes, machine settings, or local timing benchmarks are authorized.

## Release 4.0.1 corrections: issues #55 and #56 (2026-10-15)

- Scope: user-authorized combined repair on an isolated branch from release/4.0.1 at d7d8c3bbc578470ddb9403c2a9064b96d8d87b25, with a draft PR back to that release branch.
Expand Down
17 changes: 17 additions & 0 deletions Mammoth.LiteMapper.sln
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mammoth.LiteMapper.Benchmar
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mammoth.LiteMapper.ProcessFixture", "tests\Mammoth.LiteMapper.Packaging.Tests\ProcessFixture\Mammoth.LiteMapper.ProcessFixture.csproj", "{A8B5221B-4D45-4E98-83B9-C4F5A0FD6E29}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{E63B4D72-2B11-4B36-99B4-489B586E2321}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mammoth.LiteMapper.PackageValidation", "tools\Mammoth.LiteMapper.PackageValidation\Mammoth.LiteMapper.PackageValidation.csproj", "{C5F34DF8-E046-4D3A-B7F7-47E54D56C3F0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -189,6 +193,18 @@ Global
{A8B5221B-4D45-4E98-83B9-C4F5A0FD6E29}.Release|x64.Build.0 = Release|Any CPU
{A8B5221B-4D45-4E98-83B9-C4F5A0FD6E29}.Release|x86.ActiveCfg = Release|Any CPU
{A8B5221B-4D45-4E98-83B9-C4F5A0FD6E29}.Release|x86.Build.0 = Release|Any CPU
{C5F34DF8-E046-4D3A-B7F7-47E54D56C3F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C5F34DF8-E046-4D3A-B7F7-47E54D56C3F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C5F34DF8-E046-4D3A-B7F7-47E54D56C3F0}.Debug|x64.ActiveCfg = Debug|Any CPU
{C5F34DF8-E046-4D3A-B7F7-47E54D56C3F0}.Debug|x64.Build.0 = Debug|Any CPU
{C5F34DF8-E046-4D3A-B7F7-47E54D56C3F0}.Debug|x86.ActiveCfg = Debug|Any CPU
{C5F34DF8-E046-4D3A-B7F7-47E54D56C3F0}.Debug|x86.Build.0 = Debug|Any CPU
{C5F34DF8-E046-4D3A-B7F7-47E54D56C3F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C5F34DF8-E046-4D3A-B7F7-47E54D56C3F0}.Release|Any CPU.Build.0 = Release|Any CPU
{C5F34DF8-E046-4D3A-B7F7-47E54D56C3F0}.Release|x64.ActiveCfg = Release|Any CPU
{C5F34DF8-E046-4D3A-B7F7-47E54D56C3F0}.Release|x64.Build.0 = Release|Any CPU
{C5F34DF8-E046-4D3A-B7F7-47E54D56C3F0}.Release|x86.ActiveCfg = Release|Any CPU
{C5F34DF8-E046-4D3A-B7F7-47E54D56C3F0}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -206,5 +222,6 @@ Global
{77429349-3F3A-4DDA-B18A-D148612D07DD} = {5D20AA90-6969-D8BD-9DCD-8634F4692FDA}
{9FAC9778-94D0-4ADC-B2FE-6DBC5715A38E} = {66320409-64EC-F7C5-3DEF-65E7510DAAD1}
{A8B5221B-4D45-4E98-83B9-C4F5A0FD6E29} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
{C5F34DF8-E046-4D3A-B7F7-47E54D56C3F0} = {E63B4D72-2B11-4B36-99B4-489B586E2321}
EndGlobalSection
EndGlobal
3 changes: 3 additions & 0 deletions Mammoth.LiteMapper.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@
<Project Path="tests/Mammoth.LiteMapper.Packaging.Tests/ProcessFixture/Mammoth.LiteMapper.ProcessFixture.csproj" />
<Project Path="tests/Mammoth.LiteMapper.Runtime.Tests/Mammoth.LiteMapper.Runtime.Tests.csproj" />
</Folder>
<Folder Name="/tools/">
<Project Path="tools/Mammoth.LiteMapper.PackageValidation/Mammoth.LiteMapper.PackageValidation.csproj" />
</Folder>
</Solution>
9 changes: 9 additions & 0 deletions STATUS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Mammoth.LiteMapper Status

## Generator symbol packaging checkpoint (2026-10-15)

- Scope: direct user-authorized maintenance from develop after 4.0.1 publication. The old release branch is absent. The isolated fix branch targets develop and stops at draft PR/human review.
- Reproduction: the retained tag-run generator snupkg has its PDB under lib/netstandard2.0 while the published DLL is under analyzers/dotnet/cs. All six release-artifact hashes were verified. Published nupkg payloads match the retained release packages, and the generator PDB matches the published DLL's portable identity and compiler checksum.
- Red-first: the shipping-pair regression failed on that exact orphan path while ten fixture checks passed. Three publication-gate tests failed before script integration. After the fix, the focused symbol/gate group passed 14 tests and the release/native safeguard group passed 60 tests. Additional no-PDB and partial-symbol controls document NuGet's supplied-PDB validation direction.
- Implementation: explicit generator analyzer DLL/PDB packing replaces the build-output-removal target. The shared nonshipping validator checks package metadata, archive paths, portability, PE/PDB association and compiler checksum. Release CI and the manual publishing script validate every shipping pair before promotion or push, including skip-validation and dry-run paths.
- Validation: Release solution build passes with no compiler errors; two existing generator-test dependency audit warnings remain. Local generator correctness 1,083, runtime five and integration one pass, with allocation measurements and the benchmark launcher excluded from local execution. Package-suite results and terminal exact-head Windows/Linux/Roslyn CI evidence are recorded in the draft PR. Independent read-only review found no remaining actionable issue.
- Recovery boundary: corrected 4.0.1 symbols preserve every entry's payload and change only the generator PDB archive path. They passed validation against the actual published nupkg and were delivered separately for human re-upload. No NuGet upload, unlist, tag, merge, credential/system change, skill/performance-test edit or local timing benchmark was performed.

## Release 4.0.1 issues #55 and #56 (2026-10-15)

- Base: remote release/4.0.1 independently verified unchanged at d7d8c3bbc578470ddb9403c2a9064b96d8d87b25. Work uses the isolated feature/4.0.1-mapping-corrections branch; exactly two nonduplicate bug issues were created and claimed through AgentStack.
Expand Down
2 changes: 2 additions & 0 deletions docs/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,8 @@ Windows and Linux are supported. A `netstandard2.0` library runs inside an appli

The primary `Mammoth.LiteMapper` package is the normal install path. `Mammoth.LiteMapper.Generator` is the generator implementation package and is not the normal consumer install route.

The generator DLL is an analyzer asset under `analyzers/dotnet/cs`, outside runtime `lib` and `ref` assets. Portable symbols must match the exact compiled DLL and use the same archive-relative path in the corresponding `.snupkg`, replacing `.dll` with `.pdb`. Symbol-package corrections do not require changing an application's package reference.

## Analyzer options

The generator recognizes these optional build properties for diagnostics and development. In the consuming project, set each value and export it with `CompilerVisibleProperty` so Roslyn passes it to the generator:
Expand Down
17 changes: 15 additions & 2 deletions publish-nuget.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,21 @@ if ($unexpected.Count -ne 0 -or $missing.Count -ne 0 -or $artifacts.Count -ne $e
throw "Expected exactly $($expectedArtifacts.Count) versioned package artifacts for $version; missing: $($missing -join ', '); unexpected: $($unexpected.Name -join ', ')."
}

foreach ($packageId in $packageIds) {
$artifactName = "$packageId.$version.nupkg"
$symbolValidator = 'tools/Mammoth.LiteMapper.PackageValidation/Mammoth.LiteMapper.PackageValidation.csproj'
if ($SkipValidation) {
& dotnet restore $symbolValidator
Assert-NativeSuccess 'Restore package symbol validator'
}
$symbolPairs = @()
foreach ($packageId in $packageIds) {
$symbolPairs += Join-Path $resolvedOutput "$packageId.$version.nupkg"
$symbolPairs += Join-Path $resolvedOutput "$packageId.$version.snupkg"
}
& dotnet run --project $symbolValidator -c Release --no-restore -- @symbolPairs
Assert-NativeSuccess 'Validate package symbols'

foreach ($packageId in $packageIds) {
$artifactName = "$packageId.$version.nupkg"
$artifactPath = Join-Path $resolvedOutput $artifactName
if ($DryRun) {
Write-Host "Dry run: would publish $artifactPath to $Source"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>true</IsPackable>
<IncludeBuildOutput>false</IncludeBuildOutput>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<Description>Source generator package for Mammoth.LiteMapper.</Description>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
Expand All @@ -14,11 +15,9 @@
Pack="true"
PackagePath="analyzers/dotnet/cs"
Visible="false" />
<None Include="$(OutputPath)$(AssemblyName).pdb"
Pack="true"
PackagePath="analyzers/dotnet/cs"
Visible="false" />
</ItemGroup>

<Target Name="ExcludeGeneratorRuntimeAssemblyFromPackage" AfterTargets="BuiltProjectOutputGroup">
<ItemGroup>
<BuiltProjectOutputGroupOutput Remove="@(BuiltProjectOutputGroupOutput)" />
</ItemGroup>
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<ItemGroup>
<Compile Remove="ProcessFixture\**\*.cs" />
<ProjectReference Include="ProcessFixture\Mammoth.LiteMapper.ProcessFixture.csproj" />
<ProjectReference Include="..\..\tools\Mammoth.LiteMapper.PackageValidation\Mammoth.LiteMapper.PackageValidation.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
Expand Down
Loading
Loading