Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builder type should not extend model object #631

Open
SimonCockx opened this issue Aug 31, 2023 · 1 comment
Open

Builder type should not extend model object #631

SimonCockx opened this issue Aug 31, 2023 · 1 comment
Labels
bug Something isn't working subject: code generation This issue is about code generation

Comments

@SimonCockx
Copy link
Contributor

Right now, generated builder classes extend the model object they are supposed to build, which is error-prone.

Example: checking equality between two model objects might return False although they are exactly the same, just because one of the arguments is a builder. This leads to hard-to-spot bugs in the generated code, which might have been spotted early on by a static compilation issue if the builder class wouldn't extend the model object.

@SimonCockx SimonCockx added bug Something isn't working subject: code generation This issue is about code generation labels Aug 31, 2023
@SimonCockx
Copy link
Contributor Author

SimonCockx commented Aug 31, 2023

Related: #632, #633

We should think carefully about the exact use cases we want to support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working subject: code generation This issue is about code generation
Projects
None yet
Development

No branches or pull requests

1 participant