@hydranium/core 1.0.0-next.61 → 1.0.0-next.62
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/langium/config/configuration-provider.d.ts +22 -2
- package/lib/langium/config/configuration-provider.d.ts.map +1 -1
- package/lib/langium/config/configuration-provider.js +25 -2
- package/lib/langium/config/configuration-provider.js.map +1 -1
- package/package.json +5 -5
- package/src/langium/config/configuration-provider.ts +25 -2
|
@@ -31,11 +31,14 @@ export declare class HydraniumConfigurationProvider extends DefaultConfiguration
|
|
|
31
31
|
protected registerForSection?: (params: DidChangeConfigurationRegistrationOptions) => void;
|
|
32
32
|
protected fetchSections?: (items: ConfigurationItem[]) => Promise<unknown>;
|
|
33
33
|
/**
|
|
34
|
-
* Sections already
|
|
34
|
+
* Sections already dealt with, holding the in-flight work so concurrent
|
|
35
35
|
* readers share one round trip. Entries stay after they settle: they record
|
|
36
|
-
* that the
|
|
36
|
+
* that the section was HANDLED, and without that an unset section is
|
|
37
37
|
* re-requested on every read, "unset" and "not fetched" being the same
|
|
38
38
|
* absence in the store.
|
|
39
|
+
*
|
|
40
|
+
* A section the client's capabilities ruled out counts as handled, having
|
|
41
|
+
* been settled by asking nothing.
|
|
39
42
|
*/
|
|
40
43
|
protected readonly requestedSections: Map<string, Promise<void>>;
|
|
41
44
|
initialized(params: ConfigurationInitializedParams): Promise<void>;
|
|
@@ -48,6 +51,23 @@ export declare class HydraniumConfigurationProvider extends DefaultConfiguration
|
|
|
48
51
|
/** Ask about `section` once, sharing the request with any concurrent reader. */
|
|
49
52
|
protected requestSection(section: string): Promise<void>;
|
|
50
53
|
/**
|
|
54
|
+
* The hooks are gated on the client having declared `workspace.configuration`.
|
|
55
|
+
* A connection binds them whatever the client said, so their presence is not
|
|
56
|
+
* consent: calling them sends a `client/registerCapability` and a
|
|
57
|
+
* `workspace/configuration` to a client that advertised support for neither,
|
|
58
|
+
* which is entitled to answer either with a method-not-found and may drop the
|
|
59
|
+
* connection.
|
|
60
|
+
*
|
|
61
|
+
* That flag is exact for the fetch and KNOWINGLY coarse for the registration,
|
|
62
|
+
* which the spec governs by
|
|
63
|
+
* `workspace.didChangeConfiguration.dynamicRegistration`. The base registers
|
|
64
|
+
* under `workspace.configuration` alone before any of this runs, so gating
|
|
65
|
+
* the registration on the narrower flag here would withhold a request whose
|
|
66
|
+
* twin has already gone out, sparing the client nothing. A client declaring
|
|
67
|
+
* `workspace.configuration` without dynamic registration is still registered
|
|
68
|
+
* for, by the base and by this; closing that means changing the base's pass,
|
|
69
|
+
* not this gate.
|
|
70
|
+
*
|
|
51
71
|
* Registering before fetching, so an edit landing between the two arrives as
|
|
52
72
|
* a notification instead of being lost; the reverse order drops it.
|
|
53
73
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration-provider.d.ts","sourceRoot":"","sources":["../../../src/langium/config/configuration-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,KAAK,8BAA8B,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AACvG,OAAO,KAAK,EAAE,iBAAiB,EAAE,yCAAyC,EAAE,MAAM,uBAAuB,CAAC;AAE1G;;;;;;;;;;;;;GAaG;AACH,qBAAa,8BAA+B,SAAQ,4BAA4B;IAC7E;;;;OAIG;IACH,SAAS,CAAC,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,yCAAyC,KAAK,IAAI,CAAC;IAC3F,SAAS,CAAC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAE3E
|
|
1
|
+
{"version":3,"file":"configuration-provider.d.ts","sourceRoot":"","sources":["../../../src/langium/config/configuration-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,KAAK,8BAA8B,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AACvG,OAAO,KAAK,EAAE,iBAAiB,EAAE,yCAAyC,EAAE,MAAM,uBAAuB,CAAC;AAE1G;;;;;;;;;;;;;GAaG;AACH,qBAAa,8BAA+B,SAAQ,4BAA4B;IAC7E;;;;OAIG;IACH,SAAS,CAAC,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,yCAAyC,KAAK,IAAI,CAAC;IAC3F,SAAS,CAAC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAE3E;;;;;;;;;OASG;IACH,SAAS,CAAC,QAAQ,CAAC,iBAAiB,6BAAoC;IAEzD,WAAW,CAAC,MAAM,EAAE,8BAA8B,GAAG,OAAO,CAAC,IAAI,CAAC;IAMjF;;;;OAIG;IACY,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAS1F,gFAAgF;IAChF,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUxD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;cACa,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAclE"}
|
|
@@ -30,11 +30,14 @@ export class HydraniumConfigurationProvider extends DefaultConfigurationProvider
|
|
|
30
30
|
registerForSection;
|
|
31
31
|
fetchSections;
|
|
32
32
|
/**
|
|
33
|
-
* Sections already
|
|
33
|
+
* Sections already dealt with, holding the in-flight work so concurrent
|
|
34
34
|
* readers share one round trip. Entries stay after they settle: they record
|
|
35
|
-
* that the
|
|
35
|
+
* that the section was HANDLED, and without that an unset section is
|
|
36
36
|
* re-requested on every read, "unset" and "not fetched" being the same
|
|
37
37
|
* absence in the store.
|
|
38
|
+
*
|
|
39
|
+
* A section the client's capabilities ruled out counts as handled, having
|
|
40
|
+
* been settled by asking nothing.
|
|
38
41
|
*/
|
|
39
42
|
requestedSections = new Map();
|
|
40
43
|
async initialized(params) {
|
|
@@ -66,6 +69,23 @@ export class HydraniumConfigurationProvider extends DefaultConfigurationProvider
|
|
|
66
69
|
return request;
|
|
67
70
|
}
|
|
68
71
|
/**
|
|
72
|
+
* The hooks are gated on the client having declared `workspace.configuration`.
|
|
73
|
+
* A connection binds them whatever the client said, so their presence is not
|
|
74
|
+
* consent: calling them sends a `client/registerCapability` and a
|
|
75
|
+
* `workspace/configuration` to a client that advertised support for neither,
|
|
76
|
+
* which is entitled to answer either with a method-not-found and may drop the
|
|
77
|
+
* connection.
|
|
78
|
+
*
|
|
79
|
+
* That flag is exact for the fetch and KNOWINGLY coarse for the registration,
|
|
80
|
+
* which the spec governs by
|
|
81
|
+
* `workspace.didChangeConfiguration.dynamicRegistration`. The base registers
|
|
82
|
+
* under `workspace.configuration` alone before any of this runs, so gating
|
|
83
|
+
* the registration on the narrower flag here would withhold a request whose
|
|
84
|
+
* twin has already gone out, sparing the client nothing. A client declaring
|
|
85
|
+
* `workspace.configuration` without dynamic registration is still registered
|
|
86
|
+
* for, by the base and by this; closing that means changing the base's pass,
|
|
87
|
+
* not this gate.
|
|
88
|
+
*
|
|
69
89
|
* Registering before fetching, so an edit landing between the two arrives as
|
|
70
90
|
* a notification instead of being lost; the reverse order drops it.
|
|
71
91
|
*
|
|
@@ -75,6 +95,9 @@ export class HydraniumConfigurationProvider extends DefaultConfigurationProvider
|
|
|
75
95
|
* change that is only this provider catching up.
|
|
76
96
|
*/
|
|
77
97
|
async doRequestSection(section) {
|
|
98
|
+
if (!this.workspaceConfig) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
78
101
|
this.registerForSection?.({ section });
|
|
79
102
|
if (!this.fetchSections) {
|
|
80
103
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration-provider.js","sourceRoot":"","sources":["../../../src/langium/config/configuration-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAuC,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAGvG;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,8BAA+B,SAAQ,4BAA4B;IAC7E;;;;OAIG;IACO,kBAAkB,CAA+D;IACjF,aAAa,CAAoD;IAE3E
|
|
1
|
+
{"version":3,"file":"configuration-provider.js","sourceRoot":"","sources":["../../../src/langium/config/configuration-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAuC,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAGvG;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,8BAA+B,SAAQ,4BAA4B;IAC7E;;;;OAIG;IACO,kBAAkB,CAA+D;IACjF,aAAa,CAAoD;IAE3E;;;;;;;;;OASG;IACgB,iBAAiB,GAAG,IAAI,GAAG,EAAyB,CAAC;IAE/D,KAAK,CAAC,WAAW,CAAC,MAAsC;QAC9D,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC1C,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,kBAAkB,CAAC;QAC/C,MAAM,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACM,KAAK,CAAC,gBAAgB,CAAC,QAAgB,EAAE,aAAqB;QACpE,MAAM,IAAI,CAAC,KAAK,CAAC;QACjB,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAC7C,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,SAAS,EAAE,CAAC;YACxC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,KAAK,CAAC,gBAAgB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IAC1D,CAAC;IAED,gFAAgF;IACtE,cAAc,CAAC,OAAe;QACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACrD,IAAI,QAAQ,EAAE,CAAC;YACZ,OAAO,QAAQ,CAAC;QACnB,CAAC;QACD,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC/C,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC7C,OAAO,OAAO,CAAC;IAClB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACO,KAAK,CAAC,gBAAgB,CAAC,OAAe;QAC7C,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;YACzB,OAAO;QACV,CAAC;QACD,IAAI,CAAC,kBAAkB,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;QACvC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YACvB,OAAO;QACV,CAAC;QACD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;QACxD,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QAC5D,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACzC,IAAI,CAAC,0BAA0B,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACnD,CAAC;IACJ,CAAC;CACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hydranium/core",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.62",
|
|
4
4
|
"description": "Foundational runtime of the hydranium framework: AST coordination layer (services, integrity, AST extension, serialization, multi-client documents) plus the LSP textual head at the /lsp subpath. Consumed by protocol-head packages (@hydranium/data-server, @hydranium/glsp-server).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hydranium",
|
|
@@ -104,8 +104,8 @@
|
|
|
104
104
|
"diff": "^5.2.0"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
|
-
"@hydranium/langium": "1.0.0-next.
|
|
108
|
-
"@hydranium/protocol": "1.0.0-next.
|
|
107
|
+
"@hydranium/langium": "1.0.0-next.62",
|
|
108
|
+
"@hydranium/protocol": "1.0.0-next.62",
|
|
109
109
|
"@playwright/test": "^1.40.0",
|
|
110
110
|
"@types/diff": "^5.2.0",
|
|
111
111
|
"rimraf": "^5.0.0",
|
|
@@ -117,8 +117,8 @@
|
|
|
117
117
|
"vscode-languageserver-types": "^3.17.5"
|
|
118
118
|
},
|
|
119
119
|
"peerDependencies": {
|
|
120
|
-
"@hydranium/langium": "1.0.0-next.
|
|
121
|
-
"@hydranium/protocol": "1.0.0-next.
|
|
120
|
+
"@hydranium/langium": "1.0.0-next.62",
|
|
121
|
+
"@hydranium/protocol": "1.0.0-next.62",
|
|
122
122
|
"@playwright/test": "^1.40.0",
|
|
123
123
|
"vscode-jsonrpc": "9.0.1",
|
|
124
124
|
"vscode-languageserver": "~10.0.1",
|
|
@@ -34,11 +34,14 @@ export class HydraniumConfigurationProvider extends DefaultConfigurationProvider
|
|
|
34
34
|
protected fetchSections?: (items: ConfigurationItem[]) => Promise<unknown>;
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* Sections already
|
|
37
|
+
* Sections already dealt with, holding the in-flight work so concurrent
|
|
38
38
|
* readers share one round trip. Entries stay after they settle: they record
|
|
39
|
-
* that the
|
|
39
|
+
* that the section was HANDLED, and without that an unset section is
|
|
40
40
|
* re-requested on every read, "unset" and "not fetched" being the same
|
|
41
41
|
* absence in the store.
|
|
42
|
+
*
|
|
43
|
+
* A section the client's capabilities ruled out counts as handled, having
|
|
44
|
+
* been settled by asking nothing.
|
|
42
45
|
*/
|
|
43
46
|
protected readonly requestedSections = new Map<string, Promise<void>>();
|
|
44
47
|
|
|
@@ -74,6 +77,23 @@ export class HydraniumConfigurationProvider extends DefaultConfigurationProvider
|
|
|
74
77
|
}
|
|
75
78
|
|
|
76
79
|
/**
|
|
80
|
+
* The hooks are gated on the client having declared `workspace.configuration`.
|
|
81
|
+
* A connection binds them whatever the client said, so their presence is not
|
|
82
|
+
* consent: calling them sends a `client/registerCapability` and a
|
|
83
|
+
* `workspace/configuration` to a client that advertised support for neither,
|
|
84
|
+
* which is entitled to answer either with a method-not-found and may drop the
|
|
85
|
+
* connection.
|
|
86
|
+
*
|
|
87
|
+
* That flag is exact for the fetch and KNOWINGLY coarse for the registration,
|
|
88
|
+
* which the spec governs by
|
|
89
|
+
* `workspace.didChangeConfiguration.dynamicRegistration`. The base registers
|
|
90
|
+
* under `workspace.configuration` alone before any of this runs, so gating
|
|
91
|
+
* the registration on the narrower flag here would withhold a request whose
|
|
92
|
+
* twin has already gone out, sparing the client nothing. A client declaring
|
|
93
|
+
* `workspace.configuration` without dynamic registration is still registered
|
|
94
|
+
* for, by the base and by this; closing that means changing the base's pass,
|
|
95
|
+
* not this gate.
|
|
96
|
+
*
|
|
77
97
|
* Registering before fetching, so an edit landing between the two arrives as
|
|
78
98
|
* a notification instead of being lost; the reverse order drops it.
|
|
79
99
|
*
|
|
@@ -83,6 +103,9 @@ export class HydraniumConfigurationProvider extends DefaultConfigurationProvider
|
|
|
83
103
|
* change that is only this provider catching up.
|
|
84
104
|
*/
|
|
85
105
|
protected async doRequestSection(section: string): Promise<void> {
|
|
106
|
+
if (!this.workspaceConfig) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
86
109
|
this.registerForSection?.({ section });
|
|
87
110
|
if (!this.fetchSections) {
|
|
88
111
|
return;
|