make dependents work on constructors#6115
Merged
mitchellwrosen merged 3 commits intotrunkfrom Jan 15, 2026
Merged
Conversation
Contributor
|
I just gave this a try in a few places and it worked great! In a big codebase like nimbus the results weren't immediate, but they were fast enough that it didn't feel bad. And I don't know how much of that delay was on rendering a large number of results vs the query backing it. I haven't reviewed the code, but consider this a 👍 for the user experience! |
Contributor
|
Great! Could you add a ticket to track the migration one, but this should be good enough for the foreseeable future. |
aryairani
approved these changes
Jan 14, 2026
aryairani
reviewed
Jan 14, 2026
Member
Author
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.
Overview
Fixes #5246
This PR amends
dependentsto work better on constructors.Previously,
dependents <constructor>would function likedependents <type>, since that's the fidelity of the information available to us in the dependents index.To avoid a migration and lengthy development cycle, this PR simply implements
dependents <constructor>against the existing database schema.After fetching term and type dependents with
dependents <arg>, if<arg>matches any constructors, we pass back over the results, deserialize the types and terms, crawl the dependencies of the in-memory ABTs, and filter out any dependents without any direct dependencies that overlap<arg>. It's obviously slower than using a database index, so we can reconsider if in practice we are seeing inexcusably slowdependentsruns. I tried a couple and they seem fast enough, though.Test coverage
I tested this manually, and amended the transcript which showed that previously we didn't have constructor-granularity dependents implemented.