Repository navigation
Avoid duplicate file rename edits for dynamic imports - #65583
Daniel Rosenwasser (DanielRosenwasser) wants to merge 4 commits into
Conversation
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
Copilot I don't understand why we would have processed the same node twice. Still makes no sense after the change. Add a short but explicit comment about how that might happen above lastNode and why it needs to be tracked. |
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Added the explanation in |
|
Copilot okay that makes sense but I would expect that to be more of a problem with |
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Added test context in |
Dynamic import references were collected more than once when a module specifier appeared alongside
import-like text in the same AST node. File renames could therefore emit overlapping edits and panic the language server.require, and literal import-type nodes during traversal.import("./imported.ts")withallowImportingTsExtensions.workspace/willRenameFilespanics with "changes overlap" when the renamed file is loaded byimport()with a.tsspecifier #65505