(Sources-2) oak_db::workspace_dependencies()#1287
Open
DavisVaughan wants to merge 5 commits into
Open
Conversation
lionel-
approved these changes
Jun 24, 2026
aee7077 to
251a097
Compare
f4f1f2c to
15fb5ba
Compare
41e96ce to
8c166c5
Compare
We are guessing there won't ever be more than 100-200 namespace accesses within a single R file, so this is likely to never be a performance or memory issue, and the Vec impl is simpler to reason about.
a1a4bce to
8fb644d
Compare
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.
Progress towards #1234
Branched from #1286
Two new things here:
File::used_packages()is a tracked query that returns theNames of all packages used by this filelibrary()andrequire()are included (reusing the existingattached_packages())::and:::are included (using the newnamespaced_accesses()from (Sources-1) TeachSemanticIndexaboutNamespacedAccesses #1286)library()or::calls should not affect this query result, unlikeattached_packages())oak_db::workspace_dependencies()is a tracked query that returns aVec<Package>of every installed package used by this workspace.File::used_packages()on eachworkspace_file()DESCRIPTIONif you have a workspace package open. In particular, it collectsImportsandDepends. I have omittedSuggestsbecause typically they are referenced by::already if they are used, so they probably aren't worth it to also include here?Two notes about
oak_db::workspace_dependencies():File::used_packages()is thrown out. The user can't actually use this, and we won't have a package version to look up anyways.R/folder.oak_db::workspace_dependencies()will be used in a future PR to detect the set of changed packages after each revision change.