Skip to content

[enhancement] automatic module-wide builder generation #86

@mechite

Description

@mechite

It would be nice if it was possible to automatically generate a record builder, for any and all records in a given module.

Mark a module, perhaps with an annotation in module-info, and all record classes automatically get a generated builder.
In many and most cases, I doubt that having it can cause any negative effects.


It could also be nice if the generator can then see if there are zero usages, and automatically list out unused record builders in the build log, and maybe allow for tree-shaking these?

We cannot force tree-shaking, as that would negatively affect DX (as you would never be able to auto-import the builders).
I wonder if there is any way we can offer that configuration.

Tree-shaking them is not necessary and offers zero runtime advantage in most cases.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions