@hydranium/data-server 1.0.0-next.8 → 1.0.0-next.85
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/README.md +5 -1
- package/lib/data-server.d.ts +115 -18
- package/lib/data-server.d.ts.map +1 -1
- package/lib/data-server.js +139 -30
- package/lib/data-server.js.map +1 -1
- package/lib/messages/index.d.ts +18 -0
- package/lib/messages/index.d.ts.map +1 -0
- package/lib/messages/index.js +18 -0
- package/lib/messages/index.js.map +1 -0
- package/lib/testing/data-server-harness.d.ts +5 -1
- package/lib/testing/data-server-harness.d.ts.map +1 -1
- package/lib/testing/data-server-harness.js +4 -2
- package/lib/testing/data-server-harness.js.map +1 -1
- package/package.json +17 -8
- package/src/data-server.ts +164 -39
- package/src/messages/index.ts +19 -0
- package/src/testing/data-server-harness.ts +11 -1
package/README.md
CHANGED
|
@@ -22,7 +22,11 @@ Installed by the server process that already composes
|
|
|
22
22
|
- **Push notifications instead of polling:** `onDocumentUpdated` when a
|
|
23
23
|
subscribed document reaches the configured build phase
|
|
24
24
|
(`DataServerOptions.subscriptionPhase`, `DocumentState.Validated` by default),
|
|
25
|
-
`onDocumentSaved` on a separate channel,
|
|
25
|
+
`onDocumentSaved` on a separate channel, `onDocumentDeleted` on a third (a
|
|
26
|
+
deleted document has no built state to carry, and the build-phase path never
|
|
27
|
+
runs for one), `onDocumentsBuilt` once per build for the documents nobody
|
|
28
|
+
watches — chiefly those rebuilt as a cascade, which no filesystem watcher can
|
|
29
|
+
see because their own files did not change — and `onProjectsChanged` from the
|
|
26
30
|
project registry.
|
|
27
31
|
- **Projects as first-class:** `getProjects` and `getProjectForUri`, answered from
|
|
28
32
|
the framework's `ProjectManager`.
|
package/lib/data-server.d.ts
CHANGED
|
@@ -6,10 +6,25 @@
|
|
|
6
6
|
*
|
|
7
7
|
* SPDX-License-Identifier: MIT
|
|
8
8
|
********************************************************************************/
|
|
9
|
-
import { DisposableCollection, ReferenceSource, type CloseModelArgs, type Disposable, type ElementSource, type FindNextNameArgs, type LatencyCollector, type LatencyReport, type OpenModelArgs, type Project, type ReferenceCandidate, type ReferenceContext, type ReferenceRequest, type ReferenceTarget, type Tracer, type TransferDiagnostic,
|
|
9
|
+
import { DisposableCollection, ReferenceSource, type CloseModelArgs, type HydraniumResponseError, type Disposable, type ElementSource, type FindNextNameArgs, type LatencyCollector, type LatencyReport, type OpenModelArgs, type Project, type ReferenceCandidate, type ReferenceContext, type ReferenceRequest, type ReferenceTarget, type Tracer, type TransferDiagnostic, TransferDocument, type TransferElement } from '@hydranium/protocol';
|
|
10
10
|
import { type DataClientProtocol, type DataServerDiagnosticsProtocol, type DataServerProtocol, type DumpServerStateArgs, type StartProfilingArgs, type StopProfilingArgs, type WriteServerHeapSnapshotArgs, type GetModelDocumentArgs, type GetProjectForUriArgs, type TransferSaveDocumentArgs, type WatchModelDocumentArgs, type TransferDocumentUpdatedEvent, type TransferUpdateDocumentArgs } from '@hydranium/protocol/data';
|
|
11
|
+
/**
|
|
12
|
+
* Raised when a profiling command arrives with no capture running.
|
|
13
|
+
*
|
|
14
|
+
* A `ResponseError` rather than a plain `Error` so the identity survives to the
|
|
15
|
+
* response boundary, which is where the message is rendered. An unwrapped throw
|
|
16
|
+
* reaches the client as a generic internal error instead: no code for a caller
|
|
17
|
+
* to switch on, and nothing for the boundary to render from.
|
|
18
|
+
*/
|
|
19
|
+
export declare const NO_ACTIVE_PROFILE: import("@hydranium/protocol").MessageDefinition<"No profiling capture is active; call startProfiling first.">;
|
|
20
|
+
/**
|
|
21
|
+
* The JSON-RPC code, unrelated to the catalogue code above: this one is numeric,
|
|
22
|
+
* survives reconstruction and is what a caller switches on.
|
|
23
|
+
*/
|
|
24
|
+
export declare const NO_ACTIVE_PROFILE_CODE = 1002;
|
|
25
|
+
export declare const noActiveProfileError: () => HydraniumResponseError;
|
|
11
26
|
import type { DataServerDiagnosticsProvider, DataServerProfileCapture } from './diagnostics-provider.js';
|
|
12
|
-
import type { ClientTextDocumentChangeEvent, HydraniumLanguageServices, LogNameOptions, ModelService, ProjectChangeEvent, ServerSharedServices, TransferEncoder } from '@hydranium/core';
|
|
27
|
+
import type { ClientTextDocumentChangeEvent, HydraniumLanguageServices, LogNameOptions, AstDiagnostic, ModelService, ProjectChangeEvent, ServerSharedServices, TransferEncoder } from '@hydranium/core';
|
|
13
28
|
import type { TextDocument } from 'vscode-languageserver-textdocument';
|
|
14
29
|
import { type AstNode, DocumentState, type LangiumDocument, type URI } from '@hydranium/langium';
|
|
15
30
|
import type { CancellationToken, MessageConnection } from 'vscode-jsonrpc';
|
|
@@ -136,9 +151,9 @@ export interface DataServerOptions extends LogNameOptions {
|
|
|
136
151
|
* When supplied, every inbound data-server RPC is timed into this collector
|
|
137
152
|
* (via the `createRpcProxy` binding) and exposed through
|
|
138
153
|
* {@link DataServerDiagnosticsProtocol.getLatency}. A head that also runs an
|
|
139
|
-
* LSP connection can pass the SAME collector to
|
|
140
|
-
*
|
|
141
|
-
*
|
|
154
|
+
* LSP connection can pass the SAME collector through `lspLatencyOptions` to
|
|
155
|
+
* that connection, so one report covers both heads. Absent by default (no
|
|
156
|
+
* timing overhead).
|
|
142
157
|
*/
|
|
143
158
|
readonly latency?: LatencyCollector;
|
|
144
159
|
}
|
|
@@ -177,9 +192,11 @@ interface ResolvedDataServerOptions {
|
|
|
177
192
|
* any names supplied via {@link DataServerOptions.additionalMethods}) and
|
|
178
193
|
* builds the {@link DataClientProtocol} notification proxy on the same
|
|
179
194
|
* connection in one {@link createRpcProxy} call (binding `this` as its
|
|
180
|
-
* `localTarget`) under the configured namespace, and subscribes
|
|
181
|
-
* `DocumentBuilder.onDocumentPhase`
|
|
182
|
-
*
|
|
195
|
+
* `localTarget`) under the configured namespace, and subscribes two listeners
|
|
196
|
+
* at the configured phase: a `DocumentBuilder.onDocumentPhase` one dispatching
|
|
197
|
+
* per-document `clientProxy.onDocumentUpdated` for watched URIs, and a
|
|
198
|
+
* `DocumentBuilder.onBuildPhase` one dispatching a single
|
|
199
|
+
* `clientProxy.onDocumentsBuilt` naming the batch's unwatched documents.
|
|
183
200
|
*
|
|
184
201
|
* The data-server requires the full {@link ServerSharedServices}
|
|
185
202
|
* shape — `HydraniumTextDocuments` for client-attributed updates,
|
|
@@ -225,10 +242,12 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
|
|
|
225
242
|
/**
|
|
226
243
|
* Snapshot of the most recent `DocumentBuilder.onUpdate` event. Drives
|
|
227
244
|
* `reason` discrimination on outbound `onDocumentUpdated` notifications:
|
|
228
|
-
* a URI in the `changed` list emits `'changed'`,
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
245
|
+
* a URI in the `changed` list emits `'changed'`, otherwise `'rebuilt'`
|
|
246
|
+
* (cascade rebuild from a dependent URI's change). The same mechanism
|
|
247
|
+
* `AstDocumentManager.onUpdate` uses on the LSP side, so reason fidelity
|
|
248
|
+
* stays consistent between heads. The `deleted` half is read by
|
|
249
|
+
* {@link dispatchDeleteEvents} rather than by the reason discrimination,
|
|
250
|
+
* a deletion travelling on its own channel.
|
|
232
251
|
*/
|
|
233
252
|
protected lastBuildUpdate?: {
|
|
234
253
|
changed: readonly URI[];
|
|
@@ -292,7 +311,7 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
|
|
|
292
311
|
/** Per-method RPC latency collector, when the head opted in via {@link DataServerOptions.latency}. */
|
|
293
312
|
protected readonly latency?: LatencyCollector;
|
|
294
313
|
/** Encoder pulled from DI. Adopters rebind `services.model.TransferEncoder` to a typed-overlay subclass. */
|
|
295
|
-
protected readonly encoder: TransferEncoder<
|
|
314
|
+
protected readonly encoder: TransferEncoder<TDiagnostic>;
|
|
296
315
|
/**
|
|
297
316
|
* In-process workspace facade — the lifecycle delegate `get` / `update` / `save` go through.
|
|
298
317
|
* The facade's AstDocument diagnostic shape is intentionally typed `unknown` here: adopters
|
|
@@ -301,7 +320,7 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
|
|
|
301
320
|
* `astDocumentToTransferDocument` accepts both shapes (wire-shape or LSP-shape) and projects
|
|
302
321
|
* to wire shape on the return — see `TransferEncoder.astDocumentToTransferDocument`.
|
|
303
322
|
*/
|
|
304
|
-
protected readonly modelService: ModelService<AstNode,
|
|
323
|
+
protected readonly modelService: ModelService<AstNode, AstDiagnostic, TTransfer>;
|
|
305
324
|
constructor(connection: MessageConnection, services: ServerSharedServices<TProject>, options?: DataServerOptions);
|
|
306
325
|
/**
|
|
307
326
|
* Release everything the constructor wired up — the bound protocol
|
|
@@ -489,6 +508,42 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
|
|
|
489
508
|
* regardless of subscriber count.
|
|
490
509
|
*/
|
|
491
510
|
protected subscribeToDocumentBuilder(): void;
|
|
511
|
+
/**
|
|
512
|
+
* Report the documents that reached {@link DataServerOptions.subscriptionPhase}
|
|
513
|
+
* and that NOBODY on this
|
|
514
|
+
* connection is watching — the ones a client was not told about through
|
|
515
|
+
* {@link dispatchPhaseEvent}, which is gated per URI.
|
|
516
|
+
*
|
|
517
|
+
* **The gap this closes is the one no other source can observe.** A document
|
|
518
|
+
* the client watches, it hears about already. A file changed on disk, the
|
|
519
|
+
* host's own filesystem watcher reports — and on a browser host, where the
|
|
520
|
+
* workspace lives behind this head, an external change cannot happen at all.
|
|
521
|
+
* What is left, and what nothing outside the server can see, is a document
|
|
522
|
+
* rebuilt because something it DEPENDS ON changed: its file never changed, so
|
|
523
|
+
* a filesystem watcher is silent by construction, and it has no subscriber, so
|
|
524
|
+
* the update channel is silent by design. A consumer displaying data derived
|
|
525
|
+
* from that document — a tree label, a decorator — otherwise goes stale with
|
|
526
|
+
* no signal from any source, and repairs itself the moment someone opens the
|
|
527
|
+
* file to investigate, which is what makes it expensive to diagnose later.
|
|
528
|
+
*
|
|
529
|
+
* Payload-free on purpose: URIs only, so a client re-reads what it displays
|
|
530
|
+
* rather than being handed transfer documents it did not ask for. That is the
|
|
531
|
+
* property the subscription map protects, and it is preserved here by
|
|
532
|
+
* carrying no document rather than by gating the message.
|
|
533
|
+
*
|
|
534
|
+
* Quiet in the common case. Editing a document that an editor has open leaves
|
|
535
|
+
* that URI watched and therefore out of this set, so a build with no
|
|
536
|
+
* dependents produces nothing at all, and workspace initialisation produces
|
|
537
|
+
* nothing because it does not build to this phase. The ceiling is a
|
|
538
|
+
* whole-workspace rebuild at the subscription phase: one message, URIs only.
|
|
539
|
+
*
|
|
540
|
+
* The URI is canonicalised for the same reason the subscription map is keyed
|
|
541
|
+
* that way, and is untested for the same reason as its twin in
|
|
542
|
+
* {@link dispatchDeleteEvents}: the builder reports URIs out of its own
|
|
543
|
+
* store, so a non-canonical one cannot be produced without a fixture
|
|
544
|
+
* asserting a shape the real system never emits.
|
|
545
|
+
*/
|
|
546
|
+
protected dispatchBuiltEvent(built: readonly LangiumDocument[]): void;
|
|
492
547
|
/**
|
|
493
548
|
* Subscribe to the universal save event on `HydraniumTextDocuments` so a
|
|
494
549
|
* single `onDocumentSaved` wire notification fires for ANY save of a
|
|
@@ -511,6 +566,48 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
|
|
|
511
566
|
* hold, so a `false` answer means this close was the last one.
|
|
512
567
|
*/
|
|
513
568
|
protected subscribeToTextDocumentCloses(): void;
|
|
569
|
+
/**
|
|
570
|
+
* Fan out a deletion for each removed URI, to EVERY client on the connection
|
|
571
|
+
* rather than only to the ones watching that URI.
|
|
572
|
+
*
|
|
573
|
+
* **Deliberately ungated, where {@link dispatchPhaseEvent} and
|
|
574
|
+
* {@link dispatchSaveEvent} are gated.** Those two carry a built document and
|
|
575
|
+
* fire on every build, so the subscription map is what keeps bandwidth
|
|
576
|
+
* proportional to what a client asked for. A deletion is neither: it is one
|
|
577
|
+
* URI, it is rare, and it reports the workspace's STRUCTURE rather than a
|
|
578
|
+
* document's content. Gating it forces any consumer that displays the
|
|
579
|
+
* workspace — a model tree, a file decorator — to learn about disappearances
|
|
580
|
+
* from a filesystem watcher instead, which a client hosted in a browser has
|
|
581
|
+
* no way to run: its workspace lives behind the head. A client that does not
|
|
582
|
+
* care filters on the URI, which costs it a comparison.
|
|
583
|
+
*
|
|
584
|
+
* The precedent is the last-close revert broadcast (see
|
|
585
|
+
* {@link pendingRevertBroadcasts}), where the same judgement was already made
|
|
586
|
+
* in the other direction: a transition that matters enough is delivered
|
|
587
|
+
* without a subscription.
|
|
588
|
+
*
|
|
589
|
+
* Runs from the `DocumentBuilder.onUpdate` listener rather than from a phase
|
|
590
|
+
* listener, which is the only place a deletion is observable: `update`
|
|
591
|
+
* removes the document before deriving the rebuild set, so it is never built.
|
|
592
|
+
* That ordering also puts this notification ahead of the `'rebuilt'` events
|
|
593
|
+
* for the dependents whose references the deletion just broke.
|
|
594
|
+
*
|
|
595
|
+
* The `deleted` list arrives already expanded to concrete document URIs —
|
|
596
|
+
* `deleteDocuments` resolves a directory URI to the documents beneath it — so
|
|
597
|
+
* no caller has to handle a directory here.
|
|
598
|
+
*
|
|
599
|
+
* Per-URI derived state is dropped for the same reason it is dropped
|
|
600
|
+
* anywhere: it describes a document that no longer exists.
|
|
601
|
+
* {@link lastEmittedFingerprint} in particular can outlive its subscriptions
|
|
602
|
+
* through the last-close revert path — left behind, it is adopted as the
|
|
603
|
+
* baseline by the next {@link watchModelDocument} and suppresses the first
|
|
604
|
+
* emit after the file returns with its previous content.
|
|
605
|
+
*
|
|
606
|
+
* The subscription itself SURVIVES: a recreated file resumes delivering to
|
|
607
|
+
* the same watchers with no re-subscription, and a client that answers the
|
|
608
|
+
* deletion by closing releases the watch through `closeModelDocument` anyway.
|
|
609
|
+
*/
|
|
610
|
+
protected dispatchDeleteEvents(deleted: readonly URI[]): void;
|
|
514
611
|
/** Fan out a save event for the document's URI, gated by the subscription map. */
|
|
515
612
|
protected dispatchSaveEvent(event: ClientTextDocumentChangeEvent<TextDocument>): void;
|
|
516
613
|
/**
|
|
@@ -556,16 +653,16 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
|
|
|
556
653
|
/**
|
|
557
654
|
* Discriminate the reason for a phase-event-driven update notification.
|
|
558
655
|
* Uses the most recent `DocumentBuilder.onUpdate` snapshot:
|
|
559
|
-
* - URI in the `deleted` list → `'deleted'`
|
|
560
656
|
* - URI in the `changed` list → `'changed'` (the URI was passed to
|
|
561
657
|
* `documentBuilder.update(changed, deleted)`, which spans `didChange`
|
|
562
658
|
* text-document events and programmatic `update([uri], [])` calls).
|
|
563
659
|
* - Otherwise → `'rebuilt'` (cascade re-derivation: this URI was rebuilt
|
|
564
660
|
* because something it depends on changed; its own text wasn't flagged).
|
|
565
661
|
*
|
|
566
|
-
* `'saved'` is NOT emitted
|
|
567
|
-
* `DataClientProtocol.onDocumentSaved` channel
|
|
568
|
-
* unified
|
|
662
|
+
* `'saved'` is NOT emitted here — saves take the dedicated
|
|
663
|
+
* `DataClientProtocol.onDocumentSaved` channel, and adopters wanting a
|
|
664
|
+
* unified stream synthesise it in their bridge layer. A deletion is not a
|
|
665
|
+
* reason at all; see {@link dispatchDeleteEvents}.
|
|
569
666
|
*/
|
|
570
667
|
protected resolveUpdateReason(uri: URI): TransferDocumentUpdatedEvent<TTransfer, TDiagnostic>['reason'];
|
|
571
668
|
/**
|
package/lib/data-server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-server.d.ts","sourceRoot":"","sources":["../src/data-server.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,
|
|
1
|
+
{"version":3,"file":"data-server.d.ts","sourceRoot":"","sources":["../src/data-server.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAGJ,oBAAoB,EAKpB,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,OAAO,EAC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2BAA2B,GAAG,OAAO,CAAC,MAAM,CAAC;IAMrE,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAMhC,cAAc,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAevD,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC;IAcvD,UAAU,IAAI,OAAO,CAAC,aAAa,CAAC;IAI1C,oEAAoE;IACpE,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,iBAAiB,GAAG,yBAAyB;CAmBjF"}
|
package/lib/data-server.js
CHANGED
|
@@ -6,10 +6,25 @@
|
|
|
6
6
|
*
|
|
7
7
|
* SPDX-License-Identifier: MIT
|
|
8
8
|
********************************************************************************/
|
|
9
|
-
import { createRpcProxy, DisposableCollection, isDocumentSource, isElementSource, isSyntheticSource, ReferenceSource } from '@hydranium/protocol';
|
|
9
|
+
import { createRpcProxy, defineMessage, DisposableCollection, isDocumentSource, isElementSource, isSyntheticSource, messageError, ReferenceSource, TransferDocument, asSnapshotVersion } from '@hydranium/protocol';
|
|
10
10
|
import { DATA_SERVER_DIAGNOSTICS_METHODS, DATA_SERVER_PROTOCOL_METHODS, DATA_SERVER_WIRE_PREFIX } from '@hydranium/protocol/data';
|
|
11
11
|
import { REVERT_ON_CLOSE_CLIENT_ID, UNKNOWN_CLIENT_ID } from '@hydranium/core';
|
|
12
12
|
import { defaultDataServerDiagnostics } from './default-diagnostics.js';
|
|
13
|
+
/**
|
|
14
|
+
* Raised when a profiling command arrives with no capture running.
|
|
15
|
+
*
|
|
16
|
+
* A `ResponseError` rather than a plain `Error` so the identity survives to the
|
|
17
|
+
* response boundary, which is where the message is rendered. An unwrapped throw
|
|
18
|
+
* reaches the client as a generic internal error instead: no code for a caller
|
|
19
|
+
* to switch on, and nothing for the boundary to render from.
|
|
20
|
+
*/
|
|
21
|
+
export const NO_ACTIVE_PROFILE = defineMessage('hydranium/data-server/no-active-profile', 'No profiling capture is active; call startProfiling first.');
|
|
22
|
+
/**
|
|
23
|
+
* The JSON-RPC code, unrelated to the catalogue code above: this one is numeric,
|
|
24
|
+
* survives reconstruction and is what a caller switches on.
|
|
25
|
+
*/
|
|
26
|
+
export const NO_ACTIVE_PROFILE_CODE = 1002;
|
|
27
|
+
export const noActiveProfileError = () => messageError(NO_ACTIVE_PROFILE_CODE, NO_ACTIVE_PROFILE);
|
|
13
28
|
import { DocumentState, UriUtils } from '@hydranium/langium';
|
|
14
29
|
/**
|
|
15
30
|
* Domain separator between text and diagnostics inputs of
|
|
@@ -94,9 +109,11 @@ const FINGERPRINT_LOG_AFTER_MS = 5;
|
|
|
94
109
|
* any names supplied via {@link DataServerOptions.additionalMethods}) and
|
|
95
110
|
* builds the {@link DataClientProtocol} notification proxy on the same
|
|
96
111
|
* connection in one {@link createRpcProxy} call (binding `this` as its
|
|
97
|
-
* `localTarget`) under the configured namespace, and subscribes
|
|
98
|
-
* `DocumentBuilder.onDocumentPhase`
|
|
99
|
-
*
|
|
112
|
+
* `localTarget`) under the configured namespace, and subscribes two listeners
|
|
113
|
+
* at the configured phase: a `DocumentBuilder.onDocumentPhase` one dispatching
|
|
114
|
+
* per-document `clientProxy.onDocumentUpdated` for watched URIs, and a
|
|
115
|
+
* `DocumentBuilder.onBuildPhase` one dispatching a single
|
|
116
|
+
* `clientProxy.onDocumentsBuilt` naming the batch's unwatched documents.
|
|
100
117
|
*
|
|
101
118
|
* The data-server requires the full {@link ServerSharedServices}
|
|
102
119
|
* shape — `HydraniumTextDocuments` for client-attributed updates,
|
|
@@ -144,10 +161,12 @@ export class DataServer {
|
|
|
144
161
|
/**
|
|
145
162
|
* Snapshot of the most recent `DocumentBuilder.onUpdate` event. Drives
|
|
146
163
|
* `reason` discrimination on outbound `onDocumentUpdated` notifications:
|
|
147
|
-
* a URI in the `changed` list emits `'changed'`,
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
164
|
+
* a URI in the `changed` list emits `'changed'`, otherwise `'rebuilt'`
|
|
165
|
+
* (cascade rebuild from a dependent URI's change). The same mechanism
|
|
166
|
+
* `AstDocumentManager.onUpdate` uses on the LSP side, so reason fidelity
|
|
167
|
+
* stays consistent between heads. The `deleted` half is read by
|
|
168
|
+
* {@link dispatchDeleteEvents} rather than by the reason discrimination,
|
|
169
|
+
* a deletion travelling on its own channel.
|
|
151
170
|
*/
|
|
152
171
|
lastBuildUpdate;
|
|
153
172
|
/**
|
|
@@ -248,10 +267,15 @@ export class DataServer {
|
|
|
248
267
|
methodNamespace: this.options.methodNamespace,
|
|
249
268
|
localTarget: this,
|
|
250
269
|
localMethods: registeredMethods,
|
|
251
|
-
latency: this.latency
|
|
270
|
+
latency: this.latency,
|
|
271
|
+
// Bound at the chokepoint rather than per handler, so an adopter's
|
|
272
|
+
// `additionalMethods` are rendered on the same terms as the
|
|
273
|
+
// framework's own rejections.
|
|
274
|
+
renderErrorMessage: error => this.services.MessageRenderer.renderError(error)
|
|
252
275
|
});
|
|
253
276
|
this.disposables.push(this.services.workspace.DocumentBuilder.onUpdate((changed, deleted) => {
|
|
254
277
|
this.lastBuildUpdate = { changed, deleted };
|
|
278
|
+
this.dispatchDeleteEvents(deleted);
|
|
255
279
|
}));
|
|
256
280
|
this.subscribeToDocumentBuilder();
|
|
257
281
|
this.subscribeToTextDocumentSaves();
|
|
@@ -325,11 +349,11 @@ export class DataServer {
|
|
|
325
349
|
// multi-client synced version whenever the open seeded the synced document
|
|
326
350
|
// with a caller-supplied version id — and the synced version is what
|
|
327
351
|
// `ModelService.update`'s optimistic-concurrency gate compares
|
|
328
|
-
// `
|
|
352
|
+
// `basedOn` against, so reporting the snapshot's would make the
|
|
329
353
|
// caller's first tagged write self-conflict. A genuine concurrent edit
|
|
330
354
|
// still trips the gate and is reconciled by the caller's replay rather
|
|
331
355
|
// than predicted here.
|
|
332
|
-
return { ...document, version: this.services.workspace.TextDocuments.version(args.uri) };
|
|
356
|
+
return { ...document, version: asSnapshotVersion(this.services.workspace.TextDocuments.version(args.uri)) };
|
|
333
357
|
}
|
|
334
358
|
async closeModelDocument(args) {
|
|
335
359
|
// Closing a session also releases its watch for (uri, clientId) — a
|
|
@@ -698,12 +722,7 @@ export class DataServer {
|
|
|
698
722
|
// decides policy at its own layer; `root` is optional on the envelope
|
|
699
723
|
// so the compiler forces that decision. Adopters preferring to throw
|
|
700
724
|
// override `envelope`.
|
|
701
|
-
return
|
|
702
|
-
uri: uri.toString(),
|
|
703
|
-
version: 0,
|
|
704
|
-
root: undefined,
|
|
705
|
-
diagnostics: []
|
|
706
|
-
};
|
|
725
|
+
return TransferDocument.absent(uri.toString());
|
|
707
726
|
}
|
|
708
727
|
return this.encoder.toTransferDocument(document);
|
|
709
728
|
}
|
|
@@ -715,6 +734,54 @@ export class DataServer {
|
|
|
715
734
|
*/
|
|
716
735
|
subscribeToDocumentBuilder() {
|
|
717
736
|
this.disposables.push(this.services.workspace.DocumentBuilder.onDocumentPhase(this.options.subscriptionPhase, (document, cancelToken) => this.dispatchPhaseEvent(document, cancelToken)));
|
|
737
|
+
// The BUILD-phase hook, not the per-document one: this notification is one
|
|
738
|
+
// message per build rather than one per document, and Langium hands the
|
|
739
|
+
// whole batch over here. It also does not fire for a cancelled build,
|
|
740
|
+
// which is what the per-document dispatch has to check by hand.
|
|
741
|
+
this.disposables.push(this.services.workspace.DocumentBuilder.onBuildPhase(this.options.subscriptionPhase, built => this.dispatchBuiltEvent(built)));
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* Report the documents that reached {@link DataServerOptions.subscriptionPhase}
|
|
745
|
+
* and that NOBODY on this
|
|
746
|
+
* connection is watching — the ones a client was not told about through
|
|
747
|
+
* {@link dispatchPhaseEvent}, which is gated per URI.
|
|
748
|
+
*
|
|
749
|
+
* **The gap this closes is the one no other source can observe.** A document
|
|
750
|
+
* the client watches, it hears about already. A file changed on disk, the
|
|
751
|
+
* host's own filesystem watcher reports — and on a browser host, where the
|
|
752
|
+
* workspace lives behind this head, an external change cannot happen at all.
|
|
753
|
+
* What is left, and what nothing outside the server can see, is a document
|
|
754
|
+
* rebuilt because something it DEPENDS ON changed: its file never changed, so
|
|
755
|
+
* a filesystem watcher is silent by construction, and it has no subscriber, so
|
|
756
|
+
* the update channel is silent by design. A consumer displaying data derived
|
|
757
|
+
* from that document — a tree label, a decorator — otherwise goes stale with
|
|
758
|
+
* no signal from any source, and repairs itself the moment someone opens the
|
|
759
|
+
* file to investigate, which is what makes it expensive to diagnose later.
|
|
760
|
+
*
|
|
761
|
+
* Payload-free on purpose: URIs only, so a client re-reads what it displays
|
|
762
|
+
* rather than being handed transfer documents it did not ask for. That is the
|
|
763
|
+
* property the subscription map protects, and it is preserved here by
|
|
764
|
+
* carrying no document rather than by gating the message.
|
|
765
|
+
*
|
|
766
|
+
* Quiet in the common case. Editing a document that an editor has open leaves
|
|
767
|
+
* that URI watched and therefore out of this set, so a build with no
|
|
768
|
+
* dependents produces nothing at all, and workspace initialisation produces
|
|
769
|
+
* nothing because it does not build to this phase. The ceiling is a
|
|
770
|
+
* whole-workspace rebuild at the subscription phase: one message, URIs only.
|
|
771
|
+
*
|
|
772
|
+
* The URI is canonicalised for the same reason the subscription map is keyed
|
|
773
|
+
* that way, and is untested for the same reason as its twin in
|
|
774
|
+
* {@link dispatchDeleteEvents}: the builder reports URIs out of its own
|
|
775
|
+
* store, so a non-canonical one cannot be produced without a fixture
|
|
776
|
+
* asserting a shape the real system never emits.
|
|
777
|
+
*/
|
|
778
|
+
dispatchBuiltEvent(built) {
|
|
779
|
+
const uris = built.map(document => this.canonicalKey(document.uri.toString())).filter(uri => !this.subscriptions.has(uri));
|
|
780
|
+
if (uris.length === 0) {
|
|
781
|
+
return;
|
|
782
|
+
}
|
|
783
|
+
this.tracer.debug(`Emit onDocumentsBuilt: ${uris.length} unwatched document(s)`);
|
|
784
|
+
this.clientProxy.onDocumentsBuilt({ uris });
|
|
718
785
|
}
|
|
719
786
|
/**
|
|
720
787
|
* Subscribe to the universal save event on `HydraniumTextDocuments` so a
|
|
@@ -747,6 +814,55 @@ export class DataServer {
|
|
|
747
814
|
}
|
|
748
815
|
}));
|
|
749
816
|
}
|
|
817
|
+
/**
|
|
818
|
+
* Fan out a deletion for each removed URI, to EVERY client on the connection
|
|
819
|
+
* rather than only to the ones watching that URI.
|
|
820
|
+
*
|
|
821
|
+
* **Deliberately ungated, where {@link dispatchPhaseEvent} and
|
|
822
|
+
* {@link dispatchSaveEvent} are gated.** Those two carry a built document and
|
|
823
|
+
* fire on every build, so the subscription map is what keeps bandwidth
|
|
824
|
+
* proportional to what a client asked for. A deletion is neither: it is one
|
|
825
|
+
* URI, it is rare, and it reports the workspace's STRUCTURE rather than a
|
|
826
|
+
* document's content. Gating it forces any consumer that displays the
|
|
827
|
+
* workspace — a model tree, a file decorator — to learn about disappearances
|
|
828
|
+
* from a filesystem watcher instead, which a client hosted in a browser has
|
|
829
|
+
* no way to run: its workspace lives behind the head. A client that does not
|
|
830
|
+
* care filters on the URI, which costs it a comparison.
|
|
831
|
+
*
|
|
832
|
+
* The precedent is the last-close revert broadcast (see
|
|
833
|
+
* {@link pendingRevertBroadcasts}), where the same judgement was already made
|
|
834
|
+
* in the other direction: a transition that matters enough is delivered
|
|
835
|
+
* without a subscription.
|
|
836
|
+
*
|
|
837
|
+
* Runs from the `DocumentBuilder.onUpdate` listener rather than from a phase
|
|
838
|
+
* listener, which is the only place a deletion is observable: `update`
|
|
839
|
+
* removes the document before deriving the rebuild set, so it is never built.
|
|
840
|
+
* That ordering also puts this notification ahead of the `'rebuilt'` events
|
|
841
|
+
* for the dependents whose references the deletion just broke.
|
|
842
|
+
*
|
|
843
|
+
* The `deleted` list arrives already expanded to concrete document URIs —
|
|
844
|
+
* `deleteDocuments` resolves a directory URI to the documents beneath it — so
|
|
845
|
+
* no caller has to handle a directory here.
|
|
846
|
+
*
|
|
847
|
+
* Per-URI derived state is dropped for the same reason it is dropped
|
|
848
|
+
* anywhere: it describes a document that no longer exists.
|
|
849
|
+
* {@link lastEmittedFingerprint} in particular can outlive its subscriptions
|
|
850
|
+
* through the last-close revert path — left behind, it is adopted as the
|
|
851
|
+
* baseline by the next {@link watchModelDocument} and suppresses the first
|
|
852
|
+
* emit after the file returns with its previous content.
|
|
853
|
+
*
|
|
854
|
+
* The subscription itself SURVIVES: a recreated file resumes delivering to
|
|
855
|
+
* the same watchers with no re-subscription, and a client that answers the
|
|
856
|
+
* deletion by closing releases the watch through `closeModelDocument` anyway.
|
|
857
|
+
*/
|
|
858
|
+
dispatchDeleteEvents(deleted) {
|
|
859
|
+
for (const removed of deleted) {
|
|
860
|
+
const uri = this.canonicalKey(removed.toString());
|
|
861
|
+
this.lastEmittedFingerprint.delete(uri);
|
|
862
|
+
this.pendingRevertBroadcasts.delete(uri);
|
|
863
|
+
this.clientProxy.onDocumentDeleted({ uri });
|
|
864
|
+
}
|
|
865
|
+
}
|
|
750
866
|
/** Fan out a save event for the document's URI, gated by the subscription map. */
|
|
751
867
|
dispatchSaveEvent(event) {
|
|
752
868
|
// The save event arrives under the CLIENT URI the text store keys by (e.g. a
|
|
@@ -855,26 +971,19 @@ export class DataServer {
|
|
|
855
971
|
/**
|
|
856
972
|
* Discriminate the reason for a phase-event-driven update notification.
|
|
857
973
|
* Uses the most recent `DocumentBuilder.onUpdate` snapshot:
|
|
858
|
-
* - URI in the `deleted` list → `'deleted'`
|
|
859
974
|
* - URI in the `changed` list → `'changed'` (the URI was passed to
|
|
860
975
|
* `documentBuilder.update(changed, deleted)`, which spans `didChange`
|
|
861
976
|
* text-document events and programmatic `update([uri], [])` calls).
|
|
862
977
|
* - Otherwise → `'rebuilt'` (cascade re-derivation: this URI was rebuilt
|
|
863
978
|
* because something it depends on changed; its own text wasn't flagged).
|
|
864
979
|
*
|
|
865
|
-
* `'saved'` is NOT emitted
|
|
866
|
-
* `DataClientProtocol.onDocumentSaved` channel
|
|
867
|
-
* unified
|
|
980
|
+
* `'saved'` is NOT emitted here — saves take the dedicated
|
|
981
|
+
* `DataClientProtocol.onDocumentSaved` channel, and adopters wanting a
|
|
982
|
+
* unified stream synthesise it in their bridge layer. A deletion is not a
|
|
983
|
+
* reason at all; see {@link dispatchDeleteEvents}.
|
|
868
984
|
*/
|
|
869
985
|
resolveUpdateReason(uri) {
|
|
870
|
-
|
|
871
|
-
if (last?.deleted.some(deleted => UriUtils.equals(deleted, uri))) {
|
|
872
|
-
return 'deleted';
|
|
873
|
-
}
|
|
874
|
-
if (last?.changed.some(changed => UriUtils.equals(changed, uri))) {
|
|
875
|
-
return 'changed';
|
|
876
|
-
}
|
|
877
|
-
return 'rebuilt';
|
|
986
|
+
return this.lastBuildUpdate?.changed.some(changed => UriUtils.equals(changed, uri)) ? 'changed' : 'rebuilt';
|
|
878
987
|
}
|
|
879
988
|
/**
|
|
880
989
|
* Subscribe to the project tier's change channel and re-fan registry
|
|
@@ -967,7 +1076,7 @@ export class DataServer {
|
|
|
967
1076
|
}
|
|
968
1077
|
async stopProfiling(args) {
|
|
969
1078
|
if (!this.activeProfile) {
|
|
970
|
-
throw
|
|
1079
|
+
throw noActiveProfileError();
|
|
971
1080
|
}
|
|
972
1081
|
const capture = this.activeProfile;
|
|
973
1082
|
this.activeProfile = undefined;
|
package/lib/data-server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-server.js","sourceRoot":"","sources":["../src/data-server.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,eAAe,EAiBjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACJ,+BAA+B,EAC/B,4BAA4B,EAC5B,uBAAuB,EAezB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAYxE,OAAO,EAAgB,aA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AI,mBAAmB;YACvE,eAAe,EAAE,OAAO,CAAC,eAAe,IAAI,uBAAuB;YACnE,iBAAiB;YACjB,eAAe,EAAE,OAAO,CAAC,eAAe,IAAI,EAAE;YAC9C,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,4BAA4B,EAAE;SACpE,CAAC;IACL,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
/**
|
|
10
|
+
* Every user-facing message `@hydranium/data-server` raises.
|
|
11
|
+
*
|
|
12
|
+
* Declarations stay beside their call sites and are re-exported here, so this is
|
|
13
|
+
* enumeration rather than centralization: a code's package segment has to name
|
|
14
|
+
* the package that raises it. The English is a fallback, not a contract; the
|
|
15
|
+
* code is the contract, and renaming one is a breaking change.
|
|
16
|
+
*/
|
|
17
|
+
export { NO_ACTIVE_PROFILE, NO_ACTIVE_PROFILE_CODE, noActiveProfileError } from '../data-server.js';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;GAOG;AAEH,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
/**
|
|
10
|
+
* Every user-facing message `@hydranium/data-server` raises.
|
|
11
|
+
*
|
|
12
|
+
* Declarations stay beside their call sites and are re-exported here, so this is
|
|
13
|
+
* enumeration rather than centralization: a code's package segment has to name
|
|
14
|
+
* the package that raises it. The English is a fallback, not a contract; the
|
|
15
|
+
* code is the contract, and renaming one is a breaking change.
|
|
16
|
+
*/
|
|
17
|
+
export { NO_ACTIVE_PROFILE, NO_ACTIVE_PROFILE_CODE, noActiveProfileError } from '../data-server.js';
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;GAOG;AAEH,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* SPDX-License-Identifier: MIT
|
|
8
8
|
********************************************************************************/
|
|
9
9
|
import { type Project, type TransferDiagnostic, type TransferElement } from '@hydranium/protocol';
|
|
10
|
-
import { type DataClientProtocol, type DataServerProtocol, type ProjectsChangedEvent, type TransferDocumentSavedEvent, type TransferDocumentUpdatedEvent } from '@hydranium/protocol/data';
|
|
10
|
+
import { type DataClientProtocol, type DataServerProtocol, type ProjectsChangedEvent, type TransferDocumentDeletedEvent, type TransferDocumentSavedEvent, type TransferDocumentsBuiltEvent, type TransferDocumentUpdatedEvent } from '@hydranium/protocol/data';
|
|
11
11
|
import { type Harness } from '@hydranium/protocol/testing';
|
|
12
12
|
import { type DuplexConnectionPair } from '@hydranium/protocol/testing/node';
|
|
13
13
|
import type { MessageConnection } from 'vscode-jsonrpc/node';
|
|
@@ -66,6 +66,10 @@ export interface DataServerHarness<TServer, TTransfer extends TransferElement, T
|
|
|
66
66
|
readonly events: ReadonlyArray<TransferDocumentUpdatedEvent<TTransfer, TDiagnostic>>;
|
|
67
67
|
/** Captured `onDocumentSaved` events. */
|
|
68
68
|
readonly saves: ReadonlyArray<TransferDocumentSavedEvent<TTransfer, TDiagnostic>>;
|
|
69
|
+
/** Captured `onDocumentDeleted` events. */
|
|
70
|
+
readonly deletions: ReadonlyArray<TransferDocumentDeletedEvent>;
|
|
71
|
+
/** Captured `onDocumentsBuilt` events, one per build that had unwatched documents. */
|
|
72
|
+
readonly builds: ReadonlyArray<TransferDocumentsBuiltEvent>;
|
|
69
73
|
/** Captured `onProjectsChanged` events. */
|
|
70
74
|
readonly projectsChanges: ReadonlyArray<ProjectsChangedEvent<TProject>>;
|
|
71
75
|
/** Dispose the underlying duplex pair. Idempotent. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-server-harness.d.ts","sourceRoot":"","sources":["../../src/testing/data-server-harness.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAkB,KAAK,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAClH,OAAO,EAGJ,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,EACnC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,KAAK,OAAO,EAA2B,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAA4B,KAAK,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACvG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,4BAA4B,CAC1C,OAAO,EACP,SAAS,SAAS,eAAe,EACjC,WAAW,SAAS,kBAAkB,GAAG,kBAAkB,EAC3D,QAAQ,SAAS,OAAO,GAAG,OAAO;IAElC;;;;OAIG;IACH,M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AAO,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;IACrE,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;IACpC,wFAAwF;IACxF,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,4BAA4B,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;IACrF,yCAAyC;IACzC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,0BAA0B,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;IAClF,2CAA2C;IAC3C,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC,4BAA4B,CAAC,CAAC;IAChE,sFAAsF;IACtF,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,2BAA2B,CAAC,CAAC;IAC5D,2CAA2C;IAC3C,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACxE,sDAAsD;IACtD,OAAO,IAAI,IAAI,CAAC;CAClB;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAClC,OAAO,EACP,SAAS,SAAS,eAAe,EACjC,WAAW,SAAS,kBAAkB,GAAG,kBAAkB,EAC3D,QAAQ,SAAS,OAAO,GAAG,OAAO,EAElC,OAAO,EAAE,4BAA4B,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAC,GAChF,iBAAiB,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAC,CAsC9D"}
|
|
@@ -24,11 +24,11 @@ export function makeDataServerHarness(options) {
|
|
|
24
24
|
const pair = makeDuplexConnectionPair();
|
|
25
25
|
const server = options.server(pair.left);
|
|
26
26
|
// The capture half is the shared client double, not a local copy: the same
|
|
27
|
-
// recording semantics (
|
|
27
|
+
// recording semantics (every channel, an override replacing rather than
|
|
28
28
|
// supplementing) then hold for a client-side suite that stands the double up
|
|
29
29
|
// without a server, so an assertion learnt against one reads the same in the
|
|
30
30
|
// other.
|
|
31
|
-
const { client: localClient, updates: events, saves, projectsChanges } = makeCapturingDataClient(options.client);
|
|
31
|
+
const { client: localClient, updates: events, saves, deletions, builds, projectsChanges } = makeCapturingDataClient(options.client);
|
|
32
32
|
const proxy = createRpcProxy(pair.right, {
|
|
33
33
|
methodNamespace: options.methodNamespace ?? DATA_SERVER_WIRE_PREFIX,
|
|
34
34
|
localTarget: localClient,
|
|
@@ -40,6 +40,8 @@ export function makeDataServerHarness(options) {
|
|
|
40
40
|
pair,
|
|
41
41
|
events,
|
|
42
42
|
saves,
|
|
43
|
+
deletions,
|
|
44
|
+
builds,
|
|
43
45
|
projectsChanges,
|
|
44
46
|
dispose: () => pair.dispose()
|
|
45
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-server-harness.js","sourceRoot":"","sources":["../../src/testing/data-server-harness.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,cAAc,EAA+D,MAAM,qBAAqB,CAAC;AAClH,OAAO,EACJ,4BAA4B,EAC5B,uBAAuB,
|
|
1
|
+
{"version":3,"file":"data-server-harness.js","sourceRoot":"","sources":["../../src/testing/data-server-harness.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,cAAc,EAA+D,MAAM,qBAAqB,CAAC;AAClH,OAAO,EACJ,4BAA4B,EAC5B,uBAAuB,EAQzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAgB,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAA6B,MAAM,kCAAkC,CAAC;AA+EvG;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CAMlC,OAAgF;IAEhF,MAAM,IAAI,GAAG,wBAAwB,EAAE,CAAC;IACxC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEzC,2EAA2E;IAC3E,wEAAwE;IACxE,6EAA6E;IAC7E,6EAA6E;IAC7E,SAAS;IACT,MAAM,EACH,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,MAAM,EACf,KAAK,EACL,SAAS,EACT,MAAM,EACN,eAAe,EACjB,GAAG,uBAAuB,CAAmC,OAAO,CAAC,MAAM,CAAC,CAAC;IAE9E,MAAM,KAAK,GAAG,cAAc,CACzB,IAAI,CAAC,KAAK,EACV;QACG,eAAe,EAAE,OAAO,CAAC,eAAe,IAAI,uBAAuB;QACnE,WAAW,EAAE,WAAW;QACxB,YAAY,EAAE,4BAA4B;KAC5C,CACH,CAAC;IAEF,OAAO;QACJ,MAAM;QACN,KAAK;QACL,IAAI;QACJ,MAAM;QACN,KAAK;QACL,SAAS;QACT,MAAM;QACN,eAAe;QACf,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE;KAC/B,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hydranium/data-server",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.85",
|
|
4
4
|
"description": "Typed-RPC protocol head for the hydranium framework. Peer of @hydranium/core/lsp and @hydranium/glsp-server; built on @hydranium/core.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hydranium",
|
|
@@ -38,6 +38,14 @@
|
|
|
38
38
|
"types": "./lib/node/index.d.ts",
|
|
39
39
|
"default": "./lib/node/index.js"
|
|
40
40
|
},
|
|
41
|
+
"./messages": {
|
|
42
|
+
"types": "./lib/messages/index.d.ts",
|
|
43
|
+
"default": "./lib/messages/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./lib/messages": {
|
|
46
|
+
"types": "./lib/messages/index.d.ts",
|
|
47
|
+
"default": "./lib/messages/index.js"
|
|
48
|
+
},
|
|
41
49
|
"./testing": {
|
|
42
50
|
"types": "./lib/testing/index.d.ts",
|
|
43
51
|
"default": "./lib/testing/index.js"
|
|
@@ -67,19 +75,19 @@
|
|
|
67
75
|
"watch": "tsc -b -w --preserveWatchOutput"
|
|
68
76
|
},
|
|
69
77
|
"devDependencies": {
|
|
70
|
-
"@hydranium/core": "1.0.0-next.
|
|
71
|
-
"@hydranium/langium": "1.0.0-next.
|
|
72
|
-
"@hydranium/protocol": "1.0.0-next.
|
|
78
|
+
"@hydranium/core": "1.0.0-next.85",
|
|
79
|
+
"@hydranium/langium": "1.0.0-next.85",
|
|
80
|
+
"@hydranium/protocol": "1.0.0-next.85",
|
|
73
81
|
"rimraf": "^5.0.0",
|
|
74
82
|
"typescript": "^5.8.0",
|
|
75
83
|
"vscode-jsonrpc": "9.0.1",
|
|
76
84
|
"vscode-languageserver-textdocument": "^1.0.12"
|
|
77
85
|
},
|
|
78
86
|
"peerDependencies": {
|
|
79
|
-
"@hydranium/core": "1.0.0-next.
|
|
80
|
-
"@hydranium/langium": "1.0.0-next.
|
|
81
|
-
"@hydranium/protocol": "1.0.0-next.
|
|
82
|
-
"vscode-jsonrpc": "
|
|
87
|
+
"@hydranium/core": "1.0.0-next.85",
|
|
88
|
+
"@hydranium/langium": "1.0.0-next.85",
|
|
89
|
+
"@hydranium/protocol": "1.0.0-next.85",
|
|
90
|
+
"vscode-jsonrpc": "9.0.1",
|
|
83
91
|
"vscode-languageserver-textdocument": "^1.0.12"
|
|
84
92
|
},
|
|
85
93
|
"engines": {
|
|
@@ -89,5 +97,6 @@
|
|
|
89
97
|
"access": "public"
|
|
90
98
|
},
|
|
91
99
|
"//browser": "Selects the diagnostics default per platform, the same mechanism @eclipse-glsp/server uses to swap its node build for its browser one. The Node module imports @hydranium/core/node; a browser bundler resolves the twin instead and therefore never follows that import, which is what keeps this package's `.` entry bundleable. Node ignores this field, so a Node host keeps the real implementation with no configuration. `check:neutral` is the proof it still applies — it bundles `.` for the browser and would fail on node:fs the moment the mapping stops matching.",
|
|
100
|
+
"//peerDependencies": "`vscode-jsonrpc` is EXACT rather than a range, because it is one link of an atomic chain with no independently movable link: `vscode-languageserver-protocol` depends on it at exactly 9.0.1, so any other value an adopter supplies is a SECOND physical copy rather than an upgrade. This wire stack breaks on copy identity rather than on structure — `ParameterStructures.auto` is a singleton compared by `===` in connection.js, so a request type built by one copy and sent over a connection owned by the other throws `Unknown parameter structure auto`. A caret or union range was rejected because npm then resolves a `vscode-jsonrpc@8.2.0` tree SILENTLY, with no diagnostic at all, and the failure surfaces only later at server init. Exact does not fail the install either — npm downgrades an unsatisfiable peer to a warning — but it is a NAMED ERESOLVE warning printing the required version beside the found one, and a hard error for anyone installing with `--strict-peer-deps`. It does NOT prevent a NESTED copy — `@eclipse-glsp/*` carries its own exact `vscode-jsonrpc@8.2.0` dependency and root `overrides` do not ship — so a consumer of the GLSP head must pin the chain in its own manifest, and docs/adopting/requirements.md carries the block to paste.",
|
|
92
101
|
"//prepack": "The publish guard, and it deliberately is NOT a `prepare`: npm runs a workspace `prepare` BEFORE the root `postinstall` that applies patches/vscode-jsonrpc+9.0.1.patch, so building there fails on a cold clone and npm rolls the entire install back. `prepack` runs only when a tarball is made (`npm pack`, `npm publish`) and never on install, so it cannot break the install it has no business touching. It FAILS rather than rebuilds, because the rebuild is exactly the part that ordering defeats. What it defends against: `files` lists `lib`, `lib` is gitignored, and a `files` entry matching nothing is skipped SILENTLY — so `npm publish` from an unbuilt tree emits a tarball of `src` and nothing else, with no error."
|
|
93
102
|
}
|
package/src/data-server.ts
CHANGED
|
@@ -9,12 +9,15 @@
|
|
|
9
9
|
|
|
10
10
|
import {
|
|
11
11
|
createRpcProxy,
|
|
12
|
+
defineMessage,
|
|
12
13
|
DisposableCollection,
|
|
13
14
|
isDocumentSource,
|
|
14
15
|
isElementSource,
|
|
15
16
|
isSyntheticSource,
|
|
17
|
+
messageError,
|
|
16
18
|
ReferenceSource,
|
|
17
19
|
type CloseModelArgs,
|
|
20
|
+
type HydraniumResponseError,
|
|
18
21
|
type Disposable,
|
|
19
22
|
type ElementSource,
|
|
20
23
|
type FindNextNameArgs,
|
|
@@ -28,8 +31,9 @@ import {
|
|
|
28
31
|
type ReferenceTarget,
|
|
29
32
|
type Tracer,
|
|
30
33
|
type TransferDiagnostic,
|
|
31
|
-
|
|
32
|
-
type TransferElement
|
|
34
|
+
TransferDocument,
|
|
35
|
+
type TransferElement,
|
|
36
|
+
asSnapshotVersion
|
|
33
37
|
} from '@hydranium/protocol';
|
|
34
38
|
import {
|
|
35
39
|
DATA_SERVER_DIAGNOSTICS_METHODS,
|
|
@@ -52,11 +56,34 @@ import {
|
|
|
52
56
|
} from '@hydranium/protocol/data';
|
|
53
57
|
import { REVERT_ON_CLOSE_CLIENT_ID, UNKNOWN_CLIENT_ID } from '@hydranium/core';
|
|
54
58
|
import { defaultDataServerDiagnostics } from './default-diagnostics.js';
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Raised when a profiling command arrives with no capture running.
|
|
62
|
+
*
|
|
63
|
+
* A `ResponseError` rather than a plain `Error` so the identity survives to the
|
|
64
|
+
* response boundary, which is where the message is rendered. An unwrapped throw
|
|
65
|
+
* reaches the client as a generic internal error instead: no code for a caller
|
|
66
|
+
* to switch on, and nothing for the boundary to render from.
|
|
67
|
+
*/
|
|
68
|
+
export const NO_ACTIVE_PROFILE = defineMessage(
|
|
69
|
+
'hydranium/data-server/no-active-profile',
|
|
70
|
+
'No profiling capture is active; call startProfiling first.'
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The JSON-RPC code, unrelated to the catalogue code above: this one is numeric,
|
|
75
|
+
* survives reconstruction and is what a caller switches on.
|
|
76
|
+
*/
|
|
77
|
+
export const NO_ACTIVE_PROFILE_CODE = 1002;
|
|
78
|
+
|
|
79
|
+
export const noActiveProfileError = (): HydraniumResponseError => messageError(NO_ACTIVE_PROFILE_CODE, NO_ACTIVE_PROFILE);
|
|
80
|
+
|
|
55
81
|
import type { DataServerDiagnosticsProvider, DataServerProfileCapture } from './diagnostics-provider.js';
|
|
56
82
|
import type {
|
|
57
83
|
ClientTextDocumentChangeEvent,
|
|
58
84
|
HydraniumLanguageServices,
|
|
59
85
|
LogNameOptions,
|
|
86
|
+
AstDiagnostic,
|
|
60
87
|
ModelService,
|
|
61
88
|
ProjectChangeEvent,
|
|
62
89
|
ServerSharedServices,
|
|
@@ -258,9 +285,9 @@ export interface DataServerOptions extends LogNameOptions {
|
|
|
258
285
|
* When supplied, every inbound data-server RPC is timed into this collector
|
|
259
286
|
* (via the `createRpcProxy` binding) and exposed through
|
|
260
287
|
* {@link DataServerDiagnosticsProtocol.getLatency}. A head that also runs an
|
|
261
|
-
* LSP connection can pass the SAME collector to
|
|
262
|
-
*
|
|
263
|
-
*
|
|
288
|
+
* LSP connection can pass the SAME collector through `lspLatencyOptions` to
|
|
289
|
+
* that connection, so one report covers both heads. Absent by default (no
|
|
290
|
+
* timing overhead).
|
|
264
291
|
*/
|
|
265
292
|
readonly latency?: LatencyCollector;
|
|
266
293
|
}
|
|
@@ -301,9 +328,11 @@ interface ResolvedDataServerOptions {
|
|
|
301
328
|
* any names supplied via {@link DataServerOptions.additionalMethods}) and
|
|
302
329
|
* builds the {@link DataClientProtocol} notification proxy on the same
|
|
303
330
|
* connection in one {@link createRpcProxy} call (binding `this` as its
|
|
304
|
-
* `localTarget`) under the configured namespace, and subscribes
|
|
305
|
-
* `DocumentBuilder.onDocumentPhase`
|
|
306
|
-
*
|
|
331
|
+
* `localTarget`) under the configured namespace, and subscribes two listeners
|
|
332
|
+
* at the configured phase: a `DocumentBuilder.onDocumentPhase` one dispatching
|
|
333
|
+
* per-document `clientProxy.onDocumentUpdated` for watched URIs, and a
|
|
334
|
+
* `DocumentBuilder.onBuildPhase` one dispatching a single
|
|
335
|
+
* `clientProxy.onDocumentsBuilt` naming the batch's unwatched documents.
|
|
307
336
|
*
|
|
308
337
|
* The data-server requires the full {@link ServerSharedServices}
|
|
309
338
|
* shape — `HydraniumTextDocuments` for client-attributed updates,
|
|
@@ -356,10 +385,12 @@ export class DataServer<
|
|
|
356
385
|
/**
|
|
357
386
|
* Snapshot of the most recent `DocumentBuilder.onUpdate` event. Drives
|
|
358
387
|
* `reason` discrimination on outbound `onDocumentUpdated` notifications:
|
|
359
|
-
* a URI in the `changed` list emits `'changed'`,
|
|
360
|
-
*
|
|
361
|
-
*
|
|
362
|
-
*
|
|
388
|
+
* a URI in the `changed` list emits `'changed'`, otherwise `'rebuilt'`
|
|
389
|
+
* (cascade rebuild from a dependent URI's change). The same mechanism
|
|
390
|
+
* `AstDocumentManager.onUpdate` uses on the LSP side, so reason fidelity
|
|
391
|
+
* stays consistent between heads. The `deleted` half is read by
|
|
392
|
+
* {@link dispatchDeleteEvents} rather than by the reason discrimination,
|
|
393
|
+
* a deletion travelling on its own channel.
|
|
363
394
|
*/
|
|
364
395
|
protected lastBuildUpdate?: { changed: readonly URI[]; deleted: readonly URI[] };
|
|
365
396
|
/**
|
|
@@ -420,7 +451,7 @@ export class DataServer<
|
|
|
420
451
|
/** Per-method RPC latency collector, when the head opted in via {@link DataServerOptions.latency}. */
|
|
421
452
|
protected readonly latency?: LatencyCollector;
|
|
422
453
|
/** Encoder pulled from DI. Adopters rebind `services.model.TransferEncoder` to a typed-overlay subclass. */
|
|
423
|
-
protected readonly encoder: TransferEncoder<
|
|
454
|
+
protected readonly encoder: TransferEncoder<TDiagnostic>;
|
|
424
455
|
/**
|
|
425
456
|
* In-process workspace facade — the lifecycle delegate `get` / `update` / `save` go through.
|
|
426
457
|
* The facade's AstDocument diagnostic shape is intentionally typed `unknown` here: adopters
|
|
@@ -429,7 +460,7 @@ export class DataServer<
|
|
|
429
460
|
* `astDocumentToTransferDocument` accepts both shapes (wire-shape or LSP-shape) and projects
|
|
430
461
|
* to wire shape on the return — see `TransferEncoder.astDocumentToTransferDocument`.
|
|
431
462
|
*/
|
|
432
|
-
protected readonly modelService: ModelService<AstNode,
|
|
463
|
+
protected readonly modelService: ModelService<AstNode, AstDiagnostic, TTransfer>;
|
|
433
464
|
|
|
434
465
|
constructor(
|
|
435
466
|
protected readonly connection: MessageConnection,
|
|
@@ -448,8 +479,8 @@ export class DataServer<
|
|
|
448
479
|
'Did you compose `createServerSharedModule(ctx)` into your shared module?'
|
|
449
480
|
);
|
|
450
481
|
}
|
|
451
|
-
this.encoder = encoder as TransferEncoder<
|
|
452
|
-
this.modelService = modelService as ModelService<AstNode,
|
|
482
|
+
this.encoder = encoder as TransferEncoder<TDiagnostic>;
|
|
483
|
+
this.modelService = modelService as ModelService<AstNode, AstDiagnostic, TTransfer>;
|
|
453
484
|
const excluded = new Set<string>(this.options.excludedMethods);
|
|
454
485
|
const registeredMethods = [
|
|
455
486
|
...DATA_SERVER_PROTOCOL_METHODS,
|
|
@@ -465,11 +496,16 @@ export class DataServer<
|
|
|
465
496
|
methodNamespace: this.options.methodNamespace,
|
|
466
497
|
localTarget: this,
|
|
467
498
|
localMethods: registeredMethods as readonly (keyof this & string)[],
|
|
468
|
-
latency: this.latency
|
|
499
|
+
latency: this.latency,
|
|
500
|
+
// Bound at the chokepoint rather than per handler, so an adopter's
|
|
501
|
+
// `additionalMethods` are rendered on the same terms as the
|
|
502
|
+
// framework's own rejections.
|
|
503
|
+
renderErrorMessage: error => this.services.MessageRenderer.renderError(error)
|
|
469
504
|
});
|
|
470
505
|
this.disposables.push(
|
|
471
506
|
this.services.workspace.DocumentBuilder.onUpdate((changed, deleted) => {
|
|
472
507
|
this.lastBuildUpdate = { changed, deleted };
|
|
508
|
+
this.dispatchDeleteEvents(deleted);
|
|
473
509
|
})
|
|
474
510
|
);
|
|
475
511
|
this.subscribeToDocumentBuilder();
|
|
@@ -547,11 +583,11 @@ export class DataServer<
|
|
|
547
583
|
// multi-client synced version whenever the open seeded the synced document
|
|
548
584
|
// with a caller-supplied version id — and the synced version is what
|
|
549
585
|
// `ModelService.update`'s optimistic-concurrency gate compares
|
|
550
|
-
// `
|
|
586
|
+
// `basedOn` against, so reporting the snapshot's would make the
|
|
551
587
|
// caller's first tagged write self-conflict. A genuine concurrent edit
|
|
552
588
|
// still trips the gate and is reconciled by the caller's replay rather
|
|
553
589
|
// than predicted here.
|
|
554
|
-
return { ...document, version: this.services.workspace.TextDocuments.version(args.uri) };
|
|
590
|
+
return { ...document, version: asSnapshotVersion(this.services.workspace.TextDocuments.version(args.uri)) };
|
|
555
591
|
}
|
|
556
592
|
|
|
557
593
|
async closeModelDocument(args: CloseModelArgs): Promise<void> {
|
|
@@ -945,14 +981,9 @@ export class DataServer<
|
|
|
945
981
|
// decides policy at its own layer; `root` is optional on the envelope
|
|
946
982
|
// so the compiler forces that decision. Adopters preferring to throw
|
|
947
983
|
// override `envelope`.
|
|
948
|
-
return
|
|
949
|
-
uri: uri.toString(),
|
|
950
|
-
version: 0,
|
|
951
|
-
root: undefined,
|
|
952
|
-
diagnostics: [] as TDiagnostic[]
|
|
953
|
-
};
|
|
984
|
+
return TransferDocument.absent<TTransfer, TDiagnostic>(uri.toString());
|
|
954
985
|
}
|
|
955
|
-
return this.encoder.toTransferDocument
|
|
986
|
+
return this.encoder.toTransferDocument(document) as unknown as TransferDocument<TTransfer, TDiagnostic>;
|
|
956
987
|
}
|
|
957
988
|
|
|
958
989
|
/**
|
|
@@ -967,6 +998,57 @@ export class DataServer<
|
|
|
967
998
|
this.dispatchPhaseEvent(document, cancelToken)
|
|
968
999
|
)
|
|
969
1000
|
);
|
|
1001
|
+
// The BUILD-phase hook, not the per-document one: this notification is one
|
|
1002
|
+
// message per build rather than one per document, and Langium hands the
|
|
1003
|
+
// whole batch over here. It also does not fire for a cancelled build,
|
|
1004
|
+
// which is what the per-document dispatch has to check by hand.
|
|
1005
|
+
this.disposables.push(
|
|
1006
|
+
this.services.workspace.DocumentBuilder.onBuildPhase(this.options.subscriptionPhase, built => this.dispatchBuiltEvent(built))
|
|
1007
|
+
);
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
/**
|
|
1011
|
+
* Report the documents that reached {@link DataServerOptions.subscriptionPhase}
|
|
1012
|
+
* and that NOBODY on this
|
|
1013
|
+
* connection is watching — the ones a client was not told about through
|
|
1014
|
+
* {@link dispatchPhaseEvent}, which is gated per URI.
|
|
1015
|
+
*
|
|
1016
|
+
* **The gap this closes is the one no other source can observe.** A document
|
|
1017
|
+
* the client watches, it hears about already. A file changed on disk, the
|
|
1018
|
+
* host's own filesystem watcher reports — and on a browser host, where the
|
|
1019
|
+
* workspace lives behind this head, an external change cannot happen at all.
|
|
1020
|
+
* What is left, and what nothing outside the server can see, is a document
|
|
1021
|
+
* rebuilt because something it DEPENDS ON changed: its file never changed, so
|
|
1022
|
+
* a filesystem watcher is silent by construction, and it has no subscriber, so
|
|
1023
|
+
* the update channel is silent by design. A consumer displaying data derived
|
|
1024
|
+
* from that document — a tree label, a decorator — otherwise goes stale with
|
|
1025
|
+
* no signal from any source, and repairs itself the moment someone opens the
|
|
1026
|
+
* file to investigate, which is what makes it expensive to diagnose later.
|
|
1027
|
+
*
|
|
1028
|
+
* Payload-free on purpose: URIs only, so a client re-reads what it displays
|
|
1029
|
+
* rather than being handed transfer documents it did not ask for. That is the
|
|
1030
|
+
* property the subscription map protects, and it is preserved here by
|
|
1031
|
+
* carrying no document rather than by gating the message.
|
|
1032
|
+
*
|
|
1033
|
+
* Quiet in the common case. Editing a document that an editor has open leaves
|
|
1034
|
+
* that URI watched and therefore out of this set, so a build with no
|
|
1035
|
+
* dependents produces nothing at all, and workspace initialisation produces
|
|
1036
|
+
* nothing because it does not build to this phase. The ceiling is a
|
|
1037
|
+
* whole-workspace rebuild at the subscription phase: one message, URIs only.
|
|
1038
|
+
*
|
|
1039
|
+
* The URI is canonicalised for the same reason the subscription map is keyed
|
|
1040
|
+
* that way, and is untested for the same reason as its twin in
|
|
1041
|
+
* {@link dispatchDeleteEvents}: the builder reports URIs out of its own
|
|
1042
|
+
* store, so a non-canonical one cannot be produced without a fixture
|
|
1043
|
+
* asserting a shape the real system never emits.
|
|
1044
|
+
*/
|
|
1045
|
+
protected dispatchBuiltEvent(built: readonly LangiumDocument[]): void {
|
|
1046
|
+
const uris = built.map(document => this.canonicalKey(document.uri.toString())).filter(uri => !this.subscriptions.has(uri));
|
|
1047
|
+
if (uris.length === 0) {
|
|
1048
|
+
return;
|
|
1049
|
+
}
|
|
1050
|
+
this.tracer.debug(`Emit onDocumentsBuilt: ${uris.length} unwatched document(s)`);
|
|
1051
|
+
this.clientProxy.onDocumentsBuilt({ uris });
|
|
970
1052
|
}
|
|
971
1053
|
|
|
972
1054
|
/**
|
|
@@ -1004,6 +1086,56 @@ export class DataServer<
|
|
|
1004
1086
|
);
|
|
1005
1087
|
}
|
|
1006
1088
|
|
|
1089
|
+
/**
|
|
1090
|
+
* Fan out a deletion for each removed URI, to EVERY client on the connection
|
|
1091
|
+
* rather than only to the ones watching that URI.
|
|
1092
|
+
*
|
|
1093
|
+
* **Deliberately ungated, where {@link dispatchPhaseEvent} and
|
|
1094
|
+
* {@link dispatchSaveEvent} are gated.** Those two carry a built document and
|
|
1095
|
+
* fire on every build, so the subscription map is what keeps bandwidth
|
|
1096
|
+
* proportional to what a client asked for. A deletion is neither: it is one
|
|
1097
|
+
* URI, it is rare, and it reports the workspace's STRUCTURE rather than a
|
|
1098
|
+
* document's content. Gating it forces any consumer that displays the
|
|
1099
|
+
* workspace — a model tree, a file decorator — to learn about disappearances
|
|
1100
|
+
* from a filesystem watcher instead, which a client hosted in a browser has
|
|
1101
|
+
* no way to run: its workspace lives behind the head. A client that does not
|
|
1102
|
+
* care filters on the URI, which costs it a comparison.
|
|
1103
|
+
*
|
|
1104
|
+
* The precedent is the last-close revert broadcast (see
|
|
1105
|
+
* {@link pendingRevertBroadcasts}), where the same judgement was already made
|
|
1106
|
+
* in the other direction: a transition that matters enough is delivered
|
|
1107
|
+
* without a subscription.
|
|
1108
|
+
*
|
|
1109
|
+
* Runs from the `DocumentBuilder.onUpdate` listener rather than from a phase
|
|
1110
|
+
* listener, which is the only place a deletion is observable: `update`
|
|
1111
|
+
* removes the document before deriving the rebuild set, so it is never built.
|
|
1112
|
+
* That ordering also puts this notification ahead of the `'rebuilt'` events
|
|
1113
|
+
* for the dependents whose references the deletion just broke.
|
|
1114
|
+
*
|
|
1115
|
+
* The `deleted` list arrives already expanded to concrete document URIs —
|
|
1116
|
+
* `deleteDocuments` resolves a directory URI to the documents beneath it — so
|
|
1117
|
+
* no caller has to handle a directory here.
|
|
1118
|
+
*
|
|
1119
|
+
* Per-URI derived state is dropped for the same reason it is dropped
|
|
1120
|
+
* anywhere: it describes a document that no longer exists.
|
|
1121
|
+
* {@link lastEmittedFingerprint} in particular can outlive its subscriptions
|
|
1122
|
+
* through the last-close revert path — left behind, it is adopted as the
|
|
1123
|
+
* baseline by the next {@link watchModelDocument} and suppresses the first
|
|
1124
|
+
* emit after the file returns with its previous content.
|
|
1125
|
+
*
|
|
1126
|
+
* The subscription itself SURVIVES: a recreated file resumes delivering to
|
|
1127
|
+
* the same watchers with no re-subscription, and a client that answers the
|
|
1128
|
+
* deletion by closing releases the watch through `closeModelDocument` anyway.
|
|
1129
|
+
*/
|
|
1130
|
+
protected dispatchDeleteEvents(deleted: readonly URI[]): void {
|
|
1131
|
+
for (const removed of deleted) {
|
|
1132
|
+
const uri = this.canonicalKey(removed.toString());
|
|
1133
|
+
this.lastEmittedFingerprint.delete(uri);
|
|
1134
|
+
this.pendingRevertBroadcasts.delete(uri);
|
|
1135
|
+
this.clientProxy.onDocumentDeleted({ uri });
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1007
1139
|
/** Fan out a save event for the document's URI, gated by the subscription map. */
|
|
1008
1140
|
protected dispatchSaveEvent(event: ClientTextDocumentChangeEvent<TextDocument>): void {
|
|
1009
1141
|
// The save event arrives under the CLIENT URI the text store keys by (e.g. a
|
|
@@ -1122,26 +1254,19 @@ export class DataServer<
|
|
|
1122
1254
|
/**
|
|
1123
1255
|
* Discriminate the reason for a phase-event-driven update notification.
|
|
1124
1256
|
* Uses the most recent `DocumentBuilder.onUpdate` snapshot:
|
|
1125
|
-
* - URI in the `deleted` list → `'deleted'`
|
|
1126
1257
|
* - URI in the `changed` list → `'changed'` (the URI was passed to
|
|
1127
1258
|
* `documentBuilder.update(changed, deleted)`, which spans `didChange`
|
|
1128
1259
|
* text-document events and programmatic `update([uri], [])` calls).
|
|
1129
1260
|
* - Otherwise → `'rebuilt'` (cascade re-derivation: this URI was rebuilt
|
|
1130
1261
|
* because something it depends on changed; its own text wasn't flagged).
|
|
1131
1262
|
*
|
|
1132
|
-
* `'saved'` is NOT emitted
|
|
1133
|
-
* `DataClientProtocol.onDocumentSaved` channel
|
|
1134
|
-
* unified
|
|
1263
|
+
* `'saved'` is NOT emitted here — saves take the dedicated
|
|
1264
|
+
* `DataClientProtocol.onDocumentSaved` channel, and adopters wanting a
|
|
1265
|
+
* unified stream synthesise it in their bridge layer. A deletion is not a
|
|
1266
|
+
* reason at all; see {@link dispatchDeleteEvents}.
|
|
1135
1267
|
*/
|
|
1136
1268
|
protected resolveUpdateReason(uri: URI): TransferDocumentUpdatedEvent<TTransfer, TDiagnostic>['reason'] {
|
|
1137
|
-
|
|
1138
|
-
if (last?.deleted.some(deleted => UriUtils.equals(deleted, uri))) {
|
|
1139
|
-
return 'deleted';
|
|
1140
|
-
}
|
|
1141
|
-
if (last?.changed.some(changed => UriUtils.equals(changed, uri))) {
|
|
1142
|
-
return 'changed';
|
|
1143
|
-
}
|
|
1144
|
-
return 'rebuilt';
|
|
1269
|
+
return this.lastBuildUpdate?.changed.some(changed => UriUtils.equals(changed, uri)) ? 'changed' : 'rebuilt';
|
|
1145
1270
|
}
|
|
1146
1271
|
|
|
1147
1272
|
/**
|
|
@@ -1243,7 +1368,7 @@ export class DataServer<
|
|
|
1243
1368
|
|
|
1244
1369
|
async stopProfiling(args: StopProfilingArgs): Promise<string> {
|
|
1245
1370
|
if (!this.activeProfile) {
|
|
1246
|
-
throw
|
|
1371
|
+
throw noActiveProfileError();
|
|
1247
1372
|
}
|
|
1248
1373
|
const capture = this.activeProfile;
|
|
1249
1374
|
this.activeProfile = undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Every user-facing message `@hydranium/data-server` raises.
|
|
12
|
+
*
|
|
13
|
+
* Declarations stay beside their call sites and are re-exported here, so this is
|
|
14
|
+
* enumeration rather than centralization: a code's package segment has to name
|
|
15
|
+
* the package that raises it. The English is a fallback, not a contract; the
|
|
16
|
+
* code is the contract, and renaming one is a breaking change.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
export { NO_ACTIVE_PROFILE, NO_ACTIVE_PROFILE_CODE, noActiveProfileError } from '../data-server.js';
|
|
@@ -14,7 +14,9 @@ import {
|
|
|
14
14
|
type DataClientProtocol,
|
|
15
15
|
type DataServerProtocol,
|
|
16
16
|
type ProjectsChangedEvent,
|
|
17
|
+
type TransferDocumentDeletedEvent,
|
|
17
18
|
type TransferDocumentSavedEvent,
|
|
19
|
+
type TransferDocumentsBuiltEvent,
|
|
18
20
|
type TransferDocumentUpdatedEvent
|
|
19
21
|
} from '@hydranium/protocol/data';
|
|
20
22
|
import { type Harness, makeCapturingDataClient } from '@hydranium/protocol/testing';
|
|
@@ -87,6 +89,10 @@ export interface DataServerHarness<
|
|
|
87
89
|
readonly events: ReadonlyArray<TransferDocumentUpdatedEvent<TTransfer, TDiagnostic>>;
|
|
88
90
|
/** Captured `onDocumentSaved` events. */
|
|
89
91
|
readonly saves: ReadonlyArray<TransferDocumentSavedEvent<TTransfer, TDiagnostic>>;
|
|
92
|
+
/** Captured `onDocumentDeleted` events. */
|
|
93
|
+
readonly deletions: ReadonlyArray<TransferDocumentDeletedEvent>;
|
|
94
|
+
/** Captured `onDocumentsBuilt` events, one per build that had unwatched documents. */
|
|
95
|
+
readonly builds: ReadonlyArray<TransferDocumentsBuiltEvent>;
|
|
90
96
|
/** Captured `onProjectsChanged` events. */
|
|
91
97
|
readonly projectsChanges: ReadonlyArray<ProjectsChangedEvent<TProject>>;
|
|
92
98
|
/** Dispose the underlying duplex pair. Idempotent. */
|
|
@@ -115,7 +121,7 @@ export function makeDataServerHarness<
|
|
|
115
121
|
const server = options.server(pair.left);
|
|
116
122
|
|
|
117
123
|
// The capture half is the shared client double, not a local copy: the same
|
|
118
|
-
// recording semantics (
|
|
124
|
+
// recording semantics (every channel, an override replacing rather than
|
|
119
125
|
// supplementing) then hold for a client-side suite that stands the double up
|
|
120
126
|
// without a server, so an assertion learnt against one reads the same in the
|
|
121
127
|
// other.
|
|
@@ -123,6 +129,8 @@ export function makeDataServerHarness<
|
|
|
123
129
|
client: localClient,
|
|
124
130
|
updates: events,
|
|
125
131
|
saves,
|
|
132
|
+
deletions,
|
|
133
|
+
builds,
|
|
126
134
|
projectsChanges
|
|
127
135
|
} = makeCapturingDataClient<TTransfer, TDiagnostic, TProject>(options.client);
|
|
128
136
|
|
|
@@ -141,6 +149,8 @@ export function makeDataServerHarness<
|
|
|
141
149
|
pair,
|
|
142
150
|
events,
|
|
143
151
|
saves,
|
|
152
|
+
deletions,
|
|
153
|
+
builds,
|
|
144
154
|
projectsChanges,
|
|
145
155
|
dispose: () => pair.dispose()
|
|
146
156
|
};
|