feat: rank completion candidates by dependency provenance#218
Merged
Conversation
5cd03d2 to
cfa3f3c
Compare
cfa3f3c to
73ece8f
Compare
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Class, function, and constant completions are now sorted by origin: 1. project code 2. core/stub symbols 3. explicit Composer dependencies (require / require-dev) 4. transitive vendor dependencies The provenance is inferred during indexing from composer.json's require/require-dev sections and vendor/composer/installed.json package roots. A shared ClassCompletionOrigin enum and sort helper avoid duplicating ranking logic across the three symbol kinds. New fields on Backend: fqn_origin_index, autoload_function_origin_index, autoload_constant_origin_index, vendor_package_origin_roots. The classmap_scanner now tracks per-package origins during vendor scanning and exposes them in WorkspaceScanResult. Closes #183
73ece8f to
1fcf154
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.
Class, function, and constant completions are now sorted by origin:
The provenance is inferred during indexing from composer.json's require/require-dev sections and vendor/composer/installed.json package roots. A shared ClassCompletionOrigin enum and sort helper avoid duplicating ranking logic across the three symbol kinds.
New fields on Backend: fqn_origin_index, autoload_function_origin_index, autoload_constant_origin_index, vendor_package_origin_roots. The classmap_scanner now tracks per-package origins during vendor scanning and exposes them in WorkspaceScanResult.
Closes #183