[MOD-11410] Make QueryError Fields Private#6928
Closed
Conversation
Collaborator
|
Changes look good to me. Could you rebase on master instead of merging master in here? |
33572f2 to
8d84752
Compare
hdoordt
previously approved these changes
Sep 29, 2025
2435688 to
25a8a5f
Compare
There are two places in this commit where QueryError.detail were previously being accessed by consumers of the QueryError API. This probably shouldn't happen since I believe detail (and message) should only be read from and written to via the API. I'm not 100% sure though, and this should be carefully looked at when reviewed.
25a8a5f to
7b60b50
Compare
7b60b50 to
eec851a
Compare
eec851a to
bf61081
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6928 +/- ##
==========================================
- Coverage 86.11% 86.06% -0.06%
==========================================
Files 310 311 +1
Lines 49797 50097 +300
Branches 9726 9929 +203
==========================================
+ Hits 42882 43115 +233
- Misses 6763 6831 +68
+ Partials 152 151 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
2 tasks
Contributor
Author
|
Closed for #6962 since branches cannot have |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
QueryErrorfields private, accessing them only via API.QueryError_Default().QueryError_Initwas removed in favor of initializing withQUERY_ERROR_DEFAULT.== QUERY_OKand!= QUERY_OKwere mostly replaced withQueryError_IsOkandQueryError_HasError.For review purposes, each field was made private in a separate commit.
Note that there are two places where
.detailwas accessed directly, so reviewers please look carefully at the commit whereQueryError.detailwas made private.Main objects this PR modified
QueryError.Mark if applicable
QueryError_InitQueryError_DefaultQueryError_HasReachedMaxPrefixExpansionsWarningQueryError_SetReachedMaxPrefixExpansionsWarningQueryError_IsOkQueryError_HasErrorto explicitly returnboolNote
Encapsulates QueryError fields, adds new helper APIs, removes direct struct access/brace init, and updates all code/tests to use QueryError_Default/IsOk/HasError and new prefix-expansion warning helpers.
QueryErrorfields private (rename to internal members) and add APIs:QueryError_Default,QueryError_IsOk,QueryError_HasReachedMaxPrefixExpansionsWarning,QueryError_SetReachedMaxPrefixExpansionsWarning(andQueryError_HasErrornow returns bool).QueryError_Init; replace brace initializers and.code == QUERY_OKchecks with new helpers; eliminate direct access to.detail,.code, andreachedMaxPrefixExpansions.QueryError_IsOk, warning helpers,QueryError_Default).query_error.hwhere needed.Written by Cursor Bugbot for commit 33db84c. This will update automatically on new commits. Configure here.