Replies: 2 comments
-
I like the idea of having code generation as a build step - I think the main benefit would be that you wouldn't need to check in any generated code/docs to version control - you could .gitignore them and know that they'd be regenerated for anyone else that checks out the repo, or in a pipeline. I'd consider the build failing after you regenerate the code with a new operation as a "feature", with the build error guiding users on what to do next :) I think the challenge with codegen as a build step is it's a bit harder to hook into the monorepo and set up dependencies - eg if there's no I could potentially see a bit of a hybrid approach working - where the "shell" of the generated client projects are generated via |
Beta Was this translation helpful? Give feedback.
-
We now have |
Beta Was this translation helpful? Give feedback.
-
An example of adding a new endpoint/operation:
Workflow in current version
npx projen
that kicks off the generatorsbuild
immediately, your code fails to build because you need to introduce a new lambda integrationWorkflow in proposed version
generate
task for the project, which runs the generators, changes from generated package become visibleMoving the generation of client libs into build will result in build failure if there is a change. Although I'm not sure if we should add this
generate
task into the build step as well (probably yes).@cogwirrel any take on this?
Beta Was this translation helpful? Give feedback.
All reactions