@zzzen/pyright-internal 1.2.0-dev.20260628 → 1.2.0-dev.20260712
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analyzer/binder.js +51 -5
- package/dist/analyzer/binder.js.map +1 -1
- package/dist/analyzer/checker.js +12 -2
- package/dist/analyzer/checker.js.map +1 -1
- package/dist/analyzer/dataClasses.js +7 -0
- package/dist/analyzer/dataClasses.js.map +1 -1
- package/dist/analyzer/typeUtils.js +10 -4
- package/dist/analyzer/typeUtils.js.map +1 -1
- package/dist/localization/localize.d.ts +3 -0
- package/dist/localization/localize.js +1 -0
- package/dist/localization/localize.js.map +1 -1
- package/dist/localization/package.nls.en-us.json +1 -0
- package/dist/tests/fourslash/completions.qualname.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.qualname.fourslash.js +34 -0
- package/dist/tests/fourslash/completions.qualname.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.multipartModuleClassShadow.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.multipartModuleClassShadow.fourslash.js +39 -0
- package/dist/tests/fourslash/import.multipartModuleClassShadow.fourslash.js.map +1 -0
- package/dist/tests/typeEvaluator3.test.js +1 -1
- package/dist/tests/typeEvaluator4.test.js +1 -1
- package/dist/tests/typeEvaluator6.test.js +20 -0
- package/dist/tests/typeEvaluator6.test.js.map +1 -1
- package/dist/tests/typeServer/inProcTypeServerTestUtils.d.ts +39 -0
- package/dist/tests/typeServer/inProcTypeServerTestUtils.js +366 -0
- package/dist/tests/typeServer/inProcTypeServerTestUtils.js.map +1 -0
- package/dist/tests/typeServer/notebook.typeServer.test.d.ts +1 -0
- package/dist/tests/typeServer/notebook.typeServer.test.js +315 -0
- package/dist/tests/typeServer/notebook.typeServer.test.js.map +1 -0
- package/dist/tests/typeServer/typeServer.inProc.test.d.ts +1 -0
- package/dist/tests/typeServer/typeServer.inProc.test.js +234 -0
- package/dist/tests/typeServer/typeServer.inProc.test.js.map +1 -0
- package/dist/tests/typeServer/typeServer.virtualFileRedirect.test.d.ts +1 -0
- package/dist/tests/typeServer/typeServer.virtualFileRedirect.test.js +298 -0
- package/dist/tests/typeServer/typeServer.virtualFileRedirect.test.js.map +1 -0
- package/dist/typeServer/cancellation.d.ts +5 -0
- package/dist/typeServer/cancellation.js +14 -0
- package/dist/typeServer/cancellation.js.map +1 -0
- package/dist/typeServer/diagnosticUtils.d.ts +4 -0
- package/dist/typeServer/diagnosticUtils.js +71 -0
- package/dist/typeServer/diagnosticUtils.js.map +1 -0
- package/dist/typeServer/enums.d.ts +14 -0
- package/dist/typeServer/enums.js +524 -0
- package/dist/typeServer/enums.js.map +1 -0
- package/dist/typeServer/eventEmitter.d.ts +12 -0
- package/dist/typeServer/eventEmitter.js +32 -0
- package/dist/typeServer/eventEmitter.js.map +1 -0
- package/dist/typeServer/nodeMain.d.ts +1 -0
- package/dist/typeServer/nodeMain.js +65 -0
- package/dist/typeServer/nodeMain.js.map +1 -0
- package/dist/typeServer/notebookCellChain.d.ts +34 -0
- package/dist/typeServer/notebookCellChain.js +182 -0
- package/dist/typeServer/notebookCellChain.js.map +1 -0
- package/dist/typeServer/notebookDocumentHandler.d.ts +23 -0
- package/dist/typeServer/notebookDocumentHandler.js +158 -0
- package/dist/typeServer/notebookDocumentHandler.js.map +1 -0
- package/dist/typeServer/notebookUriMapper.d.ts +39 -0
- package/dist/typeServer/notebookUriMapper.js +164 -0
- package/dist/typeServer/notebookUriMapper.js.map +1 -0
- package/dist/typeServer/profilingStub.d.ts +10 -0
- package/dist/typeServer/profilingStub.js +12 -0
- package/dist/typeServer/profilingStub.js.map +1 -0
- package/dist/typeServer/programTypes.d.ts +136 -0
- package/dist/typeServer/programTypes.js +3 -0
- package/dist/typeServer/programTypes.js.map +1 -0
- package/dist/typeServer/programWrapper.d.ts +134 -0
- package/dist/typeServer/programWrapper.js +731 -0
- package/dist/typeServer/programWrapper.js.map +1 -0
- package/dist/typeServer/protocol/tspSupplemental.d.ts +43 -0
- package/dist/typeServer/protocol/tspSupplemental.js +48 -0
- package/dist/typeServer/protocol/tspSupplemental.js.map +1 -0
- package/dist/typeServer/protocol/typeServerProtocol.d.ts +1102 -0
- package/dist/typeServer/protocol/typeServerProtocol.js +290 -0
- package/dist/typeServer/protocol/typeServerProtocol.js.map +1 -0
- package/dist/typeServer/server.d.ts +54 -0
- package/dist/typeServer/server.js +620 -0
- package/dist/typeServer/server.js.map +1 -0
- package/dist/typeServer/serverUtils.d.ts +4 -0
- package/dist/typeServer/serverUtils.js +21 -0
- package/dist/typeServer/serverUtils.js.map +1 -0
- package/dist/typeServer/stubGenerator.d.ts +42 -0
- package/dist/typeServer/stubGenerator.js +895 -0
- package/dist/typeServer/stubGenerator.js.map +1 -0
- package/dist/typeServer/typeCache.d.ts +31 -0
- package/dist/typeServer/typeCache.js +54 -0
- package/dist/typeServer/typeCache.js.map +1 -0
- package/dist/typeServer/typeEvalUtils.d.ts +13 -0
- package/dist/typeServer/typeEvalUtils.js +83 -0
- package/dist/typeServer/typeEvalUtils.js.map +1 -0
- package/dist/typeServer/typeGuards.d.ts +3 -0
- package/dist/typeServer/typeGuards.js +55 -0
- package/dist/typeServer/typeGuards.js.map +1 -0
- package/dist/typeServer/typeServerConversionTypes.d.ts +39 -0
- package/dist/typeServer/typeServerConversionTypes.js +448 -0
- package/dist/typeServer/typeServerConversionTypes.js.map +1 -0
- package/dist/typeServer/typeServerConversionUtils.d.ts +35 -0
- package/dist/typeServer/typeServerConversionUtils.js +524 -0
- package/dist/typeServer/typeServerConversionUtils.js.map +1 -0
- package/dist/typeServer/typeServerEvaluator.d.ts +16 -0
- package/dist/typeServer/typeServerEvaluator.js +36 -0
- package/dist/typeServer/typeServerEvaluator.js.map +1 -0
- package/dist/typeServer/typeServerFileSystem.d.ts +47 -0
- package/dist/typeServer/typeServerFileSystem.js +129 -0
- package/dist/typeServer/typeServerFileSystem.js.map +1 -0
- package/dist/typeServer/typeServerProtocolUtils.d.ts +2 -0
- package/dist/typeServer/typeServerProtocolUtils.js +7 -0
- package/dist/typeServer/typeServerProtocolUtils.js.map +1 -0
- package/dist/typeServer/typeServerServiceKeys.d.ts +7 -0
- package/dist/typeServer/typeServerServiceKeys.js +20 -0
- package/dist/typeServer/typeServerServiceKeys.js.map +1 -0
- package/dist/typeServer/typeUtils.d.ts +4 -0
- package/dist/typeServer/typeUtils.js +31 -0
- package/dist/typeServer/typeUtils.js.map +1 -0
- package/dist/typeServer/virtualFileOverlayFileSystem.d.ts +87 -0
- package/dist/typeServer/virtualFileOverlayFileSystem.js +181 -0
- package/dist/typeServer/virtualFileOverlayFileSystem.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,620 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* server.ts
|
|
4
|
+
* Copyright (c) Microsoft Corporation.
|
|
5
|
+
* Licensed under the MIT license.
|
|
6
|
+
*
|
|
7
|
+
* Defines a language server that is also a type server. The language-server parts are used
|
|
8
|
+
* to initialize and manage documents; the type-server parts answer Type Server Protocol
|
|
9
|
+
* (TSP) requests with type information for those documents.
|
|
10
|
+
*
|
|
11
|
+
* This is the Pyright-native port of Pylance's `type-server/src/server/typeServer.ts`. It
|
|
12
|
+
* is rebased onto Pyright's own infrastructure (`LanguageServerBase`, `WorkspaceFactory`,
|
|
13
|
+
* `ImportResolver`, `BackgroundAnalysisProgram`) instead of the Pylance subclasses. Type
|
|
14
|
+
* queries are answered synchronously by Pyright's evaluator through the `ProgramWrapper`;
|
|
15
|
+
* cancellation is file/token based like the rest of Pyright, so long-running queries can
|
|
16
|
+
* still be interrupted mid-request.
|
|
17
|
+
*
|
|
18
|
+
* Feature notes:
|
|
19
|
+
* - Telemetry and profiling are intentionally omitted (Pyright has no telemetry).
|
|
20
|
+
* - Notebook support and the virtual-file-redirect supplemental are layered in by later
|
|
21
|
+
* phases; the seams (`_notebookManager`, overlay file system) are left in place.
|
|
22
|
+
*/
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.TypeServer = void 0;
|
|
25
|
+
const vscode_languageserver_1 = require("vscode-languageserver");
|
|
26
|
+
const analyzerNodeInfo_1 = require("../analyzer/analyzerNodeInfo");
|
|
27
|
+
const backgroundAnalysisProgram_1 = require("../analyzer/backgroundAnalysisProgram");
|
|
28
|
+
const importResolver_1 = require("../analyzer/importResolver");
|
|
29
|
+
const pythonPathUtils_1 = require("../analyzer/pythonPathUtils");
|
|
30
|
+
const sourceFile_1 = require("../analyzer/sourceFile");
|
|
31
|
+
const console_1 = require("../common/console");
|
|
32
|
+
const core_1 = require("../common/core");
|
|
33
|
+
const envVarUtils_1 = require("../common/envVarUtils");
|
|
34
|
+
const fullAccessHost_1 = require("../common/fullAccessHost");
|
|
35
|
+
const languageServerBase_1 = require("../languageServerBase");
|
|
36
|
+
const navigationUtils_1 = require("../languageService/navigationUtils");
|
|
37
|
+
const workspaceFactory_1 = require("../workspaceFactory");
|
|
38
|
+
const cancellation_1 = require("./cancellation");
|
|
39
|
+
const diagnosticUtils_1 = require("./diagnosticUtils");
|
|
40
|
+
const notebookCellChain_1 = require("./notebookCellChain");
|
|
41
|
+
const notebookDocumentHandler_1 = require("./notebookDocumentHandler");
|
|
42
|
+
const notebookUriMapper_1 = require("./notebookUriMapper");
|
|
43
|
+
const programWrapper_1 = require("./programWrapper");
|
|
44
|
+
const tspSupplemental_1 = require("./protocol/tspSupplemental");
|
|
45
|
+
const typeServerProtocol_1 = require("./protocol/typeServerProtocol");
|
|
46
|
+
const serverUtils_1 = require("./serverUtils");
|
|
47
|
+
const typeServerConversionTypes_1 = require("./typeServerConversionTypes");
|
|
48
|
+
const typeServerConversionUtils_1 = require("./typeServerConversionUtils");
|
|
49
|
+
const typeEvalUtils_1 = require("./typeEvalUtils");
|
|
50
|
+
const typeCache_1 = require("./typeCache");
|
|
51
|
+
const typeServerFileSystem_1 = require("./typeServerFileSystem");
|
|
52
|
+
const typeServerServiceKeys_1 = require("./typeServerServiceKeys");
|
|
53
|
+
class TypeServer extends languageServerBase_1.LanguageServerBase {
|
|
54
|
+
constructor(serverOptions, connection) {
|
|
55
|
+
super(serverOptions, connection);
|
|
56
|
+
this._handleToUriMap = new Map();
|
|
57
|
+
this._initializedComplete = false;
|
|
58
|
+
this._uriMapper = serverOptions.serviceProvider.tryGet(typeServerServiceKeys_1.TypeServerServiceKeys.uriMapper);
|
|
59
|
+
this._globalTypeCache = new typeCache_1.TypeCache(serverOptions.serviceProvider, this._getParserOutput.bind(this));
|
|
60
|
+
this._globalTypeCache.snapshotChanged(this._onSnapshotChanged.bind(this));
|
|
61
|
+
}
|
|
62
|
+
dispose() {
|
|
63
|
+
super.dispose();
|
|
64
|
+
}
|
|
65
|
+
async getWorkspaceForFile(fileUri, pythonPath) {
|
|
66
|
+
// If this is a notebook cell and no python path was passed in, use the last known
|
|
67
|
+
// python path for the containing notebook so cells resolve to the workspace with the
|
|
68
|
+
// matching pythonPath.
|
|
69
|
+
if (notebookUriMapper_1.NotebookUriMapper.isNotebookCell(fileUri) && this._notebookManager) {
|
|
70
|
+
const notebookData = await this._notebookManager.getNotebookDataForCell(fileUri);
|
|
71
|
+
if (pythonPath === undefined) {
|
|
72
|
+
pythonPath = notebookData?.pythonPath;
|
|
73
|
+
}
|
|
74
|
+
// Map the vscode-notebook-cell: URI to its file-scheme equivalent so the workspace
|
|
75
|
+
// factory can match it against workspace root URIs.
|
|
76
|
+
fileUri = this._uriMapper.getMappedCellUri(fileUri);
|
|
77
|
+
}
|
|
78
|
+
return this.workspaceFactory.getWorkspaceForFile(fileUri, pythonPath);
|
|
79
|
+
}
|
|
80
|
+
async getContainingWorkspacesForFile(fileUri) {
|
|
81
|
+
// If this is a notebook cell we should wait for the notebook to open first.
|
|
82
|
+
if (notebookUriMapper_1.NotebookUriMapper.isNotebookCell(fileUri) && this._notebookManager) {
|
|
83
|
+
await this._notebookManager.getNotebookDataForCell(fileUri);
|
|
84
|
+
// Map the vscode-notebook-cell: URI to its file-scheme equivalent so the workspace
|
|
85
|
+
// factory can match it against workspace root URIs.
|
|
86
|
+
fileUri = this._uriMapper.getMappedCellUri(fileUri);
|
|
87
|
+
}
|
|
88
|
+
return this.workspaceFactory.getContainingWorkspacesForFile(fileUri);
|
|
89
|
+
}
|
|
90
|
+
async getSettings(workspace) {
|
|
91
|
+
const serverSettings = {
|
|
92
|
+
autoSearchPaths: true,
|
|
93
|
+
disableLanguageServices: false,
|
|
94
|
+
openFilesOnly: true,
|
|
95
|
+
useLibraryCodeForTypes: true,
|
|
96
|
+
watchForSourceChanges: true,
|
|
97
|
+
watchForLibraryChanges: true,
|
|
98
|
+
watchForConfigChanges: true,
|
|
99
|
+
typeCheckingMode: 'off',
|
|
100
|
+
diagnosticSeverityOverrides: {},
|
|
101
|
+
diagnosticBooleanOverrides: {},
|
|
102
|
+
logLevel: console_1.LogLevel.Info,
|
|
103
|
+
autoImportCompletions: true,
|
|
104
|
+
indexing: true,
|
|
105
|
+
includeFileSpecs: [],
|
|
106
|
+
excludeFileSpecs: [],
|
|
107
|
+
ignoreFileSpecs: [],
|
|
108
|
+
taskListTokens: [],
|
|
109
|
+
};
|
|
110
|
+
try {
|
|
111
|
+
const workspaces = this.workspaceFactory.getNonDefaultWorkspaces(workspaceFactory_1.WellKnownWorkspaceKinds.Regular);
|
|
112
|
+
const pythonSection = await this.getConfiguration(workspace.rootUri, 'python');
|
|
113
|
+
if (pythonSection) {
|
|
114
|
+
const pythonPath = pythonSection.pythonPath;
|
|
115
|
+
if (pythonPath && (0, core_1.isString)(pythonPath) && !(0, pythonPathUtils_1.isPythonBinary)(pythonPath)) {
|
|
116
|
+
serverSettings.pythonPath = (0, envVarUtils_1.resolvePathWithEnvVariables)(workspace, pythonPath, workspaces);
|
|
117
|
+
}
|
|
118
|
+
const venvPath = pythonSection.venvPath;
|
|
119
|
+
if (venvPath && (0, core_1.isString)(venvPath)) {
|
|
120
|
+
serverSettings.venvPath = (0, envVarUtils_1.resolvePathWithEnvVariables)(workspace, venvPath, workspaces);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
const pythonAnalysisSection = await this.getConfiguration(workspace.rootUri, 'python.analysis');
|
|
124
|
+
if (pythonAnalysisSection) {
|
|
125
|
+
const typeshedPaths = pythonAnalysisSection.typeshedPaths;
|
|
126
|
+
if (typeshedPaths && Array.isArray(typeshedPaths) && typeshedPaths.length > 0) {
|
|
127
|
+
const typeshedPath = typeshedPaths[0];
|
|
128
|
+
if (typeshedPath && (0, core_1.isString)(typeshedPath)) {
|
|
129
|
+
serverSettings.typeshedPath = (0, envVarUtils_1.resolvePathWithEnvVariables)(workspace, typeshedPath, workspaces);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
const stubPath = pythonAnalysisSection.stubPath;
|
|
133
|
+
if (stubPath && (0, core_1.isString)(stubPath)) {
|
|
134
|
+
serverSettings.stubPath = (0, envVarUtils_1.resolvePathWithEnvVariables)(workspace, stubPath, workspaces);
|
|
135
|
+
}
|
|
136
|
+
const diagnosticSeverityOverrides = pythonAnalysisSection.diagnosticSeverityOverrides;
|
|
137
|
+
if (diagnosticSeverityOverrides) {
|
|
138
|
+
for (const [name, value] of Object.entries(diagnosticSeverityOverrides)) {
|
|
139
|
+
const ruleName = this.getDiagnosticRuleName(name);
|
|
140
|
+
const severity = this.getSeverityOverrides(value);
|
|
141
|
+
if (ruleName && severity) {
|
|
142
|
+
serverSettings.diagnosticSeverityOverrides[ruleName] = severity;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
if (pythonAnalysisSection.diagnosticMode !== undefined) {
|
|
147
|
+
serverSettings.openFilesOnly = this.isOpenFilesOnly(pythonAnalysisSection.diagnosticMode);
|
|
148
|
+
}
|
|
149
|
+
else if (pythonAnalysisSection.openFilesOnly !== undefined) {
|
|
150
|
+
serverSettings.openFilesOnly = !!pythonAnalysisSection.openFilesOnly;
|
|
151
|
+
}
|
|
152
|
+
if (pythonAnalysisSection.useLibraryCodeForTypes !== undefined) {
|
|
153
|
+
serverSettings.useLibraryCodeForTypes = !!pythonAnalysisSection.useLibraryCodeForTypes;
|
|
154
|
+
}
|
|
155
|
+
serverSettings.logLevel = (0, console_1.convertLogLevel)(pythonAnalysisSection.logLevel);
|
|
156
|
+
serverSettings.autoSearchPaths = !!pythonAnalysisSection.autoSearchPaths;
|
|
157
|
+
const extraPaths = pythonAnalysisSection.extraPaths;
|
|
158
|
+
if (extraPaths && Array.isArray(extraPaths) && extraPaths.length > 0) {
|
|
159
|
+
serverSettings.extraPaths = extraPaths
|
|
160
|
+
.filter((p) => p && (0, core_1.isString)(p))
|
|
161
|
+
.map((p) => (0, envVarUtils_1.resolvePathWithEnvVariables)(workspace, p, workspaces))
|
|
162
|
+
.filter(core_1.isDefined);
|
|
163
|
+
}
|
|
164
|
+
serverSettings.includeFileSpecs = this._getStringValues(pythonAnalysisSection.include);
|
|
165
|
+
serverSettings.excludeFileSpecs = this._getStringValues(pythonAnalysisSection.exclude);
|
|
166
|
+
serverSettings.ignoreFileSpecs = this._getStringValues(pythonAnalysisSection.ignore);
|
|
167
|
+
if (pythonAnalysisSection.autoImportCompletions !== undefined) {
|
|
168
|
+
serverSettings.autoImportCompletions = pythonAnalysisSection.autoImportCompletions;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
serverSettings.autoSearchPaths = true;
|
|
173
|
+
}
|
|
174
|
+
const pyrightSection = await this.getConfiguration(workspace.rootUri, 'pyright');
|
|
175
|
+
if (pyrightSection) {
|
|
176
|
+
if (pyrightSection.openFilesOnly !== undefined) {
|
|
177
|
+
serverSettings.openFilesOnly = !!pyrightSection.openFilesOnly;
|
|
178
|
+
}
|
|
179
|
+
if (pyrightSection.useLibraryCodeForTypes !== undefined) {
|
|
180
|
+
serverSettings.useLibraryCodeForTypes = !!pyrightSection.useLibraryCodeForTypes;
|
|
181
|
+
}
|
|
182
|
+
serverSettings.disableLanguageServices = !!pyrightSection.disableLanguageServices;
|
|
183
|
+
serverSettings.disableTaggedHints = !!pyrightSection.disableTaggedHints;
|
|
184
|
+
serverSettings.disableOrganizeImports = !!pyrightSection.disableOrganizeImports;
|
|
185
|
+
const typeCheckingMode = pyrightSection.typeCheckingMode;
|
|
186
|
+
if (typeCheckingMode && (0, core_1.isString)(typeCheckingMode)) {
|
|
187
|
+
serverSettings.typeCheckingMode = typeCheckingMode;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
catch (error) {
|
|
192
|
+
this.console.error(`Error reading settings: ${error}`);
|
|
193
|
+
}
|
|
194
|
+
return serverSettings;
|
|
195
|
+
}
|
|
196
|
+
createBackgroundAnalysis(serviceId, workspaceRoot) {
|
|
197
|
+
// Type server doesn't support background analysis. Just run everything in the main thread.
|
|
198
|
+
return undefined;
|
|
199
|
+
}
|
|
200
|
+
isLongRunningCommand(command) {
|
|
201
|
+
return false; // Type server doesn't support long-running commands.
|
|
202
|
+
}
|
|
203
|
+
isRefactoringCommand(command) {
|
|
204
|
+
return false; // Type server doesn't support refactoring commands.
|
|
205
|
+
}
|
|
206
|
+
executeCodeAction(params, token) {
|
|
207
|
+
return Promise.resolve([]); // Type server doesn't support code actions.
|
|
208
|
+
}
|
|
209
|
+
createHost() {
|
|
210
|
+
return new fullAccessHost_1.FullAccessHost(this.serverOptions.serviceProvider);
|
|
211
|
+
}
|
|
212
|
+
createImportResolver(serviceProvider, options, host) {
|
|
213
|
+
const importResolver = new importResolver_1.ImportResolver(serviceProvider, options, host);
|
|
214
|
+
// In case there was cached information in the file system related to
|
|
215
|
+
// import resolution, invalidate it now.
|
|
216
|
+
importResolver.invalidateCache();
|
|
217
|
+
return importResolver;
|
|
218
|
+
}
|
|
219
|
+
createProgressReporter() {
|
|
220
|
+
// The old progress notifications are kept for backwards compatibility with
|
|
221
|
+
// clients that do not support work done progress.
|
|
222
|
+
let displayingProgress = false;
|
|
223
|
+
let workDoneProgress;
|
|
224
|
+
return {
|
|
225
|
+
isDisplayingProgress: () => displayingProgress,
|
|
226
|
+
isEnabled: (data) => true,
|
|
227
|
+
begin: () => {
|
|
228
|
+
displayingProgress = true;
|
|
229
|
+
if (this.client.hasWindowProgressCapability) {
|
|
230
|
+
workDoneProgress = this.connection.window.createWorkDoneProgress();
|
|
231
|
+
workDoneProgress
|
|
232
|
+
.then((progress) => {
|
|
233
|
+
progress.begin('');
|
|
234
|
+
})
|
|
235
|
+
.catch(() => { });
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
void this.connection.sendNotification('pyright/beginProgress');
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
report: (message) => {
|
|
242
|
+
if (workDoneProgress) {
|
|
243
|
+
workDoneProgress
|
|
244
|
+
.then((progress) => {
|
|
245
|
+
progress.report(message);
|
|
246
|
+
})
|
|
247
|
+
.catch(() => { });
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
void this.connection.sendNotification('pyright/reportProgress', message);
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
end: () => {
|
|
254
|
+
displayingProgress = false;
|
|
255
|
+
if (workDoneProgress) {
|
|
256
|
+
workDoneProgress
|
|
257
|
+
.then((progress) => {
|
|
258
|
+
progress.done();
|
|
259
|
+
})
|
|
260
|
+
.catch(() => { });
|
|
261
|
+
workDoneProgress = undefined;
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
void this.connection.sendNotification('pyright/endProgress');
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
executeCommand(params, token) {
|
|
270
|
+
// Don't execute any commands (for now) in the type server.
|
|
271
|
+
return Promise.resolve();
|
|
272
|
+
}
|
|
273
|
+
setupConnection(supportedCommands, supportedCodeActions) {
|
|
274
|
+
super.setupConnection(supportedCommands, supportedCodeActions);
|
|
275
|
+
// Register for all of the other requests that we support.
|
|
276
|
+
this.connection.onRequest(typeServerProtocol_1.TypeServerProtocol.GetComputedTypeRequest.type, this._onGetType.bind(this, (program, input, token) => program.getComputedType(input, token)));
|
|
277
|
+
this.connection.onRequest(typeServerProtocol_1.TypeServerProtocol.GetExpectedTypeRequest.type, this._onGetType.bind(this, (program, input, token) => {
|
|
278
|
+
const result = program.getExpectedType(input, token);
|
|
279
|
+
return result?.type;
|
|
280
|
+
}));
|
|
281
|
+
this.connection.onRequest(typeServerProtocol_1.TypeServerProtocol.GetDeclaredTypeRequest.type, this._onGetType.bind(this, (program, input, token) => program.getDeclaredType(input, token)));
|
|
282
|
+
this.connection.onRequest(typeServerProtocol_1.TypeServerProtocol.GetSnapshotRequest.type, this._onGetSnapshot.bind(this));
|
|
283
|
+
this.connection.onRequest(typeServerProtocol_1.TypeServerProtocol.GetSupportedProtocolVersionRequest.type, this._onGetSupportedProtocolVersion.bind(this));
|
|
284
|
+
this.connection.onRequest(typeServerProtocol_1.TypeServerProtocol.ResolveImportRequest.type, this._onResolveImport.bind(this));
|
|
285
|
+
this.connection.onRequest(typeServerProtocol_1.TypeServerProtocol.GetPythonSearchPathsRequest.type, this._onGetPythonSearchPaths.bind(this));
|
|
286
|
+
// Register virtual file redirect notifications (Pyright-specific TSP supplemental).
|
|
287
|
+
// These are sent by a client (e.g. Pylance's Django stub generator) when it produces
|
|
288
|
+
// merged virtual files on disk that the type server should analyze in place of the real
|
|
289
|
+
// ones.
|
|
290
|
+
this.connection.onNotification(tspSupplemental_1.TspSupplemental.SetVirtualFileRedirectNotification.type, (params) => this._onSetVirtualFileRedirect(params));
|
|
291
|
+
this.connection.onNotification(tspSupplemental_1.TspSupplemental.RemoveVirtualFileRedirectNotification.type, (params) => this._onRemoveVirtualFileRedirect(params));
|
|
292
|
+
// Register raw notification handlers for notebook documents. These are registered here
|
|
293
|
+
// (before connection.listen()) so they're ready when the connection starts processing
|
|
294
|
+
// messages. `_notebookManager` is created in `initialize()` (not here) because SWC's
|
|
295
|
+
// TC39 class-field semantics would reinitialize it to undefined after the base class
|
|
296
|
+
// constructor returns; `initialize()` runs before any notifications arrive.
|
|
297
|
+
this.connection.onNotification('notebookDocument/didOpen', (params) => {
|
|
298
|
+
this._notebookManager?.onDidOpenNotebookDocument(params);
|
|
299
|
+
});
|
|
300
|
+
this.connection.onNotification('notebookDocument/didChange', (params) => {
|
|
301
|
+
this._notebookManager?.onDidChangeNotebookDocument(params);
|
|
302
|
+
});
|
|
303
|
+
this.connection.onNotification('notebookDocument/didClose', (params) => {
|
|
304
|
+
this._notebookManager?.onDidCloseNotebookDocument(params);
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
async initialize(params, supportedCommands, supportedCodeActions) {
|
|
308
|
+
// Create the notebook manager here (not in setupConnection) because SWC's TC39
|
|
309
|
+
// class-field semantics reinitialize `_notebookManager` to undefined after the base
|
|
310
|
+
// class constructor returns. This method runs when the Initialize request is processed,
|
|
311
|
+
// which is before any notifications arrive. The manager is only created when a notebook
|
|
312
|
+
// URI mapper is registered in the service provider (notebook support is otherwise off).
|
|
313
|
+
if (this._uriMapper && this._uriMapper instanceof notebookUriMapper_1.NotebookUriMapper) {
|
|
314
|
+
const uriMapper = this._uriMapper;
|
|
315
|
+
this._notebookManager = new notebookDocumentHandler_1.NotebookDocumentHandler(uriMapper, this.caseSensitiveDetector, this.console, (fileUri) => this.workspaceFactory.getWorkspaceForFile(fileUri, undefined));
|
|
316
|
+
}
|
|
317
|
+
const result = await super.initialize(params, supportedCommands, supportedCodeActions);
|
|
318
|
+
// Advertise notebook support so the client sends notebookDocument/* notifications.
|
|
319
|
+
if (this._notebookManager) {
|
|
320
|
+
result.capabilities.notebookDocumentSync = notebookCellChain_1.AnyNotebookDocumentSelector;
|
|
321
|
+
}
|
|
322
|
+
return result;
|
|
323
|
+
}
|
|
324
|
+
convertLspUriStringToUri(lspUri) {
|
|
325
|
+
// Do our own conversion of the LSP URI string to a Uri so notebook cells map to their
|
|
326
|
+
// file-scheme equivalent.
|
|
327
|
+
return (0, serverUtils_1.convertLspUriStringToUri)(lspUri, this.caseSensitiveDetector, this._uriMapper);
|
|
328
|
+
}
|
|
329
|
+
onInitialized() {
|
|
330
|
+
super.onInitialized();
|
|
331
|
+
// The base Pyright server skips updateSettingsForAllWorkspaces() when the client
|
|
332
|
+
// advertises workspace-folders support (it expects a didChangeWorkspaceFolders event
|
|
333
|
+
// instead). A TSP client may advertise workspaceFolders: true but never send that
|
|
334
|
+
// event, so trigger the settings update here when workspaces already exist. Without
|
|
335
|
+
// this, setConfigOptions is never called, the ProgramWrapper hooks never fire, and the
|
|
336
|
+
// snapshot stays at its initial invalid value forever.
|
|
337
|
+
if (this.client.hasWorkspaceFoldersCapability && this.workspaceFactory.items().length > 0) {
|
|
338
|
+
this.updateSettingsForAllWorkspaces();
|
|
339
|
+
}
|
|
340
|
+
this._initializedComplete = true;
|
|
341
|
+
}
|
|
342
|
+
onWorkspaceCreated(workspace) {
|
|
343
|
+
super.onWorkspaceCreated(workspace);
|
|
344
|
+
// Make sure the program is wrapped so that we are tracking snapshots for it and it
|
|
345
|
+
// shares the global type cache.
|
|
346
|
+
const program = workspace.service.backgroundAnalysisProgram.program;
|
|
347
|
+
(0, programWrapper_1.makeProgram)(program, this._globalTypeCache);
|
|
348
|
+
}
|
|
349
|
+
async onDidOpenTextDocument(params, ipythonMode = sourceFile_1.IPythonMode.None) {
|
|
350
|
+
// Call the base implementation to open the file in all workspaces.
|
|
351
|
+
await super.onDidOpenTextDocument(params, ipythonMode);
|
|
352
|
+
// Warm up the evaluator cache by analyzing the file and initializing prefetched
|
|
353
|
+
// types. This avoids slow first-query scenarios when the file imports large libraries.
|
|
354
|
+
const uri = this.convertLspUriStringToUri(params.textDocument.uri);
|
|
355
|
+
const program = await this._getProgram(uri);
|
|
356
|
+
if (program) {
|
|
357
|
+
program.ensureFileAnalyzed(uri, vscode_languageserver_1.CancellationToken.None);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
async onDiagnostics(params, token) {
|
|
361
|
+
// Override the base class to use the type server's diagnostic converter which
|
|
362
|
+
// properly handles TaskItem diagnostics (with tags and _vs_diagnosticRank). The base
|
|
363
|
+
// LanguageServerBase._convertDiagnostics strips TaskItem entirely.
|
|
364
|
+
const UncomputedDiagnosticsVersion = -1;
|
|
365
|
+
const uri = this.convertLspUriStringToUri(params.textDocument.uri);
|
|
366
|
+
const workspace = await this.getWorkspaceForFile(uri);
|
|
367
|
+
let sourceFile = workspace.service.getSourceFile(uri);
|
|
368
|
+
let diagnosticsVersion = sourceFile?.isCheckingRequired()
|
|
369
|
+
? UncomputedDiagnosticsVersion
|
|
370
|
+
: sourceFile?.getDiagnosticVersion() ?? UncomputedDiagnosticsVersion;
|
|
371
|
+
const result = {
|
|
372
|
+
kind: 'full',
|
|
373
|
+
resultId: sourceFile?.getDiagnosticVersion()?.toString(),
|
|
374
|
+
items: [],
|
|
375
|
+
};
|
|
376
|
+
if (workspace.disableLanguageServices ||
|
|
377
|
+
!(0, navigationUtils_1.canNavigateToFile)(workspace.service.fs, uri) ||
|
|
378
|
+
token.isCancellationRequested) {
|
|
379
|
+
return result;
|
|
380
|
+
}
|
|
381
|
+
this.incrementAnalysisProgress();
|
|
382
|
+
try {
|
|
383
|
+
if (params.previousResultId !== diagnosticsVersion.toString() && sourceFile) {
|
|
384
|
+
let diagnosticsVersionAfter = UncomputedDiagnosticsVersion - 1;
|
|
385
|
+
let serverDiagnostics = [];
|
|
386
|
+
while (diagnosticsVersion !== diagnosticsVersionAfter && !token.isCancellationRequested && sourceFile) {
|
|
387
|
+
sourceFile = workspace.service.getSourceFile(uri);
|
|
388
|
+
diagnosticsVersion = sourceFile?.getDiagnosticVersion() ?? UncomputedDiagnosticsVersion;
|
|
389
|
+
if (sourceFile) {
|
|
390
|
+
serverDiagnostics = await workspace.service.analyzeFileAndGetDiagnostics(uri, token);
|
|
391
|
+
}
|
|
392
|
+
const sourceFileAfter = workspace.service.getSourceFile(uri);
|
|
393
|
+
diagnosticsVersionAfter = sourceFileAfter?.getDiagnosticVersion() ?? UncomputedDiagnosticsVersion;
|
|
394
|
+
}
|
|
395
|
+
// Use the type server's converter which handles TaskItem diagnostics. Pass
|
|
396
|
+
// `true` for the tag-support flags unconditionally: a TSP child doesn't
|
|
397
|
+
// receive the actual client capabilities, but a foreground server relays
|
|
398
|
+
// these diagnostics directly and the original client does support them.
|
|
399
|
+
const lspDiagnostics = serverDiagnostics
|
|
400
|
+
.map((d) => (0, diagnosticUtils_1.convertFromPyrightDiagnostic)(d, workspace.service.fs,
|
|
401
|
+
/* supportsUnnecessaryDiagnosticTag */ true,
|
|
402
|
+
/* supportsTaskItemDiagnosticTag */ true))
|
|
403
|
+
.filter((d) => d !== undefined);
|
|
404
|
+
result.resultId =
|
|
405
|
+
diagnosticsVersionAfter === UncomputedDiagnosticsVersion
|
|
406
|
+
? undefined
|
|
407
|
+
: diagnosticsVersionAfter.toString();
|
|
408
|
+
result.items = lspDiagnostics;
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
result.kind = 'unchanged';
|
|
412
|
+
result.resultId =
|
|
413
|
+
diagnosticsVersion === UncomputedDiagnosticsVersion ? undefined : diagnosticsVersion.toString();
|
|
414
|
+
delete result.items;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
finally {
|
|
418
|
+
this.decrementAnalysisProgress();
|
|
419
|
+
}
|
|
420
|
+
return result;
|
|
421
|
+
}
|
|
422
|
+
_getStringValues(values) {
|
|
423
|
+
if (!values || !Array.isArray(values) || values.length === 0) {
|
|
424
|
+
return [];
|
|
425
|
+
}
|
|
426
|
+
return values.filter((p) => p && (0, core_1.isString)(p));
|
|
427
|
+
}
|
|
428
|
+
_getParserOutput(uri) {
|
|
429
|
+
const workspace = this._getWorkspaceForUri(uri);
|
|
430
|
+
if (workspace) {
|
|
431
|
+
const program = workspace.service.backgroundAnalysisProgram.program;
|
|
432
|
+
if (program) {
|
|
433
|
+
return program.getParserOutput(uri);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
return undefined;
|
|
437
|
+
}
|
|
438
|
+
_getWorkspaceForUri(uri) {
|
|
439
|
+
// Best-effort synchronous workspace lookup used by the type cache. Prefer a
|
|
440
|
+
// workspace that already tracks the file, otherwise fall back to the first
|
|
441
|
+
// available workspace.
|
|
442
|
+
const nonDefault = this.workspaceFactory.getNonDefaultWorkspaces();
|
|
443
|
+
return nonDefault.find((w) => w.service.isTracked(uri)) ?? nonDefault[0] ?? this.workspaceFactory.items()[0];
|
|
444
|
+
}
|
|
445
|
+
// Preserve the file's existing IPython mode when re-pushing its contents. If we
|
|
446
|
+
// unconditionally passed IPythonMode.None we would reset an open notebook cell's mode
|
|
447
|
+
// and detach it from its cell chain (mirrors ProgramWrapper.updateFileContents).
|
|
448
|
+
_getExistingIPythonMode(workspace, uri) {
|
|
449
|
+
const fileInfo = workspace.service.backgroundAnalysisProgram.program?.getSourceFileInfo(uri);
|
|
450
|
+
return fileInfo?.ipythonMode ?? sourceFile_1.IPythonMode.None;
|
|
451
|
+
}
|
|
452
|
+
async _getProgram(uri) {
|
|
453
|
+
const workspace = await this.getWorkspaceForFile(uri);
|
|
454
|
+
if (workspace) {
|
|
455
|
+
// Pass the global type cache explicitly so the wrapper is guaranteed to share
|
|
456
|
+
// the same `ITypeCache` (and therefore the same snapshot) that `_onGetSnapshot`
|
|
457
|
+
// returns. The `makeProgram` WeakMap normally returns the wrapper created in
|
|
458
|
+
// `onWorkspaceCreated`, but relying on that alone would livelock the client on
|
|
459
|
+
// permanent `ServerCancelled` if a program were ever re-wrapped cache-less.
|
|
460
|
+
return (0, programWrapper_1.makeProgram)(workspace.service.backgroundAnalysisProgram.program, this._globalTypeCache);
|
|
461
|
+
}
|
|
462
|
+
return undefined;
|
|
463
|
+
}
|
|
464
|
+
async _onGetSnapshot() {
|
|
465
|
+
return this._globalTypeCache.snapshot;
|
|
466
|
+
}
|
|
467
|
+
async _onGetSupportedProtocolVersion() {
|
|
468
|
+
return typeServerProtocol_1.TypeServerProtocol.TypeServerVersion.current;
|
|
469
|
+
}
|
|
470
|
+
async _onGetType(typeFetcher, params, token) {
|
|
471
|
+
const arg = params.arg;
|
|
472
|
+
const uri = isProtocolDeclaration(arg)
|
|
473
|
+
? arg.kind === 0 /* TypeServerProtocol.DeclarationKind.Regular */
|
|
474
|
+
? arg.node.uri
|
|
475
|
+
: arg.uri
|
|
476
|
+
: arg.uri;
|
|
477
|
+
const fileUri = this.convertLspUriStringToUri(uri);
|
|
478
|
+
const program = await this._getProgram(fileUri);
|
|
479
|
+
if (!program) {
|
|
480
|
+
return undefined;
|
|
481
|
+
}
|
|
482
|
+
// Make sure this is the current snapshot.
|
|
483
|
+
if (program.getSnapshot(token) !== params.snapshot) {
|
|
484
|
+
throw new cancellation_1.ServerCanceledException();
|
|
485
|
+
}
|
|
486
|
+
const input = isProtocolDeclaration(arg)
|
|
487
|
+
? (0, typeServerConversionTypes_1.fromProtocolDecl)(arg, program, program.symbolLookup)
|
|
488
|
+
: (0, typeServerConversionTypes_1.fromProtocolNode)(arg, program);
|
|
489
|
+
if (!input) {
|
|
490
|
+
return undefined;
|
|
491
|
+
}
|
|
492
|
+
const type = typeFetcher(program, input, token);
|
|
493
|
+
if (!type) {
|
|
494
|
+
return undefined;
|
|
495
|
+
}
|
|
496
|
+
let pythonVersion = program.configOptions.getDefaultExecEnvironment().pythonVersion;
|
|
497
|
+
if (!(0, typeEvalUtils_1.isDeclaration)(input)) {
|
|
498
|
+
const fileInfo = (0, analyzerNodeInfo_1.getFileInfo)(input);
|
|
499
|
+
pythonVersion = fileInfo.executionEnvironment.pythonVersion;
|
|
500
|
+
}
|
|
501
|
+
return program.run((p) => {
|
|
502
|
+
const factory = new typeServerConversionUtils_1.ProtocolTypeFactory(p, pythonVersion, input);
|
|
503
|
+
return factory.getType(type);
|
|
504
|
+
}, token);
|
|
505
|
+
}
|
|
506
|
+
async _onResolveImport(params, token) {
|
|
507
|
+
const sourceUri = this.convertLspUriStringToUri(params.sourceUri);
|
|
508
|
+
const program = await this._getProgram(sourceUri);
|
|
509
|
+
if (!program) {
|
|
510
|
+
return undefined;
|
|
511
|
+
}
|
|
512
|
+
// Make sure this is the current snapshot.
|
|
513
|
+
if (program.getSnapshot(token) !== params.snapshot) {
|
|
514
|
+
throw new cancellation_1.ServerCanceledException();
|
|
515
|
+
}
|
|
516
|
+
const result = program.resolveImport(sourceUri, params.moduleDescriptor, token);
|
|
517
|
+
if (!result) {
|
|
518
|
+
return undefined;
|
|
519
|
+
}
|
|
520
|
+
return result.toString();
|
|
521
|
+
}
|
|
522
|
+
async _onGetPythonSearchPaths(params, token) {
|
|
523
|
+
const uri = this.convertLspUriStringToUri(params.fromUri);
|
|
524
|
+
const program = uri ? await this._getProgram(uri) : undefined;
|
|
525
|
+
if (!program) {
|
|
526
|
+
return [];
|
|
527
|
+
}
|
|
528
|
+
// Make sure this is the current snapshot.
|
|
529
|
+
if (program.getSnapshot(token) !== params.snapshot) {
|
|
530
|
+
throw new cancellation_1.ServerCanceledException();
|
|
531
|
+
}
|
|
532
|
+
const uris = program.getPythonSearchPaths(token);
|
|
533
|
+
return uris ? uris.map((u) => u.toString()) : [];
|
|
534
|
+
}
|
|
535
|
+
_onSetVirtualFileRedirect(params) {
|
|
536
|
+
const fs = this.fs;
|
|
537
|
+
if (!typeServerFileSystem_1.TypeServerFileSystem.is(fs)) {
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
const realUri = this.convertLspUriStringToUri(params.realUri);
|
|
541
|
+
const virtualUri = this.convertLspUriStringToUri(params.virtualUri);
|
|
542
|
+
fs.virtualOverlay.addFileRedirect(realUri, virtualUri);
|
|
543
|
+
// If the file is currently open, read the virtual content and update Pyright's in-memory
|
|
544
|
+
// buffer. For closed files, the FS overlay redirect is sufficient — Pyright reads from
|
|
545
|
+
// the FS.
|
|
546
|
+
let virtualContent;
|
|
547
|
+
if (this.openFileMap.has(realUri.key)) {
|
|
548
|
+
try {
|
|
549
|
+
virtualContent = fs.readFileSync(realUri, 'utf8');
|
|
550
|
+
}
|
|
551
|
+
catch (e) {
|
|
552
|
+
this.console.warn(`Failed to read virtual content for ${realUri}: ${e}`);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
// Trigger re-analysis on the workspace that contains this file.
|
|
556
|
+
const workspace = this._getWorkspaceForUri(realUri);
|
|
557
|
+
if (workspace) {
|
|
558
|
+
if (virtualContent !== undefined) {
|
|
559
|
+
const doc = this.openFileMap.get(realUri.key);
|
|
560
|
+
workspace.service.updateOpenFileContents(realUri, doc?.version ?? null, virtualContent, this._getExistingIPythonMode(workspace, realUri));
|
|
561
|
+
}
|
|
562
|
+
workspace.service.invalidateAndScheduleReanalysis(backgroundAnalysisProgram_1.InvalidatedReason.Reanalyzed);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
_onRemoveVirtualFileRedirect(params) {
|
|
566
|
+
const fs = this.fs;
|
|
567
|
+
if (!typeServerFileSystem_1.TypeServerFileSystem.is(fs)) {
|
|
568
|
+
return;
|
|
569
|
+
}
|
|
570
|
+
const realUri = this.convertLspUriStringToUri(params.realUri);
|
|
571
|
+
fs.virtualOverlay.removeFileRedirect(realUri);
|
|
572
|
+
// If the file is currently open, restore from the open document's original text
|
|
573
|
+
// (authoritative), not from disk which may differ. For closed files, just removing the
|
|
574
|
+
// redirect is enough.
|
|
575
|
+
let realContent;
|
|
576
|
+
if (this.openFileMap.has(realUri.key)) {
|
|
577
|
+
const doc = this.openFileMap.get(realUri.key);
|
|
578
|
+
if (doc) {
|
|
579
|
+
// The open document text is the authoritative "real" content.
|
|
580
|
+
realContent = doc.getText();
|
|
581
|
+
}
|
|
582
|
+
else {
|
|
583
|
+
// Fallback: read from FS (redirect already removed above).
|
|
584
|
+
try {
|
|
585
|
+
realContent = fs.readFileSync(realUri, 'utf8');
|
|
586
|
+
}
|
|
587
|
+
catch (e) {
|
|
588
|
+
this.console.warn(`Failed to read real content for ${realUri}: ${e}`);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
// Trigger re-analysis on the workspace that contains this file.
|
|
593
|
+
const workspace = this._getWorkspaceForUri(realUri);
|
|
594
|
+
if (workspace) {
|
|
595
|
+
if (realContent !== undefined) {
|
|
596
|
+
const doc = this.openFileMap.get(realUri.key);
|
|
597
|
+
workspace.service.updateOpenFileContents(realUri, doc?.version ?? null, realContent, this._getExistingIPythonMode(workspace, realUri));
|
|
598
|
+
}
|
|
599
|
+
workspace.service.invalidateAndScheduleReanalysis(backgroundAnalysisProgram_1.InvalidatedReason.Reanalyzed);
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
_onSnapshotChanged(newSnapshot) {
|
|
603
|
+
// Don't send notifications if the server is disposed.
|
|
604
|
+
if (this.isDisposed) {
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
607
|
+
// Snapshot changed, all uri handles are invalid.
|
|
608
|
+
this._handleToUriMap.clear();
|
|
609
|
+
// Send a notification to all clients that the snapshot has changed.
|
|
610
|
+
void this.connection.sendNotification(typeServerProtocol_1.TypeServerProtocol.SnapshotChangedNotification.type, {
|
|
611
|
+
old: newSnapshot - 1,
|
|
612
|
+
new: newSnapshot,
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
exports.TypeServer = TypeServer;
|
|
617
|
+
function isProtocolDeclaration(arg) {
|
|
618
|
+
return arg.kind !== undefined;
|
|
619
|
+
}
|
|
620
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../../../src/typeServer/server.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AAEH,iEAAkH;AAgBlH,mEAA2D;AAC3D,qFAA0E;AAE1E,+DAA4D;AAC5D,iEAA6D;AAC7D,uDAAqD;AAIrD,+CAA8D;AAC9D,yCAAqD;AAErD,uDAAoE;AACpE,6DAA0D;AAM1D,8DAA2D;AAC3D,wEAAuE;AAEvE,0DAAyE;AAEzE,iDAAyD;AACzD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