-
Notifications
You must be signed in to change notification settings - Fork 624
Firestore: remove unused compareTo() computation #5132
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
Conversation
Remove a useless invocation of compareTo() whose result was being ignored. It appears that this useless compareTo() call was accidentally left behind from some previous refactor. Comparing it to the JS and iOS implementations, https://github.com/firebase/firebase-js-sdk/blob/aea4a4471306b089a02b207d2df285dfc71666c7/packages/firestore/src/core/view.ts#L295-L300 and https://github.com/firebase/firebase-ios-sdk/blob/876b9624e490cfc9451250d1a02eb959f6746927/Firestore/core/src/core/view.cc#L266-L275, respectively, it appears that the desired logic omits this useless compareTo() call.
📝 PRs merging into main branchOur main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released. |
1 similar comment
📝 PRs merging into main branchOur main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released. |
Coverage Report 1Affected Products
Test Logs |
Unit Test Results 162 files + 134 162 suites +134 1m 53s ⏱️ +5s Results for commit 4a7e101. ± Comparison against base commit 52389ce. This pull request removes 279 and adds 1164 tests. Note that renamed tests count towards both.
|
Size Report 1Affected Products
Test Logs |
Startup Time Report 1Note: Layout is sometimes suboptimal due to limited formatting support on GitHub. Please check this report on GCS. Notes
Startup Times
|
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.
LGTM
Remove a useless invocation of compareTo() whose result was being ignored. It appears that this useless compareTo() call was accidentally left behind from some previous refactor. Comparing it to the JS and iOS implementations, https://github.com/firebase/firebase-js-sdk/blob/aea4a4471306b089a02b207d2df285dfc71666c7/packages/firestore/src/core/view.ts#L295-L300 and https://github.com/firebase/firebase-ios-sdk/blob/876b9624e490cfc9451250d1a02eb959f6746927/Firestore/core/src/core/view.cc#L266-L275, respectively, it appears that the desired logic omits this useless compareTo() call.
This "bug" was detected by static analysis of https://errorprone.info/bugpattern/CheckReturnValue in google3 (Googlers see cl/544688630 and cl/544704978).