Skip to content

Expand Generator Diagnostics #29

@j-d-ha

Description

@j-d-ha

Priority: P3 - Nice to have
Tier: 4 - Polish
Effort: Large (10-12 hours)

Already In Codebase

  • Diagnostics exist but are currently minimal:
    • DM0001 CannotConvertFromAttributeValue
    • DM0101 NoMapperMethodsFound
    • DM0102 MismatchedPocoTypes
    • 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)

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions