Repository navigation
make current Query object available via context - #10540
Merged
Merged
Conversation
sipsma
force-pushed
the
query-context
branch
2 times, most recently
from
June 5, 2025 22:13
1dac775 to
f84835e
Compare
Signed-off-by: Erik Sipsma <[email protected]>
Signed-off-by: Erik Sipsma <[email protected]>
Signed-off-by: Erik Sipsma <[email protected]>
vito
approved these changes
Jun 6, 2025
vito
left a comment
Contributor
There was a problem hiding this comment.
Makes sense! Always seemed like the winds were blowing this way 💨
3 of 34 tasks
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.
Spinning out from #10497 to double check it doesn't (somehow) break anything in isolation and to rip the bandaid on a huge source of rebase conflicts earlier.
Putting
Queryas a field in structs is a surprisingly significant source of pain when it comes to serializing/deserializing objects into/from the DB, mainly because the standard json marshal/unmarshal interfaces don't accept a context and thus don't allow smuggling of un-persistable things likeQuery(which is really just an interface to per-session/per-client state these days).I dealt with it for a while but hitting more annoying cases (specifically when it's hidden behind objects wrapped in interfaces, i.e.
GitRepository), so just want to squash it.This whole problem is also unnecessary since now-a-days everything in query is based on the context anyways, so we can just plumb
Queryitself around through context for now.There's probably even more detailed refactors possible here, but went with the approach here since it seemed to be easier to have AI do (though this still involved a somewhat painful amount of human hand-editing afterwards).
Draft while