fix(mix_generator): allow plain MixableSpec widget targets - #1025
Conversation
|
I found a resolution-state edge case that looks blocking for the exact generated-Styler parameter shape this PR adds. On a clean build, a parameter such as I reproduced this by including a prior generated part containing This is relevant to checked-in or otherwise independently resolved generated parts. Remix has that shape—its plain widgets type A localized fix is to pass |
|
Follow-up from validating the current head ( When a target constructor uses an unqualified static member from its own class as a default, for example The Verdict remains: the overall direction is correct, but this static-default qualification should be fixed before #1025 merges so other same-library targets cannot generate uncompilable code. |
Related issue
Closes #1022.
Description
@MixableSpec(target:)now accepts plainWidgetconstructors when their namedstyleparameter can receive the generated Styler, removing the unnecessaryStyleWidgetinheritance requirement.Changes
Widgetsubtype and constructor contract while preserving existing parameter and generic-target handling.Style<Spec>,Object, and exact generated-Styler parameters, including when a prior generated part is already resolved.Style<Spec>by analyzer element and library identity so unrelated same-named types are rejected.call()methods, sharing the established@MixWidget(target:)behavior while leaving top-level defaults unchanged.@MixableStylermixins retain their stricterStyle<Spec>receiver contract.Review Checklist
main.StyleWidgettargets remain supported.Additional Information (optional)
melos run gen:buildandmelos run cipassed, both protocol inventories passed, all 11 packages passed Dart analysis, and the changed planner passed focused DCM analysis. The aggregate analysis command remains non-zero only for 11 pre-existing DCM findings on unchanged lines.