Skip to content

fix: FIR checker fallback for unresolved property symbols (#22)#23

Merged
wilmveel merged 1 commit intomainfrom
fix/serializable-target-support
Mar 26, 2026
Merged

fix: FIR checker fallback for unresolved property symbols (#22)#23
wilmveel merged 1 commit intomainfrom
fix/serializable-target-support

Conversation

@wilmveel
Copy link
Copy Markdown
Contributor

Summary

  • Fixes FIR checker fails to detect field mappings when target type is from generated source directory #22 — FIR checker incorrectly reports "Missing mapping" when target DTO properties can't be resolved via toResolvedPropertySymbol() (e.g. when target type is generated by Wirespec into a separate source directory)
  • Falls back to reading the field name from FirNamedReference on the calleeReference, which KMapperAssignAlterer always preserves
  • Applied to both "to" (explicit mappings) and "ignore" (ignored fields) handlers

Test plan

  • Added integration test: explicit mapping with @Serializable target DTO in separate file
  • All existing integration tests pass (BasicMappingTest, SerializableTest, EnumMappingTest)
  • Compiler plugin unit tests pass

🤖 Generated with Claude Code

…ails (#22)

When target types are from generated source directories (e.g. Wirespec),
toResolvedPropertySymbol() can return null. Fall back to reading the
field name from FirNamedReference on the calleeReference, which is
always preserved by KMapperAssignAlterer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@wilmveel wilmveel merged commit 128e5d7 into main Mar 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FIR checker fails to detect field mappings when target type is from generated source directory

1 participant