-
-
Notifications
You must be signed in to change notification settings - Fork 593
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
refactor: Fix autogenerate TS types #2460
Conversation
Thanks for opening this pull request!
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## alpha #2460 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 64 64
Lines 6256 6256
Branches 1451 1476 +25
=========================================
Hits 6256 6256 ☔ View full report in Codecov by Sentry. |
Doesn't this cause quite a delay when building the types on every commit? I mean if a developer commits every few lines, that would trigger type rebuilding every time. |
That is correct. It's about 3-5 seconds. |
And that delay may depend on the machine one is working on and be even slower in some cases. Not a fan of pre-commit hooks for code generation or modification - for many reasons. I believe a failing CI test and a good description in the error message makes more sense. Let's take the Parse Server options definitions for example. Generating them automatically would be a bad idea, because if someone edits a generated file instead of the source file for definitions, that change is lost and may go unnoticed. Better just fail. As for reviewing; mostly just requires pointing to the failing CI job and the contributor should know themselves what to do - with a good error msg. We should really get rid of husky. |
Let's do this. In this case removing |
Closing in favor of #2462 |
Pull Request
Issue
Currently developers would have to generate types themselves before committing. This could lead to types being missing in the future. I know there was talks for removing husky #2251 and there maybe a better way to do this. I'm open to discussion.
Approach
Tasks