|
1 | 1 | # Mammoth.LiteMapper Status |
2 | 2 |
|
3 | | -- Current milestone: Milestone 10, existing-target mapping and patch behavior. |
| 3 | +- Current milestone: Milestone 11, enum mapping. |
4 | 4 | - Current state: Complete. |
5 | | -- Completed milestones: Milestone 1; Milestone 2; Milestone 3; Milestone 4; Milestone 5; Milestone 6; Milestone 7; Milestone 8; Milestone 9; Milestone 10. |
| 5 | +- Completed milestones: Milestone 1; Milestone 2; Milestone 3; Milestone 4; Milestone 5; Milestone 6; Milestone 7; Milestone 8; Milestone 9; Milestone 10; Milestone 11. |
6 | 6 | - Current work: None. |
7 | | -- Work completed: Added generated existing-target mapping for void updates, destination-returning reference updates, nullable destination-returning replacement construction, `ref` struct updates, runtime null destination checks, direct scalar assignments, writable nested replacement, collection replacement, and `IgnoreNullSourceMembers` patch guards for direct source members and configured source paths. |
8 | | -- Tests added or updated: Added `Milestone10ExistingTargetMappingTests` covering void/reference-returning updates, `ref` struct update, nullable destination-returning construction, null destination checks, nested source-path patch behavior, collection replacement, init-only rejection, get-only collection rejection, top-level array-update rejection, and `IgnoreNullSourceMembers` warning on new-object mappings. Added `Snapshots/Milestone10ExistingTarget.Mapper.g.cs`. |
9 | | -- Diagnostics added: Added `LITEMAPPER5001` InvalidUpdateSignature, `LITEMAPPER5002` NullableVoidDestinationNotSupported, `LITEMAPPER5003` StructUpdateRequiresRef, `LITEMAPPER5004` InitOnlyMemberCannotBeUpdated, `LITEMAPPER5005` NestedUpdateMappingRequired, and `LITEMAPPER5006` IgnoreNullOnlyValidForUpdate. |
10 | | -- Generated-source review: Representative Milestone 10 generated source is checked in and asserted. Reviewed output emits public partial update methods, direct destination assignments, `ArgumentNullException` guards for non-null destinations, nullable destination construction for returning updates, patch null-skipping guards, private deterministic collection/nested helpers, and no `System.Reflection`, `dynamic`, runtime registry, or runtime code generation. |
11 | | -- Validation evidence: `dotnet test tests\Mammoth.LiteMapper.Generator.Tests\Mammoth.LiteMapper.Generator.Tests.csproj --no-restore --filter Milestone10ExistingTargetMappingTests` initially failed for expected missing update behavior, then passed with 4 tests after implementation and snapshot assertion; `dotnet test tests\Mammoth.LiteMapper.Generator.Tests\Mammoth.LiteMapper.Generator.Tests.csproj --no-restore` passed with 41 tests; `dotnet restore Mammoth.LiteMapper.sln` passed; `dotnet build Mammoth.LiteMapper.sln --no-restore` passed with 0 warnings; `dotnet test Mammoth.LiteMapper.sln --no-build` passed with 53 total tests; `git diff --check` passed. |
12 | | -- Skipped validation: package-consumer, trimming, Native AOT, public package API compatibility, benchmarks, broader TFM/language/Roslyn matrix validation, enum mapping, recursive mapping and cycle tracking, explicit operators, numeric narrowing policy, target-specific emitted optimization, and compiling sample/documentation validation are later-milestone validations. |
| 7 | +- Work completed: Added enum-to-enum mapping for top-level and member conversions, by-name switch-expression rendering with runtime unknown-value throws, by-value checked/unchecked casting, `UnmatchedEnumValues` policy handling, source alias validation, target alias support, zero-member validation, `[Flags]` atomic validation, runtime flags composite reconstruction, and custom converter precedence over enum strategy. |
| 8 | +- Tests added or updated: Added `Milestone11EnumMappingTests` covering by-name mapping, by-value mapping, unknown runtime numeric values, source aliases, target aliases through name selection, zero members, flags and composite flags, declared numeric overflow, `UnmatchedEnumValues.Throw`, `UnmatchedEnumValues.ByValue`, and custom converter precedence. Added `Snapshots/Milestone11EnumMapping.Mapper.g.cs`. |
| 9 | +- Diagnostics added: Added `LITEMAPPER7001` EnumMemberNotMapped, `LITEMAPPER7002` EnumAliasConflict, `LITEMAPPER7003` EnumZeroMemberNotMapped, `LITEMAPPER7004` EnumFlagNotMapped, and `LITEMAPPER7005` EnumValueOverflow. |
| 10 | +- Generated-source review: Representative Milestone 11 generated source is checked in and asserted. Reviewed output emits public partial enum mapping methods, direct switch expressions, checked casts for by-value mappings, deterministic enum member ordering, `ArgumentOutOfRangeException` default arms for unknown runtime values, and no `System.Reflection`, `dynamic`, runtime registry, or runtime code generation. |
| 11 | +- Validation evidence: `dotnet test tests\Mammoth.LiteMapper.Generator.Tests\Mammoth.LiteMapper.Generator.Tests.csproj --no-restore --filter Milestone11EnumMappingTests` initially failed for expected missing enum behavior, then passed with 7 tests after implementation and snapshot assertion; `dotnet test tests\Mammoth.LiteMapper.Generator.Tests\Mammoth.LiteMapper.Generator.Tests.csproj --no-restore` passed with 48 tests; `dotnet restore Mammoth.LiteMapper.sln` passed; `dotnet build Mammoth.LiteMapper.sln --no-restore` passed with 0 warnings; `dotnet test Mammoth.LiteMapper.sln --no-build` passed with 60 total tests; `git diff --check` passed. |
| 12 | +- Skipped validation: package-consumer, trimming, Native AOT, public package API compatibility, benchmarks, broader TFM/language/Roslyn matrix validation, recursive mapping and cycle tracking, explicit operators, numeric narrowing policy, target-specific emitted optimization, and compiling sample/documentation validation are later-milestone validations. |
13 | 13 | - Blockers: none known. |
14 | | -- Known issues: configurable unmapped-member diagnostics use paired internal descriptors with the same stable IDs and should receive editorconfig override coverage in future diagnostics work; constructor-parameter explicit configuration and optional-parameter `UseTargetDefault` interactions need broader coverage when constructor binding is expanded beyond current member-initializer scenarios; recursive nested and collection type graphs currently lack cycle-tracker plumbing until Milestone 12; enum mapping remains pending until Milestone 11. |
15 | | -- Next permitted action: Milestone 11, enum mapping. |
| 14 | +- Known issues: configurable unmapped-member diagnostics use paired internal descriptors with the same stable IDs and should receive editorconfig override coverage in future diagnostics work; constructor-parameter explicit configuration and optional-parameter `UseTargetDefault` interactions need broader coverage when constructor binding is expanded beyond current member-initializer scenarios; recursive nested and collection type graphs currently lack cycle-tracker plumbing until Milestone 12. |
| 15 | +- Next permitted action: Milestone 12, recursive type analysis and `ThrowOnCycle`. |
0 commit comments