docs: MapStruct parity matrix + migration guide (audit deliverables)#224
Merged
Conversation
Ships the two adoption documents produced by the evidence-grounded parity audit (7 feature-group auditors, each adversarially re-verified against the cited source and tests): - docs/mapstruct-parity.md — 29 MapStruct features scored 13 full / 16 partial / 0 missing, each with the concrete telescope idiom, honest limitations, and the file:line evidence the verdict rests on. Two verdicts were downgraded and two snippets corrected by the verification pass. - docs/mapstruct-migration.md — the one-mapper-at-a-time migration recipe: coexistence setup, a MapStruct->telescope translation table, introspection- based verification asserts, and the up-front gotchas. Audit follow-ups fixed in the same pass: - Mapper.into javadoc claimed a missing setter throws IllegalArgumentException; the implementation (and MapperIntoTest) silently skips it, matching MapStruct's @MappingTarget semantics — javadoc now says so. - MergeStep javadoc referenced the removed Mapping.auto() factory; reworded to the class-inference mechanism the Mapping row factories actually share.
There was a problem hiding this comment.
Pull request overview
Adds the two documentation deliverables from the MapStruct parity audit (a feature-parity matrix and a migration recipe), and corrects stale/inaccurate Javadocs surfaced during the audit.
Changes:
- Add
docs/mapstruct-parity.md: evidence-backed MapStruct↔telescope parity matrix with per-row citations and limitations. - Add
docs/mapstruct-migration.md: step-by-step “one mapper at a time” migration guide with verification assertions. - Update Javadocs to reflect current behavior/API references (
Mapper.intosetter behavior;MergeStepdoc no longer references removedMapping.auto()).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| docs/mapstruct-parity.md | Adds the parity matrix with citations and feature-status notes. |
| docs/mapstruct-migration.md | Adds a practical migration guide and verification workflow. |
| core/src/main/java/io/github/eschizoid/telescope/mapping/MergeStep.java | Fixes stale Javadoc reference to removed API. |
| core/src/main/java/io/github/eschizoid/telescope/conversion/Mapper.java | Updates into() Javadoc to match “missing setter is skipped” semantics. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #224 +/- ##
============================================
+ Coverage 79.59% 79.63% +0.04%
- Complexity 1841 1842 +1
============================================
Files 80 80
Lines 5783 5790 +7
Branches 1215 1209 -6
============================================
+ Hits 4603 4611 +8
- Misses 660 661 +1
+ Partials 520 518 -2 ☔ View full report in Codecov by Harness. |
… wording Parity matrix: - Detail headings are now plain feature names, so every summary-table anchor resolves under GitHub's slugger (emoji headings produced leading-dash slugs; generics in headings were swallowed as HTML). Status moved into each section body. - Bare generic type expressions in prose are backticked — previously rendered as vanished HTML tags (List<CarDto> showed as 'List'). - De-puffed three 'strictly better/safer' claims and acknowledged the broader-scope trade-off of pair-keyed rename rows; the tally line now says 'no feature area is unreachable' since the collection-merge residual gap has no workaround. Migration guide: - constant/defaultValue row now names the real first-class factories (constant(...), toOrElse(...)) instead of a hand-rolled transform row. - ignore=true row distinguishes source-side drop(...) from target-only fields. - Merge example uses the bean accessor shape (CustomerDto::getCity). - WARN row states the silent-vs-warning nuance (-Atelescope.verify=warn is the build-time analog), aligned with the matrix. - Introspection links point at the README (the matrix has no introspection row) and the 'every row above' claim is scoped to mapping rows.
…-consistent evidence - The migration guide's side-by-side opener is now two valid java fences (MapStruct interface vs telescope value) instead of one unparseable mixed block. - The verification snippet imports OpticNode.Mapped so it compiles as pasted. - The @objectfactory evidence note no longer cites a repo-wide grep that this document itself now invalidates.
…n row, harmonized into() javadoc - Parity-matrix evidence citations now carry the full module path everywhere (four bare module-relative cites expanded). - The migration table's type-conversion row states its direction (source String -> target LocalDate: forward parses, backward formats) so the function order can't be misread. - Mapper.into's equivalence paragraph no longer contradicts the silent-skip setter note — 'each property ... is written' with the skip cross-reference.
… snippet, residual contradictions - The WARN-analog cell no longer claims -Atelescope.verify=warn warns on mapperForward sites (the verifier skips completeness on lenient factories); the real build-time-warning path is strict mapper(...) at verify=warn. - The in-place-update snippet's patch(...) call is typed correctly (patch(base A, partial B) -> A; all three positions were inverted). - MergeStep.from javadoc drops the build-time source-bag validation claim (the check happens at forward time via Sources.byClass). - Mapper.into's scoping comment no longer cites an IllegalArgumentException the silent-skip write path can't raise. - Merge's auto-mismatch error stops recommending a converter-taking from(...) overload that doesn't exist. - Expressions snippet separates compute vs toOrElseGet on the same field (the fixup would stamp over the default, leaving a dead row); traceId is typed String consistently across snippets.
The generics-backticking pass wrapped the type name up to '<' as its own span, splitting String<->number style tokens into broken markdown. Each conversion pair is now one clean code span.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The two adoption documents from the MapStruct parity audit (items 2 and 1 of the kill-MapStruct plan), plus the stale javadocs the audit surfaced.
docs/mapstruct-parity.md— the verified matrixfile:lineevidence it rests on.@Default, config inheritance) and two snippets corrected in that pass.docs/mapstruct-migration.md— the migration guideOne-mapper-at-a-time recipe: coexistence setup, MapStruct→telescope translation table, introspection-based verification asserts (
explain().skipped()empty + golden-input equality against the still-present MapStruct impl), and up-front gotchas.Audit follow-ups (javadoc fixes)
Mapper.intoclaimed a missing setter throwsIllegalArgumentException; the implementation (pinned byMapperIntoTest) silently skips — matching MapStruct's@MappingTargetsemantics. Javadoc now tells the truth.MergeStepreferenced the removedMapping.auto()factory.Related
MapperBuilder.inheritsilently drops row groups bound to a different type pair — filed as MapperBuilder.inherit silently drops row groups bound to a different type pair #223 and cross-referenced from both docs.Test
./gradlew spotlessApply buildgreen;MapperIntoTestgreen against the corrected javadoc.