@hydranium/glsp-server 1.0.0-next.30 → 1.0.0-next.32
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/lib/launcher/hydranium-glsp-server.d.ts +4 -3
- package/lib/launcher/hydranium-glsp-server.d.ts.map +1 -1
- package/lib/launcher/hydranium-glsp-server.js +4 -3
- package/lib/launcher/hydranium-glsp-server.js.map +1 -1
- package/lib/messages/index.d.ts +10 -5
- package/lib/messages/index.d.ts.map +1 -1
- package/lib/messages/index.js +10 -5
- package/lib/messages/index.js.map +1 -1
- package/lib/storage/hydranium-glsp-storage.d.ts +30 -22
- package/lib/storage/hydranium-glsp-storage.d.ts.map +1 -1
- package/lib/storage/hydranium-glsp-storage.js +32 -24
- package/lib/storage/hydranium-glsp-storage.js.map +1 -1
- package/package.json +7 -7
- package/src/launcher/hydranium-glsp-server.ts +4 -3
- package/src/messages/index.ts +10 -5
- package/src/storage/hydranium-glsp-storage.ts +32 -24
|
@@ -16,9 +16,10 @@ import { type ClientSession, DefaultGLSPServer, type RequestAction, type Respons
|
|
|
16
16
|
* `error.cause?.toString()` whenever the error is a {@link GLSPServerError},
|
|
17
17
|
* and that one value feeds both the server log and the client's
|
|
18
18
|
* {@link RejectAction}. A {@link GLSPServerError} carrying no `cause` therefore
|
|
19
|
-
* reaches
|
|
20
|
-
* while a plain `Error` survives,
|
|
21
|
-
* itself. The typed error is the trap,
|
|
19
|
+
* reaches its readers as `undefined` — the log line and the client's
|
|
20
|
+
* action-dispatcher warning both print it — while a plain `Error` survives,
|
|
21
|
+
* because the other branch reads the error itself. The typed error is the trap,
|
|
22
|
+
* and it is the one upstream's own
|
|
22
23
|
* `getOrThrow` helper raises: that helper's signature cannot pass a `cause`, so
|
|
23
24
|
* an adopter using the sanctioned helper has no fix available on their side.
|
|
24
25
|
* Restating the cause at each throw site is the alternative, and it costs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydranium-glsp-server.d.ts","sourceRoot":"","sources":["../../src/launcher/hydranium-glsp-server.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,KAAK,aAAa,EAClB,iBAAiB,EAGjB,KAAK,aAAa,EAClB,KAAK,cAAc,EACrB,MAAM,sBAAsB,CAAC;AAG9B
|
|
1
|
+
{"version":3,"file":"hydranium-glsp-server.d.ts","sourceRoot":"","sources":["../../src/launcher/hydranium-glsp-server.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,KAAK,aAAa,EAClB,iBAAiB,EAGjB,KAAK,aAAa,EAClB,KAAK,cAAc,EACrB,MAAM,sBAAsB,CAAC;AAG9B;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBACa,mBAAoB,SAAQ,iBAAiB;IACvD;;;;;;;;OAQG;IACH,SAAS,CAAC,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS;IAOlE;;;;;;;;;;;;;OAaG;cACsB,mBAAmB,CACzC,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,aAAa,CAAC,cAAc,CAAC,EACrC,QAAQ,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC;CAuBlB"}
|
|
@@ -23,9 +23,10 @@ import { injectable } from 'inversify';
|
|
|
23
23
|
* `error.cause?.toString()` whenever the error is a {@link GLSPServerError},
|
|
24
24
|
* and that one value feeds both the server log and the client's
|
|
25
25
|
* {@link RejectAction}. A {@link GLSPServerError} carrying no `cause` therefore
|
|
26
|
-
* reaches
|
|
27
|
-
* while a plain `Error` survives,
|
|
28
|
-
* itself. The typed error is the trap,
|
|
26
|
+
* reaches its readers as `undefined` — the log line and the client's
|
|
27
|
+
* action-dispatcher warning both print it — while a plain `Error` survives,
|
|
28
|
+
* because the other branch reads the error itself. The typed error is the trap,
|
|
29
|
+
* and it is the one upstream's own
|
|
29
30
|
* `getOrThrow` helper raises: that helper's signature cannot pass a `cause`, so
|
|
30
31
|
* an adopter using the sanctioned helper has no fix available on their side.
|
|
31
32
|
* Restating the cause at each throw site is the alternative, and it costs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydranium-glsp-server.js","sourceRoot":"","sources":["../../src/launcher/hydranium-glsp-server.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;;;;;;;AAElF,OAAO,EAEJ,iBAAiB,EACjB,eAAe,EACf,YAAY,EAGd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC
|
|
1
|
+
{"version":3,"file":"hydranium-glsp-server.js","sourceRoot":"","sources":["../../src/launcher/hydranium-glsp-server.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;;;;;;;AAElF,OAAO,EAEJ,iBAAiB,EACjB,eAAe,EACf,YAAY,EAGd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEI,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,iBAAiB;IACvD;;;;;;;;OAQG;IACO,oBAAoB,CAAC,KAAc;QAC1C,IAAI,KAAK,YAAY,eAAe,EAAE,CAAC;YACpC,OAAO,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAClG,CAAC;QACD,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;;;;;OAaG;IACgB,KAAK,CAAC,mBAAmB,CACzC,aAA4B,EAC5B,MAAqC,EACrC,QAAgB;QAEhB,IAAI,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|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* the
|
|
12
|
+
* **Each one is rendered AT ITS RAISE SITE**, through the shared
|
|
13
|
+
* `MessageRenderer`, because GLSP's action protocol carries no slot for an
|
|
14
|
+
* identity on any of its actions — so the identity is gone the moment a raise
|
|
15
|
+
* site formats its text, and there is nothing at the error boundary to render
|
|
16
|
+
* from. That makes this head the one place where a new message can ship
|
|
17
|
+
* unrendered without any single chokepoint noticing, which is why the package's
|
|
18
|
+
* own test suite scans for a declaration reached by `.format()` instead.
|
|
19
|
+
*
|
|
20
|
+
* The barrel is also how an adopter rendering their own diagram chrome
|
|
21
|
+
* discovers the codes exist.
|
|
17
22
|
*/
|
|
18
23
|
export { SAVE_TARGET_UNKNOWN, SOURCE_URI_MISSING } from '../storage/hydranium-glsp-storage.js';
|
|
19
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC"}
|
package/lib/messages/index.js
CHANGED
|
@@ -9,11 +9,16 @@
|
|
|
9
9
|
/**
|
|
10
10
|
* Every user-facing message `@hydranium/glsp-server` raises.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* the
|
|
12
|
+
* **Each one is rendered AT ITS RAISE SITE**, through the shared
|
|
13
|
+
* `MessageRenderer`, because GLSP's action protocol carries no slot for an
|
|
14
|
+
* identity on any of its actions — so the identity is gone the moment a raise
|
|
15
|
+
* site formats its text, and there is nothing at the error boundary to render
|
|
16
|
+
* from. That makes this head the one place where a new message can ship
|
|
17
|
+
* unrendered without any single chokepoint noticing, which is why the package's
|
|
18
|
+
* own test suite scans for a declaration reached by `.format()` instead.
|
|
19
|
+
*
|
|
20
|
+
* The barrel is also how an adopter rendering their own diagram chrome
|
|
21
|
+
* discovers the codes exist.
|
|
17
22
|
*/
|
|
18
23
|
export { SAVE_TARGET_UNKNOWN, SOURCE_URI_MISSING } from '../storage/hydranium-glsp-storage.js';
|
|
19
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC"}
|
|
@@ -14,23 +14,22 @@ import { type AbstractHydraniumGlspState } from '../state/abstract-hydranium-gls
|
|
|
14
14
|
import { type HydraniumGlspSubmissionHandler } from '../submission/hydranium-glsp-submission-handler.js';
|
|
15
15
|
import { SaveConflictPolicy } from './save-conflict-policy.js';
|
|
16
16
|
/**
|
|
17
|
-
* A save action arrived with nowhere to write to.
|
|
17
|
+
* A save action arrived with nowhere to write to. A save action carries no
|
|
18
|
+
* request id, so it falls through to the error handler and `message` becomes
|
|
19
|
+
* the toast text.
|
|
18
20
|
*
|
|
19
|
-
*
|
|
20
|
-
* action
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* `cause?.toString?.()`, so a code there would sit inside human text.
|
|
21
|
+
* Rendered at the raise site rather than by a carrier method, because GLSP's
|
|
22
|
+
* action protocol has no slot for an identity anywhere — every member of its
|
|
23
|
+
* message, status and reject actions is prose or an enum, and
|
|
24
|
+
* `MessageAction.details` is not a substitute since it is prose populated from
|
|
25
|
+
* `cause?.toString?.()`, and a Theia host shows it to a user on demand. So the
|
|
26
|
+
* throw is the last place that still knows which message this is.
|
|
26
27
|
*/
|
|
27
28
|
export declare const SAVE_TARGET_UNKNOWN: import("@hydranium/protocol").MessageDefinition<"Could not determine where to save this model">;
|
|
28
29
|
/**
|
|
29
30
|
* A model request arrived without the source URI it is required to carry.
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* protocol has no slot for an identity, so the English is what a client
|
|
33
|
-
* receives.
|
|
31
|
+
* Rendered at the raise site, like its save-path sibling and for the same
|
|
32
|
+
* reason.
|
|
34
33
|
*/
|
|
35
34
|
export declare const SOURCE_URI_MISSING: import("@hydranium/protocol").MessageDefinition<"Could not open this model: the request did not say which document to load">;
|
|
36
35
|
/**
|
|
@@ -329,10 +328,13 @@ export declare class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel =
|
|
|
329
328
|
* A model request DOES carry a request id, so a throw here takes the
|
|
330
329
|
* client-request path rather than the toast path — and on that path `detail`
|
|
331
330
|
* comes from `cause?.toString?.()`. A single-argument throw therefore reaches
|
|
332
|
-
* neither the
|
|
333
|
-
* are addressed separately, as on the save path: `message`
|
|
334
|
-
* in the user's terms, `cause` names the
|
|
335
|
-
* missing.
|
|
331
|
+
* neither the server log nor the client console: both print `undefined`. So
|
|
332
|
+
* the two readers are addressed separately, as on the save path: `message`
|
|
333
|
+
* names what failed in the user's terms and is rendered, `cause` names the
|
|
334
|
+
* action and the option key that was missing and stays English. On THIS path
|
|
335
|
+
* the cause reaches only logs — `RejectAction.detail` is read by nothing but
|
|
336
|
+
* the client action-dispatcher's `logger.warn` — which is not what makes it
|
|
337
|
+
* English; its content is.
|
|
336
338
|
*/
|
|
337
339
|
protected getSourceUri(action: RequestModelAction): string;
|
|
338
340
|
/**
|
|
@@ -342,12 +344,18 @@ export declare class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel =
|
|
|
342
344
|
* {@link AbstractHydraniumGlspState.setSourceRoot}.
|
|
343
345
|
*
|
|
344
346
|
* A save action carries no request id, so a throw here reaches the user as a
|
|
345
|
-
* toast built from `message`,
|
|
346
|
-
*
|
|
347
|
-
*
|
|
348
|
-
*
|
|
349
|
-
*
|
|
350
|
-
*
|
|
347
|
+
* toast built from `message`, while `cause` travels in
|
|
348
|
+
* `MessageAction.details` — **which a Theia host DOES put in front of a
|
|
349
|
+
* user**, as a "Show details" button on the toast opening a dialog. So the
|
|
350
|
+
* two are not split by reachability; they are split by AUDIENCE, which is
|
|
351
|
+
* the older rule and the one that holds here. The message names what failed
|
|
352
|
+
* in the user's terms and is rendered; the cause names which lookups came
|
|
353
|
+
* back empty for whom, and stays English because a wire action kind, an
|
|
354
|
+
* option key and a client id address whoever composes the system — a
|
|
355
|
+
* translated developer string is a worse outcome than an untranslated one.
|
|
356
|
+
* Neither can name the URI — not having one IS the failure, and both sources
|
|
357
|
+
* are written together, so the typed `sourceUri` is equally empty whenever
|
|
358
|
+
* this fires.
|
|
351
359
|
*/
|
|
352
360
|
protected getFileUri(action: SaveModelAction): string;
|
|
353
361
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydranium-glsp-storage.d.ts","sourceRoot":"","sources":["../../src/storage/hydranium-glsp-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAGlF,OAAO,EACJ,KAAK,MAAM,EACX,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,oBAAoB,EAEpB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EAGf,MAAM,IAAI,UAAU,EACpB,KAAK,YAAY,EAGjB,cAAc,EACd,KAAK,kBAAkB,EAEvB,KAAK,eAAe,EAEpB,KAAK,kBAAkB,EAEzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAiB,oBAAoB,EAAE,MAAM,qBAAqB,CAAC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../state/hydranium-shared-core-services.js';
|
|
26
26
|
import { DEFAULT_SAVE_CONFLICT_POLICY, SaveConflictPolicy } from './save-conflict-policy.js';
|
|
27
27
|
/**
|
|
28
|
-
* A save action arrived with nowhere to write to.
|
|
28
|
+
* A save action arrived with nowhere to write to. A save action carries no
|
|
29
|
+
* request id, so it falls through to the error handler and `message` becomes
|
|
30
|
+
* the toast text.
|
|
29
31
|
*
|
|
30
|
-
*
|
|
31
|
-
* action
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* `cause?.toString?.()`, so a code there would sit inside human text.
|
|
32
|
+
* Rendered at the raise site rather than by a carrier method, because GLSP's
|
|
33
|
+
* action protocol has no slot for an identity anywhere — every member of its
|
|
34
|
+
* message, status and reject actions is prose or an enum, and
|
|
35
|
+
* `MessageAction.details` is not a substitute since it is prose populated from
|
|
36
|
+
* `cause?.toString?.()`, and a Theia host shows it to a user on demand. So the
|
|
37
|
+
* throw is the last place that still knows which message this is.
|
|
37
38
|
*/
|
|
38
39
|
export const SAVE_TARGET_UNKNOWN = defineMessage('hydranium/glsp-server/save-target-unknown', 'Could not determine where to save this model');
|
|
39
40
|
/**
|
|
40
41
|
* A model request arrived without the source URI it is required to carry.
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* protocol has no slot for an identity, so the English is what a client
|
|
44
|
-
* receives.
|
|
42
|
+
* Rendered at the raise site, like its save-path sibling and for the same
|
|
43
|
+
* reason.
|
|
45
44
|
*/
|
|
46
45
|
export const SOURCE_URI_MISSING = defineMessage('hydranium/glsp-server/source-uri-missing', 'Could not open this model: the request did not say which document to load');
|
|
47
46
|
/** Window (ms) over which back-to-back external rebuilds collapse into one resubmit. */
|
|
@@ -540,15 +539,18 @@ let HydraniumGlspStorage = class HydraniumGlspStorage {
|
|
|
540
539
|
* A model request DOES carry a request id, so a throw here takes the
|
|
541
540
|
* client-request path rather than the toast path — and on that path `detail`
|
|
542
541
|
* comes from `cause?.toString?.()`. A single-argument throw therefore reaches
|
|
543
|
-
* neither the
|
|
544
|
-
* are addressed separately, as on the save path: `message`
|
|
545
|
-
* in the user's terms, `cause` names the
|
|
546
|
-
* missing.
|
|
542
|
+
* neither the server log nor the client console: both print `undefined`. So
|
|
543
|
+
* the two readers are addressed separately, as on the save path: `message`
|
|
544
|
+
* names what failed in the user's terms and is rendered, `cause` names the
|
|
545
|
+
* action and the option key that was missing and stays English. On THIS path
|
|
546
|
+
* the cause reaches only logs — `RejectAction.detail` is read by nothing but
|
|
547
|
+
* the client action-dispatcher's `logger.warn` — which is not what makes it
|
|
548
|
+
* English; its content is.
|
|
547
549
|
*/
|
|
548
550
|
getSourceUri(action) {
|
|
549
551
|
const sourceUri = action.options?.[SOURCE_URI_ARG];
|
|
550
552
|
if (typeof sourceUri !== 'string') {
|
|
551
|
-
throw new GLSPServerError(
|
|
553
|
+
throw new GLSPServerError(this.sharedServices.MessageRenderer.renderMessage(SOURCE_URI_MISSING), `no '${SOURCE_URI_ARG}' option on the ${action.kind} action (received ${typeof sourceUri})`);
|
|
552
554
|
}
|
|
553
555
|
return sourceUri;
|
|
554
556
|
}
|
|
@@ -559,17 +561,23 @@ let HydraniumGlspStorage = class HydraniumGlspStorage {
|
|
|
559
561
|
* {@link AbstractHydraniumGlspState.setSourceRoot}.
|
|
560
562
|
*
|
|
561
563
|
* A save action carries no request id, so a throw here reaches the user as a
|
|
562
|
-
* toast built from `message`,
|
|
563
|
-
*
|
|
564
|
-
*
|
|
565
|
-
*
|
|
566
|
-
*
|
|
567
|
-
*
|
|
564
|
+
* toast built from `message`, while `cause` travels in
|
|
565
|
+
* `MessageAction.details` — **which a Theia host DOES put in front of a
|
|
566
|
+
* user**, as a "Show details" button on the toast opening a dialog. So the
|
|
567
|
+
* two are not split by reachability; they are split by AUDIENCE, which is
|
|
568
|
+
* the older rule and the one that holds here. The message names what failed
|
|
569
|
+
* in the user's terms and is rendered; the cause names which lookups came
|
|
570
|
+
* back empty for whom, and stays English because a wire action kind, an
|
|
571
|
+
* option key and a client id address whoever composes the system — a
|
|
572
|
+
* translated developer string is a worse outcome than an untranslated one.
|
|
573
|
+
* Neither can name the URI — not having one IS the failure, and both sources
|
|
574
|
+
* are written together, so the typed `sourceUri` is equally empty whenever
|
|
575
|
+
* this fires.
|
|
568
576
|
*/
|
|
569
577
|
getFileUri(action) {
|
|
570
578
|
const uri = action.fileUri ?? this.state.get(SOURCE_URI_ARG);
|
|
571
579
|
if (!uri) {
|
|
572
|
-
throw new GLSPServerError(
|
|
580
|
+
throw new GLSPServerError(this.sharedServices.MessageRenderer.renderMessage(SAVE_TARGET_UNKNOWN), `no fileUri on the save action and no ${SOURCE_URI_ARG} in the model state (clientId=${this.state.clientId})`);
|
|
573
581
|
}
|
|
574
582
|
return uri;
|
|
575
583
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydranium-glsp-storage.js","sourceRoot":"","sources":["../../src/storage/hydranium-glsp-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;;;;;;;;;;AAElF,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAEJ,gBAAgB,EAGhB,oBAAoB,EACpB,YAAY,EAGZ,QAAQ,EACR,eAAe,EACf,MAAM,IAAI,UAAU,EAEpB,UAAU,EACV,sBAAsB,EACtB,cAAc,EAEd,cAAc,EAEd,iBAAiB,EAEjB,mBAAmB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAExE,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAuF,MAAM,iBAAiB,CAAC;AACnI,OAAO,EAAE,kBAAkB,EA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CAijBhC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hydranium/glsp-server",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.32",
|
|
4
4
|
"description": "GLSP protocol head for the hydranium framework. Peer of @hydranium/core/lsp and @hydranium/data-server; built on @hydranium/core.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hydranium",
|
|
@@ -87,9 +87,9 @@
|
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@eclipse-glsp/protocol": "2.7.0",
|
|
89
89
|
"@eclipse-glsp/server": "2.7.0",
|
|
90
|
-
"@hydranium/core": "1.0.0-next.
|
|
91
|
-
"@hydranium/langium": "1.0.0-next.
|
|
92
|
-
"@hydranium/protocol": "1.0.0-next.
|
|
90
|
+
"@hydranium/core": "1.0.0-next.32",
|
|
91
|
+
"@hydranium/langium": "1.0.0-next.32",
|
|
92
|
+
"@hydranium/protocol": "1.0.0-next.32",
|
|
93
93
|
"inversify": "6.2.2",
|
|
94
94
|
"reflect-metadata": "0.2.2",
|
|
95
95
|
"rimraf": "^5.0.0",
|
|
@@ -100,9 +100,9 @@
|
|
|
100
100
|
"peerDependencies": {
|
|
101
101
|
"@eclipse-glsp/protocol": "^2.6.0",
|
|
102
102
|
"@eclipse-glsp/server": "^2.6.0",
|
|
103
|
-
"@hydranium/core": "1.0.0-next.
|
|
104
|
-
"@hydranium/langium": "1.0.0-next.
|
|
105
|
-
"@hydranium/protocol": "1.0.0-next.
|
|
103
|
+
"@hydranium/core": "1.0.0-next.32",
|
|
104
|
+
"@hydranium/langium": "1.0.0-next.32",
|
|
105
|
+
"@hydranium/protocol": "1.0.0-next.32",
|
|
106
106
|
"inversify": "^6.0.0",
|
|
107
107
|
"reflect-metadata": "^0.2.2",
|
|
108
108
|
"vscode-jsonrpc": "9.0.1",
|
|
@@ -26,9 +26,10 @@ import { injectable } from 'inversify';
|
|
|
26
26
|
* `error.cause?.toString()` whenever the error is a {@link GLSPServerError},
|
|
27
27
|
* and that one value feeds both the server log and the client's
|
|
28
28
|
* {@link RejectAction}. A {@link GLSPServerError} carrying no `cause` therefore
|
|
29
|
-
* reaches
|
|
30
|
-
* while a plain `Error` survives,
|
|
31
|
-
* itself. The typed error is the trap,
|
|
29
|
+
* reaches its readers as `undefined` — the log line and the client's
|
|
30
|
+
* action-dispatcher warning both print it — while a plain `Error` survives,
|
|
31
|
+
* because the other branch reads the error itself. The typed error is the trap,
|
|
32
|
+
* and it is the one upstream's own
|
|
32
33
|
* `getOrThrow` helper raises: that helper's signature cannot pass a `cause`, so
|
|
33
34
|
* an adopter using the sanctioned helper has no fix available on their side.
|
|
34
35
|
* Restating the cause at each throw site is the alternative, and it costs
|
package/src/messages/index.ts
CHANGED
|
@@ -10,11 +10,16 @@
|
|
|
10
10
|
/**
|
|
11
11
|
* Every user-facing message `@hydranium/glsp-server` raises.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* the
|
|
13
|
+
* **Each one is rendered AT ITS RAISE SITE**, through the shared
|
|
14
|
+
* `MessageRenderer`, because GLSP's action protocol carries no slot for an
|
|
15
|
+
* identity on any of its actions — so the identity is gone the moment a raise
|
|
16
|
+
* site formats its text, and there is nothing at the error boundary to render
|
|
17
|
+
* from. That makes this head the one place where a new message can ship
|
|
18
|
+
* unrendered without any single chokepoint noticing, which is why the package's
|
|
19
|
+
* own test suite scans for a declaration reached by `.format()` instead.
|
|
20
|
+
*
|
|
21
|
+
* The barrel is also how an adopter rendering their own diagram chrome
|
|
22
|
+
* discovers the codes exist.
|
|
18
23
|
*/
|
|
19
24
|
|
|
20
25
|
export { SAVE_TARGET_UNKNOWN, SOURCE_URI_MISSING } from '../storage/hydranium-glsp-storage.js';
|
|
@@ -43,15 +43,16 @@ import { HydraniumTypes } from '../state/hydranium-shared-core-services.js';
|
|
|
43
43
|
import { DEFAULT_SAVE_CONFLICT_POLICY, SaveConflictPolicy } from './save-conflict-policy.js';
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
-
* A save action arrived with nowhere to write to.
|
|
46
|
+
* A save action arrived with nowhere to write to. A save action carries no
|
|
47
|
+
* request id, so it falls through to the error handler and `message` becomes
|
|
48
|
+
* the toast text.
|
|
47
49
|
*
|
|
48
|
-
*
|
|
49
|
-
* action
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* `cause?.toString?.()`, so a code there would sit inside human text.
|
|
50
|
+
* Rendered at the raise site rather than by a carrier method, because GLSP's
|
|
51
|
+
* action protocol has no slot for an identity anywhere — every member of its
|
|
52
|
+
* message, status and reject actions is prose or an enum, and
|
|
53
|
+
* `MessageAction.details` is not a substitute since it is prose populated from
|
|
54
|
+
* `cause?.toString?.()`, and a Theia host shows it to a user on demand. So the
|
|
55
|
+
* throw is the last place that still knows which message this is.
|
|
55
56
|
*/
|
|
56
57
|
export const SAVE_TARGET_UNKNOWN = defineMessage(
|
|
57
58
|
'hydranium/glsp-server/save-target-unknown',
|
|
@@ -60,10 +61,8 @@ export const SAVE_TARGET_UNKNOWN = defineMessage(
|
|
|
60
61
|
|
|
61
62
|
/**
|
|
62
63
|
* A model request arrived without the source URI it is required to carry.
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* protocol has no slot for an identity, so the English is what a client
|
|
66
|
-
* receives.
|
|
64
|
+
* Rendered at the raise site, like its save-path sibling and for the same
|
|
65
|
+
* reason.
|
|
67
66
|
*/
|
|
68
67
|
export const SOURCE_URI_MISSING = defineMessage(
|
|
69
68
|
'hydranium/glsp-server/source-uri-missing',
|
|
@@ -616,16 +615,19 @@ export class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel = string>
|
|
|
616
615
|
* A model request DOES carry a request id, so a throw here takes the
|
|
617
616
|
* client-request path rather than the toast path — and on that path `detail`
|
|
618
617
|
* comes from `cause?.toString?.()`. A single-argument throw therefore reaches
|
|
619
|
-
* neither the
|
|
620
|
-
* are addressed separately, as on the save path: `message`
|
|
621
|
-
* in the user's terms, `cause` names the
|
|
622
|
-
* missing.
|
|
618
|
+
* neither the server log nor the client console: both print `undefined`. So
|
|
619
|
+
* the two readers are addressed separately, as on the save path: `message`
|
|
620
|
+
* names what failed in the user's terms and is rendered, `cause` names the
|
|
621
|
+
* action and the option key that was missing and stays English. On THIS path
|
|
622
|
+
* the cause reaches only logs — `RejectAction.detail` is read by nothing but
|
|
623
|
+
* the client action-dispatcher's `logger.warn` — which is not what makes it
|
|
624
|
+
* English; its content is.
|
|
623
625
|
*/
|
|
624
626
|
protected getSourceUri(action: RequestModelAction): string {
|
|
625
627
|
const sourceUri = action.options?.[SOURCE_URI_ARG];
|
|
626
628
|
if (typeof sourceUri !== 'string') {
|
|
627
629
|
throw new GLSPServerError(
|
|
628
|
-
|
|
630
|
+
this.sharedServices.MessageRenderer.renderMessage(SOURCE_URI_MISSING),
|
|
629
631
|
`no '${SOURCE_URI_ARG}' option on the ${action.kind} action (received ${typeof sourceUri})`
|
|
630
632
|
);
|
|
631
633
|
}
|
|
@@ -639,18 +641,24 @@ export class HydraniumGlspStorage<TRoot extends AstNode, TSourceModel = string>
|
|
|
639
641
|
* {@link AbstractHydraniumGlspState.setSourceRoot}.
|
|
640
642
|
*
|
|
641
643
|
* A save action carries no request id, so a throw here reaches the user as a
|
|
642
|
-
* toast built from `message`,
|
|
643
|
-
*
|
|
644
|
-
*
|
|
645
|
-
*
|
|
646
|
-
*
|
|
647
|
-
*
|
|
644
|
+
* toast built from `message`, while `cause` travels in
|
|
645
|
+
* `MessageAction.details` — **which a Theia host DOES put in front of a
|
|
646
|
+
* user**, as a "Show details" button on the toast opening a dialog. So the
|
|
647
|
+
* two are not split by reachability; they are split by AUDIENCE, which is
|
|
648
|
+
* the older rule and the one that holds here. The message names what failed
|
|
649
|
+
* in the user's terms and is rendered; the cause names which lookups came
|
|
650
|
+
* back empty for whom, and stays English because a wire action kind, an
|
|
651
|
+
* option key and a client id address whoever composes the system — a
|
|
652
|
+
* translated developer string is a worse outcome than an untranslated one.
|
|
653
|
+
* Neither can name the URI — not having one IS the failure, and both sources
|
|
654
|
+
* are written together, so the typed `sourceUri` is equally empty whenever
|
|
655
|
+
* this fires.
|
|
648
656
|
*/
|
|
649
657
|
protected getFileUri(action: SaveModelAction): string {
|
|
650
658
|
const uri = action.fileUri ?? this.state.get<string>(SOURCE_URI_ARG);
|
|
651
659
|
if (!uri) {
|
|
652
660
|
throw new GLSPServerError(
|
|
653
|
-
|
|
661
|
+
this.sharedServices.MessageRenderer.renderMessage(SAVE_TARGET_UNKNOWN),
|
|
654
662
|
`no fileUri on the save action and no ${SOURCE_URI_ARG} in the model state (clientId=${this.state.clientId})`
|
|
655
663
|
);
|
|
656
664
|
}
|