@hydranium/protocol 1.0.0-next.227 → 1.0.0-next.228

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.
@@ -6,13 +6,24 @@
6
6
  *
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
- import { Emitter, type Event } from 'vscode-jsonrpc';
9
+ import { Disposable, Emitter, type Event } from 'vscode-jsonrpc';
10
10
  import { type DataClientProtocol, type DataServerProtocol, type DiagnosticOf, type ProjectOf, type TransferDocumentDirtyChangedEvent, type TransferDocumentUpdatedEvent } from '../data';
11
+ import type { Logger } from '../logger';
11
12
  import type { TransferElement } from '../transfer-element';
12
13
  import { DataEvents } from './data-events';
13
14
  import type { DataPort } from './data-port';
14
15
  import { DataSession, type DataSessionFactory } from './data-session';
15
- import { RpcConnection, type RpcConnectionLifecycle } from './rpc-connection';
16
+ import { RpcConnection, type RpcConnectionGeneration, type RpcConnectionLifecycle } from './rpc-connection';
17
+ /**
18
+ * A watch {@link DataConnection.watchDocument} keeps could not be sent again to
19
+ * a connection that became ready after a drop; the next one sends it again.
20
+ */
21
+ export declare const DATA_CONNECTION_WATCH_RESTORE_FAILED: import("../messages/primitives").MessageDefinition<"Could not watch {uri} again after reconnecting to the data server: {detail}">;
22
+ /**
23
+ * A session's restore threw when its connection came back; the connection
24
+ * went on restoring the others.
25
+ */
26
+ export declare const DATA_CONNECTION_SESSION_RESTORE_FAILED: import("../messages/primitives").MessageDefinition<"Could not restore a session after reconnecting to the data server: {detail}">;
16
27
  /** Options for {@link DataConnection}. */
17
28
  export interface DataConnectionOptions<TTransfer extends TransferElement = TransferElement, TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>> extends RpcConnectionLifecycle {
18
29
  /**
@@ -52,6 +63,8 @@ export type DataConnectionArgs<TTransfer extends TransferElement, TClient extend
52
63
  * `clientId`, which identifies a participant rather than a wire, and the server
53
64
  * keys its opens and watches per `(uri, clientId)`. Two parties sharing one
54
65
  * identity cannot tell each other's writes from their own echoes.
66
+ * {@link DataConnection.watchDocument} is the exception: it acts as no
67
+ * participant, under an id no session holds, and opens or writes nothing.
55
68
  *
56
69
  * Generic over the transfer root so this file names no grammar. An adopter
57
70
  * binds the concrete root (or the union of them, for a multi-grammar head) at
@@ -68,16 +81,39 @@ export declare class DataConnection<TTransfer extends TransferElement, TServer e
68
81
  */
69
82
  readonly onDidCreateSession: Event<DataSession<TTransfer, TServer>>;
70
83
  /**
71
- * Per URI, the `dirty` the client was last told since a session of this
72
- * connection last opened the URI. A restore tells the client its answer
73
- * only where it differs, so the client hears changes and nothing else; see
74
- * {@link DataSessionHost.restoreDirty}.
84
+ * Per URI, the `dirty` the client was last told, whether a session of this
85
+ * connection has it open or a watch follows it. A session's open or close
86
+ * of the URI forgets it; disposing a watch does not, since a watch knows
87
+ * only the caller's spelling of the URI, not the server's key. A
88
+ * session's restore and a watch sent again after a reconnect tell the
89
+ * client their answer where it differs, a forgotten URI included; see
90
+ * {@link restoreDirty}.
75
91
  */
76
92
  protected readonly dirtyStates: Map<string, boolean>;
77
93
  /** Backs each session's {@link DataSessionHost.onDidChangeDirty}. */
78
94
  protected readonly dirtyChangedEmitter: Emitter<TransferDocumentDirtyChangedEvent>;
79
95
  /** Backs each session's {@link DataSessionHost.onDidUpdateDocument}. */
80
96
  protected readonly documentUpdatedEmitter: Emitter<TransferDocumentUpdatedEvent<TTransfer, DiagnosticOf<TServer>>>;
97
+ /**
98
+ * Per id {@link watchDocument} watches under, the URI it watches, which
99
+ * {@link generationReady} sends again to every later generation until the
100
+ * watch's handle is disposed.
101
+ */
102
+ protected readonly watches: Map<string, string>;
103
+ /** The port's logger, or one that logs nothing. */
104
+ protected readonly logger: Logger;
105
+ /** Backs {@link onDidReconnect}. */
106
+ protected readonly reconnectEmitter: Emitter<void>;
107
+ /**
108
+ * Fires on every reconnect: once a connection becomes ready after an
109
+ * earlier one was, and its watches have been sent. The server sends no
110
+ * event for a change made while the connection was down, so a watcher reads
111
+ * its document again on this; a read it sends now reaches the server after
112
+ * its watch.
113
+ */
114
+ readonly onDidReconnect: Event<void>;
115
+ /** Whether a generation was ready before, which makes the next one a reconnect. */
116
+ protected readyBefore: boolean;
81
117
  constructor(port: DataPort, client: TClient, ...rest: DataConnectionArgs<TTransfer, TClient, TServer>);
82
118
  /**
83
119
  * The sessions of this connection that have not ended, in the order they
@@ -105,6 +141,16 @@ export declare class DataConnection<TTransfer extends TransferElement, TServer e
105
141
  * connection already holds.
106
142
  */
107
143
  createSession(label?: string, clientId?: string): DataSession<TTransfer, TServer>;
144
+ /**
145
+ * Follow `uri` without opening it: its update events reach this
146
+ * connection's client once this resolves. An open would hold the document
147
+ * for as long as the caller follows it. The watch runs under an id of its
148
+ * own, `label` plus `#` plus a random UUID, and needs no session: a session
149
+ * closing the document would also end its own watch of it. Every later
150
+ * connection that becomes ready gets the watch again. Disposing the handle
151
+ * unwatches.
152
+ */
153
+ watchDocument(uri: string, label?: string): Promise<Disposable>;
108
154
  /**
109
155
  * The client, with its `onDocumentDirtyChanged` passing through
110
156
  * {@link deliverDirty} first, so {@link dirtyStates} holds what the server
@@ -115,16 +161,49 @@ export declare class DataConnection<TTransfer extends TransferElement, TServer e
115
161
  * binding still refuses it.
116
162
  */
117
163
  protected localTarget(): TClient;
164
+ /**
165
+ * Hand a dirty state a restore read to the client, unless it is what
166
+ * {@link dirtyStates} says the client was last told; a URI it holds
167
+ * nothing for counts as different.
168
+ */
169
+ protected restoreDirty(event: TransferDocumentDirtyChangedEvent): void;
118
170
  /** Record `event` in {@link dirtyStates} and hand it to the client. */
119
171
  protected deliverDirty(event: TransferDocumentDirtyChangedEvent): void;
120
172
  /**
121
173
  * After the transport dropped, reconnect on the next macrotask for the
122
174
  * sessions with documents open, so they re-watch and follow their documents
123
- * again without waiting for a call of their own; a session with nothing
124
- * open restores on its next call. Nothing is scheduled once this connection
125
- * is disposed, which drops its generation too.
175
+ * again without waiting for a call of their own, and connect for what
176
+ * {@link watchDocument} watches, which {@link generationReady} places
177
+ * again; a session with nothing open restores on its next call. Nothing is
178
+ * scheduled once this connection is disposed, which drops its generation
179
+ * too.
126
180
  */
127
181
  protected dropGeneration(): void;
182
+ /**
183
+ * Call `reconnect()` on every session, reporting a throw instead of letting
184
+ * one session's restore stop the others and the watches after them, and,
185
+ * inside the readiness gate, fail the whole generation.
186
+ */
187
+ protected reconnectSessions(): void;
188
+ /**
189
+ * Restore what the server lost with an earlier generation, whichever
190
+ * request brought this one up: the documents of sessions that have some
191
+ * open, and every watch {@link watchDocument} keeps.
192
+ */
193
+ protected generationReady(generation: RpcConnectionGeneration<TServer>): void;
194
+ /**
195
+ * Send the watch of `uri` under `clientId` to `generation`, which has just
196
+ * passed its readiness gate. Sent at once rather than after a wait, so no
197
+ * drop can come between choosing the generation and sending. A failure is
198
+ * reported, since no caller waits on it, only while the watch is kept and
199
+ * `generation` is still current: otherwise the next generation sends it
200
+ * again.
201
+ *
202
+ * Once the watch is in place, the document's dirty state is read and goes
203
+ * through {@link restoreDirty}, as a session's restore does: a flip while
204
+ * the connection was down reached no one.
205
+ */
206
+ protected watchAgain(generation: RpcConnectionGeneration<TServer>, clientId: string, uri: string): void;
128
207
  /**
129
208
  * Sessions are detached rather than disposed: the server ends every session
130
209
  * on a connection it sees close, so ending each one first sends requests
@@ -1 +1 @@
1
- {"version":3,"file":"data-connection.d.ts","sourceRoot":"","sources":["../../src/client/data-connection.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAGJ,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,iCAAiC,EACtC,KAAK,4BAA4B,EACnC,MAAM,SAAS,CAAC;AAGjB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAA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AAC,iBAAiB,IAAI,IAAI,CAWlC;IAED;;;;OAIG;IACH,UAAmB,eAAe,CAAC,UAAU,EAAE,uBAAuB,CAAC,OAAO,CAAC,GAAG,IAAI,CAQrF;IAED;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,UAAU,CAAC,UAAU,EAAE,uBAAuB,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CA+BtG;IAED;;;;OAIG;IACM,OAAO,IAAI,IAAI,CAYvB;CACH;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,wBAAwB,CAClC,SAAS,SAAS,eAAe,EACjC,OAAO,SAAS,kBAAkB,CAAC,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,GAAG,kBAAkB,CAAC,SAAS,CAAC,CACrG,SAAQ,cAAc,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,CAAC,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3G,4EAA4E;IAC5E,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IAElF,YAAY,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,qBAAqB,CAAC,SAAS,EAAE,OAAO,CAAC,EAM9E;IAED,mEAAmE;IAC1D,OAAO,IAAI,IAAI,CAGvB;CACH"}
@@ -8,15 +8,27 @@
8
8
  * SPDX-License-Identifier: MIT
9
9
  ********************************************************************************/
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.DataConnectionWithEvents = exports.DataConnection = void 0;
11
+ exports.DataConnectionWithEvents = exports.DataConnection = exports.DATA_CONNECTION_SESSION_RESTORE_FAILED = exports.DATA_CONNECTION_WATCH_RESTORE_FAILED = void 0;
12
12
  const vscode_jsonrpc_1 = require("vscode-jsonrpc");
13
13
  const client_ids_1 = require("../client-ids");
14
14
  const data_1 = require("../data");
15
15
  const errors_1 = require("../errors");
16
+ const primitives_1 = require("../messages/primitives");
17
+ const noop_logger_1 = require("../noop-logger");
16
18
  const random_uuid_1 = require("../random-uuid");
17
19
  const data_events_1 = require("./data-events");
18
20
  const data_session_1 = require("./data-session");
19
21
  const rpc_connection_1 = require("./rpc-connection");
22
+ /**
23
+ * A watch {@link DataConnection.watchDocument} keeps could not be sent again to
24
+ * a connection that became ready after a drop; the next one sends it again.
25
+ */
26
+ exports.DATA_CONNECTION_WATCH_RESTORE_FAILED = (0, primitives_1.defineMessage)('hydranium/protocol/data-connection-watch-restore-failed', 'Could not watch {uri} again after reconnecting to the data server: {detail}');
27
+ /**
28
+ * A session's restore threw when its connection came back; the connection
29
+ * went on restoring the others.
30
+ */
31
+ exports.DATA_CONNECTION_SESSION_RESTORE_FAILED = (0, primitives_1.defineMessage)('hydranium/protocol/data-connection-session-restore-failed', 'Could not restore a session after reconnecting to the data server: {detail}');
20
32
  /**
21
33
  * A {@link RpcConnection} to the data head, carrying as many participants as
22
34
  * the host has interested parties.
@@ -25,6 +37,8 @@ const rpc_connection_1 = require("./rpc-connection");
25
37
  * `clientId`, which identifies a participant rather than a wire, and the server
26
38
  * keys its opens and watches per `(uri, clientId)`. Two parties sharing one
27
39
  * identity cannot tell each other's writes from their own echoes.
40
+ * {@link DataConnection.watchDocument} is the exception: it acts as no
41
+ * participant, under an id no session holds, and opens or writes nothing.
28
42
  *
29
43
  * Generic over the transfer root so this file names no grammar. An adopter
30
44
  * binds the concrete root (or the union of them, for a multi-grammar head) at
@@ -41,16 +55,39 @@ class DataConnection extends rpc_connection_1.RpcConnection {
41
55
  */
42
56
  onDidCreateSession = this.createSessionEmitter.event;
43
57
  /**
44
- * Per URI, the `dirty` the client was last told since a session of this
45
- * connection last opened the URI. A restore tells the client its answer
46
- * only where it differs, so the client hears changes and nothing else; see
47
- * {@link DataSessionHost.restoreDirty}.
58
+ * Per URI, the `dirty` the client was last told, whether a session of this
59
+ * connection has it open or a watch follows it. A session's open or close
60
+ * of the URI forgets it; disposing a watch does not, since a watch knows
61
+ * only the caller's spelling of the URI, not the server's key. A
62
+ * session's restore and a watch sent again after a reconnect tell the
63
+ * client their answer where it differs, a forgotten URI included; see
64
+ * {@link restoreDirty}.
48
65
  */
49
66
  dirtyStates = new Map();
50
67
  /** Backs each session's {@link DataSessionHost.onDidChangeDirty}. */
51
68
  dirtyChangedEmitter = new vscode_jsonrpc_1.Emitter();
52
69
  /** Backs each session's {@link DataSessionHost.onDidUpdateDocument}. */
53
70
  documentUpdatedEmitter = new vscode_jsonrpc_1.Emitter();
71
+ /**
72
+ * Per id {@link watchDocument} watches under, the URI it watches, which
73
+ * {@link generationReady} sends again to every later generation until the
74
+ * watch's handle is disposed.
75
+ */
76
+ watches = new Map();
77
+ /** The port's logger, or one that logs nothing. */
78
+ logger;
79
+ /** Backs {@link onDidReconnect}. */
80
+ reconnectEmitter = new vscode_jsonrpc_1.Emitter();
81
+ /**
82
+ * Fires on every reconnect: once a connection becomes ready after an
83
+ * earlier one was, and its watches have been sent. The server sends no
84
+ * event for a change made while the connection was down, so a watcher reads
85
+ * its document again on this; a read it sends now reaches the server after
86
+ * its watch.
87
+ */
88
+ onDidReconnect = this.reconnectEmitter.event;
89
+ /** Whether a generation was ready before, which makes the next one a reconnect. */
90
+ readyBefore = false;
54
91
  constructor(port, client, ...rest) {
55
92
  const [options = {}] = rest;
56
93
  super(port, client, {
@@ -63,6 +100,7 @@ class DataConnection extends rpc_connection_1.RpcConnection {
63
100
  });
64
101
  this.sessionFactory =
65
102
  options.sessionFactory ?? ((clientId, host, label) => new data_session_1.DataSession(clientId, host, label));
103
+ this.logger = (port.logger ?? new noop_logger_1.NoopLogger()).for('DataConnection');
66
104
  }
67
105
  /**
68
106
  * The sessions of this connection that have not ended, in the order they
@@ -103,11 +141,7 @@ class DataConnection extends rpc_connection_1.RpcConnection {
103
141
  const session = this.sessionFactory(id, {
104
142
  connected: () => this.connected(),
105
143
  reportError: (error, reported) => this.reportError(error, reported),
106
- restoreDirty: event => {
107
- if (this.dirtyStates.get(event.uri) !== (event.text?.dirty ?? false)) {
108
- this.deliverDirty(event);
109
- }
110
- },
144
+ restoreDirty: event => this.restoreDirty(event),
111
145
  forgetDirty: uri => this.dirtyStates.delete(uri),
112
146
  onDidChangeDirty: this.dirtyChangedEmitter.event,
113
147
  onDidUpdateDocument: this.documentUpdatedEmitter.event
@@ -122,6 +156,47 @@ class DataConnection extends rpc_connection_1.RpcConnection {
122
156
  this.createSessionEmitter.fire(session);
123
157
  return session;
124
158
  }
159
+ /**
160
+ * Follow `uri` without opening it: its update events reach this
161
+ * connection's client once this resolves. An open would hold the document
162
+ * for as long as the caller follows it. The watch runs under an id of its
163
+ * own, `label` plus `#` plus a random UUID, and needs no session: a session
164
+ * closing the document would also end its own watch of it. Every later
165
+ * connection that becomes ready gets the watch again. Disposing the handle
166
+ * unwatches.
167
+ */
168
+ async watchDocument(uri, label = 'watch') {
169
+ const clientId = `${label}#${(0, random_uuid_1.randomUuid)()}`;
170
+ const server = await this.connected();
171
+ // Kept only from here: kept during the wait, a generation that became
172
+ // ready meanwhile would send the watch a second time.
173
+ this.watches.set(clientId, uri);
174
+ try {
175
+ await server.watchModelDocument({ uri, clientId });
176
+ }
177
+ catch (error) {
178
+ this.watches.delete(clientId);
179
+ throw error;
180
+ }
181
+ this.logger.debug(`Watch ${uri} as ${clientId}`);
182
+ return vscode_jsonrpc_1.Disposable.create(() => {
183
+ if (!this.watches.delete(clientId)) {
184
+ return;
185
+ }
186
+ // Without a generation the server dropped the watch with its
187
+ // connection, and one that drops before it is ready drops it too: the
188
+ // unwatch follows no drop to a connection opened only for it.
189
+ const generation = this.generation;
190
+ if (generation) {
191
+ (generation.ready ??= this.awaitReady(generation)).then(() => {
192
+ if (this.generation === generation) {
193
+ this.logger.debug(`Unwatch ${uri} as ${clientId}`);
194
+ generation.server.unwatchModelDocument({ uri, clientId }).catch(() => undefined);
195
+ }
196
+ }, () => undefined);
197
+ }
198
+ });
199
+ }
125
200
  /**
126
201
  * The client, with its `onDocumentDirtyChanged` passing through
127
202
  * {@link deliverDirty} first, so {@link dirtyStates} holds what the server
@@ -160,6 +235,16 @@ class DataConnection extends rpc_connection_1.RpcConnection {
160
235
  }
161
236
  return target;
162
237
  }
238
+ /**
239
+ * Hand a dirty state a restore read to the client, unless it is what
240
+ * {@link dirtyStates} says the client was last told; a URI it holds
241
+ * nothing for counts as different.
242
+ */
243
+ restoreDirty(event) {
244
+ if (this.dirtyStates.get(event.uri) !== (event.text?.dirty ?? false)) {
245
+ this.deliverDirty(event);
246
+ }
247
+ }
163
248
  /** Record `event` in {@link dirtyStates} and hand it to the client. */
164
249
  deliverDirty(event) {
165
250
  this.dirtyStates.set(event.uri, event.text?.dirty ?? false);
@@ -169,9 +254,11 @@ class DataConnection extends rpc_connection_1.RpcConnection {
169
254
  /**
170
255
  * After the transport dropped, reconnect on the next macrotask for the
171
256
  * sessions with documents open, so they re-watch and follow their documents
172
- * again without waiting for a call of their own; a session with nothing
173
- * open restores on its next call. Nothing is scheduled once this connection
174
- * is disposed, which drops its generation too.
257
+ * again without waiting for a call of their own, and connect for what
258
+ * {@link watchDocument} watches, which {@link generationReady} places
259
+ * again; a session with nothing open restores on its next call. Nothing is
260
+ * scheduled once this connection is disposed, which drops its generation
261
+ * too.
175
262
  */
176
263
  dropGeneration() {
177
264
  const dropped = this.generation !== undefined;
@@ -179,11 +266,89 @@ class DataConnection extends rpc_connection_1.RpcConnection {
179
266
  if (dropped && !this.disposed) {
180
267
  setTimeout(() => {
181
268
  if (!this.disposed) {
182
- this.sessions.forEach(session => session.reconnect());
269
+ this.reconnectSessions();
270
+ if (this.watches.size > 0) {
271
+ // One generation, not `connected`, which follows a drop to
272
+ // the next: that drop's own timer asks again whether
273
+ // anything is still kept. A failure is reported by the gate.
274
+ const generation = this.currentGeneration();
275
+ (generation.ready ??= this.awaitReady(generation)).catch(() => undefined);
276
+ }
183
277
  }
184
278
  }, 0);
185
279
  }
186
280
  }
281
+ /**
282
+ * Call `reconnect()` on every session, reporting a throw instead of letting
283
+ * one session's restore stop the others and the watches after them, and,
284
+ * inside the readiness gate, fail the whole generation.
285
+ */
286
+ reconnectSessions() {
287
+ for (const session of this.sessions) {
288
+ try {
289
+ session.reconnect();
290
+ }
291
+ catch (error) {
292
+ // Reported, so it reaches the user on a port without a logger;
293
+ // logged too, since only the log names the session.
294
+ this.reportError(error, (0, primitives_1.resolve)(exports.DATA_CONNECTION_SESSION_RESTORE_FAILED, { detail: (0, primitives_1.describeError)(error) }));
295
+ this.logger.error(`Could not restore session ${session.clientId}: ${(0, primitives_1.describeError)(error)}`);
296
+ }
297
+ }
298
+ }
299
+ /**
300
+ * Restore what the server lost with an earlier generation, whichever
301
+ * request brought this one up: the documents of sessions that have some
302
+ * open, and every watch {@link watchDocument} keeps.
303
+ */
304
+ generationReady(generation) {
305
+ super.generationReady(generation);
306
+ this.reconnectSessions();
307
+ this.watches.forEach((uri, clientId) => this.watchAgain(generation, clientId, uri));
308
+ if (this.readyBefore) {
309
+ this.reconnectEmitter.fire(undefined);
310
+ }
311
+ this.readyBefore = true;
312
+ }
313
+ /**
314
+ * Send the watch of `uri` under `clientId` to `generation`, which has just
315
+ * passed its readiness gate. Sent at once rather than after a wait, so no
316
+ * drop can come between choosing the generation and sending. A failure is
317
+ * reported, since no caller waits on it, only while the watch is kept and
318
+ * `generation` is still current: otherwise the next generation sends it
319
+ * again.
320
+ *
321
+ * Once the watch is in place, the document's dirty state is read and goes
322
+ * through {@link restoreDirty}, as a session's restore does: a flip while
323
+ * the connection was down reached no one.
324
+ */
325
+ watchAgain(generation, clientId, uri) {
326
+ generation.server.watchModelDocument({ uri, clientId }).then(() => {
327
+ if (!this.watches.has(clientId)) {
328
+ return;
329
+ }
330
+ this.logger.debug(`Watch ${uri} again as ${clientId}`);
331
+ generation.server.getModelDocument({ uri }).then(current => {
332
+ if (current.text && this.watches.has(clientId)) {
333
+ try {
334
+ this.restoreDirty({ uri: current.uri, text: current.text });
335
+ }
336
+ catch {
337
+ // The client's listener failed, not the watch, which stays kept.
338
+ }
339
+ }
340
+ }, () => undefined);
341
+ }, (error) => {
342
+ if (!this.watches.has(clientId)) {
343
+ return;
344
+ }
345
+ if (this.generation !== generation) {
346
+ this.logger.debug(`Watch of ${uri} as ${clientId} cut short by a lost connection; the next one sends it again`);
347
+ return;
348
+ }
349
+ this.reportError(error, (0, primitives_1.resolve)(exports.DATA_CONNECTION_WATCH_RESTORE_FAILED, { uri, detail: (0, primitives_1.describeError)(error) }));
350
+ });
351
+ }
187
352
  /**
188
353
  * Sessions are detached rather than disposed: the server ends every session
189
354
  * on a connection it sees close, so ending each one first sends requests
@@ -195,7 +360,9 @@ class DataConnection extends rpc_connection_1.RpcConnection {
195
360
  }
196
361
  // For a factory's session whose `detach` does not fire.
197
362
  this.sessions.clear();
363
+ this.watches.clear();
198
364
  this.createSessionEmitter.dispose();
365
+ this.reconnectEmitter.dispose();
199
366
  this.dirtyChangedEmitter.dispose();
200
367
  this.documentUpdatedEmitter.dispose();
201
368
  super.dispose();
@@ -1 +1 @@
1
- {"version":3,"file":"data-connection.js","sourceRoot":"","sources":["../../src/client/data-connection.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAElF,mDAAqD;AACrD,8CAAqD;AACrD,kCASiB;AACjB,sCAA0E;AAC1E,gDAA4C;AAE5C,+CAA2C;AAE3C,iDAAsE;AACtE,qDAA8E;AAkD9E;;;;;;;;;;;;GAYG;AACH,oBAIE,SAAQ,8BAA+B;IACnB,QAAQ,GAAG,IAAI,GAAG,EAAmC,CAAC;IACtD,cAAc,CAAyC;IACvD,oBAAoB,GAAG,IAAI,wBAAO,EAAmC,CAAC;IACzF;;;;OAIG;IACM,kBAAkB,GAA2C,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC;IACtG;;;;;OAKG;IACgB,WAAW,GAAG,IAAI,GAAG,E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AC,CAAC;QACjH,CAAC,CACH,CAAC;IACL,CAAC;IAED;;;;OAIG;IACM,OAAO;QACb,KAAK,MAAM,OAAO,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YACxC,OAAO,CAAC,MAAM,EAAE,CAAC;QACpB,CAAC;QACD,wDAAwD;QACxD,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACrB,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,CAAC;QACpC,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC;QAChC,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,CAAC;QACnC,IAAI,CAAC,sBAAsB,CAAC,OAAO,EAAE,CAAC;QACtC,KAAK,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;CACH;;AAED;;;;;;;;;;;;;;GAcG;AACH,8BAGE,SAAQ,cAAoG;IAC3G,4EAA4E;IACnE,MAAM,CAAmE;IAElF,YAAY,IAAc,EAAE,OAAmD;QAC5E,sEAAsE;QACtE,4BAA4B;QAC5B,MAAM,MAAM,GAAG,IAAI,wBAAU,EAAwD,CAAC;QACtF,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,mEAAmE;IAC1D,OAAO;QACb,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;IACzB,CAAC;CACH"}
@@ -7,6 +7,7 @@
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
9
  import type { Event, MessageConnection } from 'vscode-jsonrpc';
10
+ import type { Logger } from '../logger';
10
11
  import type { ResolvedMessage } from '../messages/primitives';
11
12
  import type { RpcConnectionLifecycle } from './rpc-connection';
12
13
  /**
@@ -73,6 +74,8 @@ export interface DataPort {
73
74
  * passing no translation map yields the English.
74
75
  */
75
76
  reportError(error: unknown, reported: ResolvedMessage): void;
77
+ /** Where a connection over this port logs what it does on its own. Without one it logs nothing. */
78
+ readonly logger?: Logger;
76
79
  /**
77
80
  * Fires when the host tears the transport down and the current connection
78
81
  * is no longer usable — a language-server restart being the case that
@@ -1 +1 @@
1
- {"version":3,"file":"data-port.d.ts","sourceRoot":"","sources":["../../src/client/data-port.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,WAAW,QAAQ;IACtB;;;;;;;OAOG;IACH,OAAO,IAAI,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAEtC;;;;;;;;;;;;;;OAcG;IACH,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;IAE7D;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAEhC;;;;OAIG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,sBAAsB,CAAC;CACxD"}
1
+ {"version":3,"file":"data-port.d.ts","sourceRoot":"","sources":["../../src/client/data-port.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,WAAW,QAAQ;IACtB;;;;;;;OAOG;IACH,OAAO,IAAI,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAEtC;;;;;;;;;;;;;;OAcG;IACH,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;IAE7D,mGAAmG;IACnG,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAEhC;;;;OAIG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,sBAAsB,CAAC;CACxD"}
@@ -163,8 +163,9 @@ export type DataSessionFactory<TTransfer extends TransferElement, TServer extend
163
163
  * re-opens and re-watches what it had open, tells the client of their dirty
164
164
  * state where it changed, and reports the documents whose unsaved edits did
165
165
  * not survive; see {@link restore}. The connection does this at
166
- * once for a session with documents open, and any session's next call does it
167
- * too.
166
+ * once for a session with documents open, and again once any later connection
167
+ * is ready, so a reconnect that failed is not left to the session's own next
168
+ * call; any session's next call does it too.
168
169
  *
169
170
  * Generic over the transfer root so this file names no grammar.
170
171
  *
@@ -384,8 +385,9 @@ export declare class DataSession<TTransfer extends TransferElement, TServer exte
384
385
  /**
385
386
  * Register again and restore now, after the connection dropped, instead of
386
387
  * on the next call. A no-op for a session with nothing open, which the next
387
- * call restores anyway. A failure is left to that next call, which meets it
388
- * again.
388
+ * call restores anyway, and for one already registered on the current
389
+ * connection. A failure is retried on the connection's next ready
390
+ * generation; a call before then meets it again.
389
391
  */
390
392
  reconnect(): void;
391
393
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"data-session.d.ts","sourceRoot":"","sources":["../../src/client/data-session.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAA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,CAUxH;IAED;;;;;;;;;;OAUG;IACH,SAAS,CAAC,WAAW,CAClB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,mBAAmB,CAAC,SAAS,EAAE,OAAO,CAAC,EACjD,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,IAAI,EAAE,uBAAuB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,GACzD,IAAI,CAYN;IAED;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CACf,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,mBAAmB,CAAC,SAAS,EAAE,OAAO,CAAC,GACjD,uBAAuB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,CAOvD;IAED,gGAAgG;IAChG,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,mBAAmB,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,IAAI,CAMzF;IAED,2EAA2E;IAC3E,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAQ9E;IAED,uFAAuF;IACvF,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAatE;IAED,kFAAkF;IAClF,UAAgB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAMnF;IAED,SAAS,CAAC,UAAU,IAAI,IAAI,CAI3B;CACH"}
@@ -58,8 +58,9 @@ function indexOf(write) {
58
58
  * re-opens and re-watches what it had open, tells the client of their dirty
59
59
  * state where it changed, and reports the documents whose unsaved edits did
60
60
  * not survive; see {@link restore}. The connection does this at
61
- * once for a session with documents open, and any session's next call does it
62
- * too.
61
+ * once for a session with documents open, and again once any later connection
62
+ * is ready, so a reconnect that failed is not left to the session's own next
63
+ * call; any session's next call does it too.
63
64
  *
64
65
  * Generic over the transfer root so this file names no grammar.
65
66
  *
@@ -183,6 +184,9 @@ class DataSession {
183
184
  this.registration = this.register(server, reconnected);
184
185
  }
185
186
  await this.registration;
187
+ // And after the registration: a call waiting on it has not reached the
188
+ // wire, and sent now it would land after the session's close.
189
+ this.assertLive();
186
190
  return server;
187
191
  }
188
192
  /**
@@ -439,8 +443,9 @@ class DataSession {
439
443
  /**
440
444
  * Register again and restore now, after the connection dropped, instead of
441
445
  * on the next call. A no-op for a session with nothing open, which the next
442
- * call restores anyway. A failure is left to that next call, which meets it
443
- * again.
446
+ * call restores anyway, and for one already registered on the current
447
+ * connection. A failure is retried on the connection's next ready
448
+ * generation; a call before then meets it again.
444
449
  */
445
450
  reconnect() {
446
451
  if (!this.disposed && this.openUris.size > 0) {