-
Notifications
You must be signed in to change notification settings - Fork 18
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
chore: circular dependency between types.ts and validate-request.ts #1337
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1337 +/- ##
=======================================
Coverage 86.00% 86.00%
=======================================
Files 31 31
Lines 1443 1443
Branches 315 315
=======================================
Hits 1241 1241
Misses 200 200
Partials 2 2
|
src/lib/validate-types.ts
Outdated
*/ | ||
export interface GroupVersionResource { | ||
readonly group: string; | ||
readonly version: string; | ||
readonly resource: string; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do generic kinds needed by all the app need to go to a validate types? This is a little confusing to me. I see mutate processor pulling from validate-types too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had moved them initially to fix the circular dependency. But now that I've made some other changes, I'll go back to revisit the initial changes to see if I can move things back to types.ts so that both mutate and validate can import them from there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bloating our softwares size is going to cause even more memory problems, this is not the approach we should take when fixing circular dependencies because we are not introducing more problems. We should fix the code that was already merged in that duplicated types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code is duplicated across types, leading to increase in memory and storage size. Increasing bloat of Pepr is going to cause more problems and actually introduce more dependencies since the code is now dependent on the duplicate type. This is an anti-pattern
Replaced by: chore: fix circular dependencies related to types.ts #1339 |
Description
We need to fix the circular dependency between types.ts and validate-request.ts
...
End to End Test:
Related Issue
Fixes #
Relates to #
Type of change
Checklist before merging