Randgalt / record-builder

Record builder generator for Java records
Apache License 2.0
723 stars 51 forks source link

Fix staged builders for single component records #179

Closed Randgalt closed 5 months ago

Randgalt commented 5 months ago

Fixes #177

Randgalt commented 5 months ago

attn: @gabrielshanahan

gabrielshanahan commented 5 months ago

Thanks @Randgalt, LGTM! But I would still advocate for generating staged builders even for 0-component record classes. I know that's a slightly weird and probably rare edge-case, but the same logic as described in #177 still applies - you can add a field at any time, and then want the compiler to tell you what you need to change.

Randgalt commented 5 months ago

@gabrielshanahan - I changed to allow no components as well. Please check.

gabrielshanahan commented 5 months ago

Awesome, thanks!