-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Priority: P3 - Nice to have
Tier: 4 - Polish
Effort: Large (10-12 hours)
Already In Codebase
- Diagnostics exist but are currently minimal:
DM0001CannotConvertFromAttributeValueDM0101NoMapperMethodsFoundDM0102MismatchedPocoTypes- Defined in
src/LayeredCraft.DynamoMapper.Generators/Diagnostics/DiagnosticDescriptors.cs
Goal
Expand generator diagnostics to cover common misconfigurations with clear, actionable messages and correct source locations.
Scope (examples)
- Duplicate DynamoDB field names (after convention + overrides)
- Member name mismatches / unknown member references in
[DynamoField]and[DynamoIgnore] - Conflicting ignore vs field config
- Kind override validation (ties into Story 3.2 / issue Validate Kind Override Compatibility #20)
- Hook signature validation (ties into Story 2.x)
- Custom method signature validation (ties into Story 3.5 / issue Validate DynamoField Custom Methods (ToMethod/FromMethod) #23)
- Converter diagnostics (ties into Story 3.4 / issue Add Converter Type Support (IDynamoConverter) #22)
Implementation notes
- Add new
DiagnosticDescriptors with stable IDs. - Attach diagnostics to the most relevant location (attribute argument, method name token, etc.).
- Prefer failing fast per member while still generating other valid mappings.
Acceptance criteria
- Key configuration errors are reported at compile time with good messages.
- Diagnostics point to the correct source span.
- Tests cover at least a representative set of diagnostics.
Metadata
Metadata
Assignees
Labels
No labels