Update imports in unloaded composite projects after file rename#4695
Draft
jakebailey with Copilot wants to merge 2 commits into
Draft
Update imports in unloaded composite projects after file rename#4695jakebailey with Copilot wants to merge 2 commits into
jakebailey with Copilot wants to merge 2 commits into
Conversation
Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix import updates after file rename in composite projects
Update imports in unloaded composite projects after file rename
Jul 21, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Loads composite project trees before file-rename analysis so unopened dependent projects receive import updates.
Changes:
- Request full project-tree loading for rename operations.
- Add fourslash regression coverage.
- Add a project-state baseline confirming the dependent project loads.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
internal/project/session.go |
Loads project trees before creating language services. |
internal/fourslash/tests/getEditsForFileRenameWithSolutionConfigFile_test.go |
Verifies import updates in an unopened project. |
testdata/baselines/reference/fourslash/state/getEditsForFileRenameLoadsUnopenedCompositeProject.baseline |
Records expected project loading state. |
jakebailey
reviewed
Jul 21, 2026
| ResourceRequest{Documents: uris}, | ||
| ResourceRequest{ | ||
| Documents: uris, | ||
| ProjectTree: &ProjectTreeRequest{}, |
Member
There was a problem hiding this comment.
Hm, doesn't this request this info for all callers now? Seems like a big hammer but maybe we should always have this info anyway?
I am not familiar enough apparently
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.
File renames only updated imports in already-loaded projects. Imports from unopened projects in the same composite project tree were omitted.
Changes