Skip to content

refactor(target): centralize and simplify target resolution#365

Draft
tris203 wants to merge 6 commits into
seblyng:mainfrom
tris203:target_refactor
Draft

refactor(target): centralize and simplify target resolution#365
tris203 wants to merge 6 commits into
seblyng:mainfrom
tris203:target_refactor

Conversation

@tris203

@tris203 tris203 commented May 19, 2026

Copy link
Copy Markdown
Collaborator

Move solution and project target resolution logic from sln/utils to a new roslyn/target module, consolidating related logic and improving clarity. Update all usages to reference the new module. Remove the now-redundant sln/utils module. Refactor store to clarify client/selected target handling and add sync helper. Update autocmd and health checks to use the new store API. Add comprehensive tests for target resolution logic.

BREAKING CHANGE: sln/utils is removed; use roslyn/target instead for target prediction and resolution.

tris203 and others added 6 commits May 19, 2026 22:10
Move solution and project target resolution logic from sln/utils to a new
roslyn/target module, consolidating related logic and improving clarity.
Update all usages to reference the new module. Remove the now-redundant
sln/utils module. Refactor store to clarify client/selected target
handling and add sync helper. Update autocmd and health checks to use
the new store API. Add comprehensive tests for target resolution logic.

BREAKING CHANGE: sln/utils is removed; use roslyn/target instead for
target prediction and resolution.
Replaced pattern matching and list traversals with table lookups for
extensions and ignored directories. This improves the performance of
solution and project file discovery, especially in large codebases.
Also simplified target filtering and ambiguous root resolution logic.
Refactored the predict_target function to streamline its logic by removing
the intermediate result variable and directly returning the chosen or
filtered target. Also moved the logging of the selected target to the
resolve_open_target function for better separation of concerns.
I felt like it was too many exposed methods from the store module.
We can keep the API surface smaller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants