Skip to content

Extend minimal builder contract to require empty constructor #308

Description

@igel-devin-ai

Sub-task of #301.

Goal

Extend the contract check in BuilderScopeResolver for referenced builders to require a public no-arg constructor B() (until the sibling task adds static factories) in addition to the existing B(T) + build() checks.

Why

The nested-builder consumer emits new FooBuilder() when the field is unset, but the contract today only verifies ctor(T) + build() — a hand-written builder without a no-arg ctor passes and produces uncompilable generated code.

Breaking change

Referenced builders that satisfy today's contract but lack B() stop qualifying; their fields degrade to plain setters (correct output, but observable).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions