mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Move storage for VFS into editor document
The invocation options are not an appropriate place to put this state, since it can change between requests. This moves it to the editor document, allowing us to change the specific VFS instance without causing a rebuild (unless the contents/timestamps for a dependency change).
This commit is contained in:
@@ -220,7 +220,9 @@ void SwiftLangSupport::codeComplete(
|
||||
Optional<VFSOptions> vfsOptions) {
|
||||
|
||||
std::string error;
|
||||
auto fileSystem = getFileSystem(vfsOptions, error);
|
||||
// FIXME: the use of None as primary file is to match the fact we do not read
|
||||
// the document contents using the editor documents infrastructure.
|
||||
auto fileSystem = getFileSystem(vfsOptions, /*primaryFile=*/None, error);
|
||||
if (!fileSystem)
|
||||
return SKConsumer.failed(error);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user