File tree Expand file tree Collapse file tree 1 file changed +4
-14
lines changed
tools/SourceKit/lib/SwiftLang Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -1705,20 +1705,10 @@ ImmutableTextSnapshotRef SwiftEditorDocument::replaceText(
1705
1705
if (Length != 0 || Buf->getBufferSize () != 0 ) {
1706
1706
updateSemaInfo ();
1707
1707
1708
- if (auto Invok = Impl.SemanticInfo ->getInvocation ()) {
1709
- // Update semantic info for open editor documents of the same module.
1710
- // FIXME: Detect edits that don't affect other files, e.g. whitespace,
1711
- // comments, inside a function body, etc.
1712
- CompilerInvocation CI;
1713
- Invok->applyTo (CI);
1714
- auto &EditorDocs = Impl.LangSupport .getEditorDocuments ();
1715
- for (auto &Input : CI.getInputFilenames ()) {
1716
- if (auto EditorDoc = EditorDocs.findByPath (Input)) {
1717
- if (EditorDoc.get () != this )
1718
- EditorDoc->updateSemaInfo ();
1719
- }
1720
- }
1721
- }
1708
+ // FIXME: we should also update any "interesting" ASTs that depend on this
1709
+ // document here, e.g. any ASTs for files visible in an editor. However,
1710
+ // because our API conflates this with any file with unsaved changes we do
1711
+ // not update all open documents, since there could be too many of them.
1722
1712
}
1723
1713
}
1724
1714
You can’t perform that action at this time.
0 commit comments