Netflix / Netflix/dgs-codegen

Duplicated builders of similar types implementing a single interface

Open
#369 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
217
Forks
116
PR merge metrics
No merged PRs in 30d

Description

In java, the builders are auto-generated from schema types and they do not share an interface. Hence we end up adding duplicated builder code for each type. This duplicated lines can be reduced by using super builder or the generated types can be grouped with an interface.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining how builders are auto-generated from schema types and where the duplicated builder code is produced. Compare the proposed super builder approach with grouping generated types behind a shared interface; done means the duplication is reduced without changing the generated types' intended behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.