-
Notifications
You must be signed in to change notification settings - Fork 77
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
feat(type-safe-api): add commitGeneratedCode option to control generated code #814
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 5a93d6a. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
Hi @jstrunk, Getting some test failures - can you please update? |
Hi @agdimech, Thanks for pointing that out. The other snapshots got updated for the Python projects now that those are committed by default. |
I've been chatting with @cogwirrel about this and they mentioned that having a different default for Python doesn't seem right which I tend to agree with. A possible alternative solution could be: 1.) Write a temporary blank readme during install (just like we do for init.py here) |
I agree. I have validated this idea. I'll make a new PR with solution 1. Then I'll clean up this PR. |
…ted code This commit introduces a new `commitGeneratedCode` option to the TypeSafeApiProject, which allows controlling whether generated code should be committed or ignored for all generated projects. The main changes include: - Add a `commitGeneratedCode` option to the TypeSafeApiProject and related options interfaces. - Set the default value of `commitGeneratedCode` to `false`. - Conditionally add patterns to .gitignore based on the `commitGeneratedCode` option for all generated projects. - Update tests to cover the new `commitGeneratedCode` option. By default, the generated code will be ignored in the repository, except for Python projects where it will be included to allow for easier distribution and deployment of the generated artifacts using Poetry. Fixes: aws#813
b220dbe
to
5a93d6a
Compare
This PR partially addresses #819 |
This commit introduces a new
commitGeneratedCode
option to the TypeSafeApiProject, which allows controlling whether generated code should be committed or ignored for all generated projects.The main changes include:
commitGeneratedCode
option to the TypeSafeApiProject and related options interfaces.commitGeneratedCode
tofalse
.commitGeneratedCode
option for all generated projects.commitGeneratedCode
option.By default, the generated code will be ignored in the repository.