Reduce usage of CodegenTarget
#1765
Labels
refactoring
Changes that do not affect our users, mostly focused on maintainability
CodegenTarget
#1765
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 thecodegen
(nowcodegen-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.The text was updated successfully, but these errors were encountered: