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

Reduce usage of CodegenTarget #1765

Open
david-perez opened this issue Sep 23, 2022 · 0 comments
Open

Reduce usage of CodegenTarget #1765

david-perez opened this issue Sep 23, 2022 · 0 comments
Labels
refactoring Changes that do not affect our users, mostly focused on maintainability

Comments

@david-perez
Copy link
Contributor

david-perez commented Sep 23, 2022

We introduced CodegenTarget in generators to branch off depending on whether we were generating a client or a server. Now that we're slowly unburying ourselves from the technical debt incurred by having core generators used by both projects in the codegen (now codegen-client) module, we can reduce its usage.

In general, the code is more maintainable by leveraging composition/customization injections/inheritance (probably in that order) in order to tweak a code generator in particular cases. This issue tracks the lofty goal of refactoring to these mechanisms instead of introducing if (target == ...), which hinders separation of concerns.

An ambitious goal would be for CodegenTarget to get entirely removed, but we'll see if that's attainable or desirable.

@jdisanti jdisanti added the refactoring Changes that do not affect our users, mostly focused on maintainability label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Changes that do not affect our users, mostly focused on maintainability
Projects
None yet
Development

No branches or pull requests

2 participants