mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[SourceKit] Allow passing cancel_on_subsequent_request: 0 for all requests that use a OncePerASTToken
We need this option for `collectVariableType` (aka inlay type hints) but since I’m at it, I’m adding an option to disable the implicit request cancellation for all requests that have it since we don’t want it in LSP at all. Prerequisite to fixing https://github.com/swiftlang/sourcekit-lsp/issues/2021 / rdar://145871554, need to adopt this option in SourceKit-LSP.
This commit is contained in:
@@ -619,6 +619,7 @@ public:
|
||||
|
||||
void editorOpenSwiftSourceInterface(
|
||||
StringRef Name, StringRef SourceName, ArrayRef<const char *> Args,
|
||||
bool CancelOnSubsequentRequest,
|
||||
SourceKitCancellationToken CancellationToken,
|
||||
std::shared_ptr<EditorConsumer> Consumer) override;
|
||||
|
||||
@@ -708,6 +709,7 @@ public:
|
||||
|
||||
void findLocalRenameRanges(StringRef Filename, unsigned Line, unsigned Column,
|
||||
unsigned Length, ArrayRef<const char *> Args,
|
||||
bool CancelOnSubsequentRequest,
|
||||
SourceKitCancellationToken CancellationToken,
|
||||
CategorizedRenameRangesReceiver Receiver) override;
|
||||
|
||||
@@ -723,6 +725,7 @@ public:
|
||||
StringRef PrimaryFilePath, StringRef InputBufferName,
|
||||
ArrayRef<const char *> Args, std::optional<unsigned> Offset,
|
||||
std::optional<unsigned> Length, bool FullyQualified,
|
||||
bool CancelOnSubsequentRequest,
|
||||
SourceKitCancellationToken CancellationToken,
|
||||
std::function<void(const RequestResult<VariableTypesInFile> &)> Receiver)
|
||||
override;
|
||||
@@ -730,6 +733,7 @@ public:
|
||||
void semanticRefactoring(StringRef PrimaryFilePath,
|
||||
SemanticRefactoringInfo Info,
|
||||
ArrayRef<const char *> Args,
|
||||
bool CancelOnSubsequentRequest,
|
||||
SourceKitCancellationToken CancellationToken,
|
||||
CategorizedEditsReceiver Receiver) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user