@fossil-lang/wasm 0.3.0-alpha.21 → 0.3.0-alpha.23
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 -2
- package/dist/client.d.ts +10 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +11 -0
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/program.d.ts +20 -4
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +6 -3
- package/dist/program.js.map +1 -1
- package/package.json +3 -3
- package/pkg/fossil_wasm.d.ts +20 -0
- package/pkg/fossil_wasm.js +30 -0
- package/pkg/fossil_wasm_bg.wasm +0 -0
- package/pkg/fossil_wasm_bg.wasm.d.ts +1 -0
package/README.md
CHANGED
|
@@ -22,8 +22,8 @@ import { fossil } from '@fossil-lang/codemirror-fossil';
|
|
|
22
22
|
const program = await openProgram('job.fossil', { host, text }); // host: Host
|
|
23
23
|
const extensions = fossil({ ...program, onNavigate });
|
|
24
24
|
|
|
25
|
-
program.registerDescriptor(descriptor); // a host-introspected source, before a check
|
|
26
25
|
const sources = await program.sources(text); // what introspection DESCRIBEs
|
|
26
|
+
program.registerIntrospection(await introspect(sources, io)); // before a check
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
It boots the module, opens `uri` in its own workspace, and reads the documents
|
|
@@ -69,7 +69,10 @@ const rows = ws.check();
|
|
|
69
69
|
- `sources(h)` — the `ProgramSource[]` the program reads, through the map the
|
|
70
70
|
last `resolveDocuments` set: binding, key,
|
|
71
71
|
locator, connection, catalogue row, reader option. Introspection DESCRIBEs these and
|
|
72
|
-
registers each descriptor under `key` with `registerInferredDescriptor
|
|
72
|
+
registers each descriptor under `key` with `registerInferredDescriptor`, and each source it
|
|
73
|
+
could not describe with `registerUndescribed(key, problem)` — a warning of `check` at the call
|
|
74
|
+
that reads `key`, until a descriptor under it replaces the problem.
|
|
75
|
+
`FossilProgram.registerIntrospection` is both, from `introspect`'s result as it came back.
|
|
73
76
|
|
|
74
77
|
## Loading: the `.wasm` is an asset of this package
|
|
75
78
|
|
package/dist/client.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Mirrors `@fossil-lang/corpus`'s `client.ts` split, the known-good shape.
|
|
13
13
|
*/
|
|
14
14
|
import { FileHandle as RawFileHandle } from '../pkg/fossil_wasm.js';
|
|
15
|
-
import type { DocumentWorkspace, MissingDocument, ProgramSource, TokenKindLegend, TokenRow } from '@fossil-lang/types';
|
|
15
|
+
import type { DocumentWorkspace, MissingDocument, Problem, ProgramSource, TokenKindLegend, TokenRow } from '@fossil-lang/types';
|
|
16
16
|
import type { CheckRow, CompletionRow, DefinitionRow, HoverRow, InferredDescriptorJson, SemanticTokenRow, SourceRefInfo, ProviderInfo } from './index.js';
|
|
17
17
|
/**
|
|
18
18
|
* Opaque file-handle returned by {@link FossilWorkspace.openFile}. Pass it
|
|
@@ -202,5 +202,14 @@ export declare class FossilWorkspace {
|
|
|
202
202
|
* side, the `serde_json` error as its cause.
|
|
203
203
|
*/
|
|
204
204
|
registerInferredDescriptor(descriptor: InferredDescriptorJson): void;
|
|
205
|
+
/**
|
|
206
|
+
* Record that the host could not describe the source the program wrote as `key`, and why. A
|
|
207
|
+
* check then reports it at the binding that reads `key` — one warning per key, under
|
|
208
|
+
* `problem.code` — until a descriptor is registered under the same key, which forgets it.
|
|
209
|
+
*
|
|
210
|
+
* @throws {FossilError} `api/invalid-argument` if `problem` carries a code this build of fossil
|
|
211
|
+
* does not know, the `serde_json` error as its cause.
|
|
212
|
+
*/
|
|
213
|
+
registerUndescribed(key: string, problem: Problem): void;
|
|
205
214
|
}
|
|
206
215
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;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AAU,GAAG,QAAQ,EAAE;IAI9C;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI;IAM3E;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,aAAa,EAAE;IAIjF;;;;;;;OAOG;IACH,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,aAAa,EAAE;IAIpF;;;;;OAKG;IACH,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,gBAAgB,EAAE;IAItD;;;;;;;;;;;;OAYG;IACH,0BAA0B,CAAC,UAAU,EAAE,sBAAsB,GAAG,IAAI;IAMpE;;;;;;;OAOG;IACH,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;CAGzD"}
|
package/dist/client.js
CHANGED
|
@@ -246,5 +246,16 @@ export class FossilWorkspace {
|
|
|
246
246
|
// pass a typed object.
|
|
247
247
|
this._inner.registerInferredDescriptor(JSON.stringify(descriptor));
|
|
248
248
|
}
|
|
249
|
+
/**
|
|
250
|
+
* Record that the host could not describe the source the program wrote as `key`, and why. A
|
|
251
|
+
* check then reports it at the binding that reads `key` — one warning per key, under
|
|
252
|
+
* `problem.code` — until a descriptor is registered under the same key, which forgets it.
|
|
253
|
+
*
|
|
254
|
+
* @throws {FossilError} `api/invalid-argument` if `problem` carries a code this build of fossil
|
|
255
|
+
* does not know, the `serde_json` error as its cause.
|
|
256
|
+
*/
|
|
257
|
+
registerUndescribed(key, problem) {
|
|
258
|
+
this._inner.registerUndescribed(key, JSON.stringify(problem));
|
|
259
|
+
}
|
|
249
260
|
}
|
|
250
261
|
//# sourceMappingURL=client.js.map
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EACL,eAAe,IAAI,kBAAkB,EACrC,UAAU,IAAI,aAAa,EAC3B,QAAQ,IAAI,WAAW,EACvB,UAAU,IAAI,aAAa,EAC3B,IAAI,IAAI,OAAO,EACf,SAAS,IAAI,YAAY,GAC1B,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EACL,eAAe,IAAI,kBAAkB,EACrC,UAAU,IAAI,aAAa,EAC3B,QAAQ,IAAI,WAAW,EACvB,UAAU,IAAI,aAAa,EAC3B,IAAI,IAAI,OAAO,EACf,SAAS,IAAI,YAAY,GAC1B,MAAM,uBAAuB,CAAC;AA6B/B;;;;;;;;GAQG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY;IACnC,6EAA6E;IAC7E,sEAAsE;IACtE,8EAA8E;IAC9E,6EAA6E;IAC7E,OAAO,WAAW,CAAC,IAAI,CAAe,CAAC;AACzC,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO,aAAa,EAAc,CAAC;AACrC,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,IAAI,CAAC,OAAe;IAClC,OAAO,OAAO,CAAC,OAAO,CAAoB,CAAC;AAC7C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,SAAS;IACvB,OAAO,YAAY,EAAoB,CAAC;AAC1C,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,OAAO,eAAe;IAClB,MAAM,CAAqB;IAEnC;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,kBAAkB,EAAE,CAAC;IACzC,CAAC;IAED;;;OAGG;IACH,IAAI;QACF,IAAI,CA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AAmB,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IAChE,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export type { InitInput } from './load.js';
|
|
|
29
29
|
export { tokenize, tokenKinds, FossilWorkspace, refs, providers, } from './client.js';
|
|
30
30
|
export type { FileHandle } from './client.js';
|
|
31
31
|
export { openProgram } from './program.js';
|
|
32
|
-
export type { FossilProgram, OpenProgramOptions } from './program.js';
|
|
32
|
+
export type { FossilProgram, Introspection, OpenProgramOptions } from './program.js';
|
|
33
33
|
/** One external reference a program makes — the typed lineage returned by
|
|
34
34
|
* {@link refs}. Mirrors `fossil_lineage::SourceRefInfo`. `connection` is the `@conn` alias the reference
|
|
35
35
|
* targets, or `null` for a direct URL/path; `role` is where it appears in the
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAUH,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EACL,QAAQ,EACR,UAAU,EACV,eAAe,EACf,IAAI,EACJ,SAAS,GACV,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAUH,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,YAAY,EAAE,SAAS,EAAE,MA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MgC;AAChC,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,QAAQ,CAAC;CACjB;AAED;;;;;;;;;;yCAUyC;AACzC,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,QAAQ,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAYD;;;;;;;;;GASG;AACH,MAAM,MAAM,iBAAiB,GACzB,QAAQ,GACR,SAAS,GACT,OAAO,GACP,MAAM,GACN,MAAM,GACN,WAAW,GACX,MAAM,GACN,QAAQ,GACR,SAAS,CAAC;AAEd,kDAAkD;AAClD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,iBAAiB,CAAC;CAC9B;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ,2EAA2E;IAC3E,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B;;;;;;OAMG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;AAKD,YAAY,EACV,QAAQ,EACR,IAAI,EACJ,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,aAAa,GACd,MAAM,oBAAoB,CAAC"}
|
package/dist/program.d.ts
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
|
-
import { type Host, type ProgramSource } from '@fossil-lang/types';
|
|
1
|
+
import { type Host, type Problem, type ProgramSource } from '@fossil-lang/types';
|
|
2
2
|
import { FossilWorkspace, tokenize, tokenKinds } from './client.js';
|
|
3
3
|
import type { CheckRow, CompletionRow, DefinitionRow, HoverRow, InferredDescriptorJson, SemanticTokenRow } from './index.js';
|
|
4
4
|
import { type InitInput } from './load.js';
|
|
5
|
+
/**
|
|
6
|
+
* What a host's introspection answered — `introspect`'s result in `@fossil-lang/introspect`, passed
|
|
7
|
+
* as it came back: the sources it described, and the ones it could not, each with its problem.
|
|
8
|
+
*/
|
|
9
|
+
export interface Introspection {
|
|
10
|
+
descriptors: readonly InferredDescriptorJson[];
|
|
11
|
+
undescribed: readonly {
|
|
12
|
+
source: Pick<ProgramSource, 'key'>;
|
|
13
|
+
problem: Problem;
|
|
14
|
+
}[];
|
|
15
|
+
}
|
|
5
16
|
/** What {@link openProgram} takes beside the key. */
|
|
6
17
|
export interface OpenProgramOptions {
|
|
7
18
|
/** The connection map, and the credentials a document the program names is read with. */
|
|
@@ -49,10 +60,15 @@ export interface FossilProgram {
|
|
|
49
60
|
*/
|
|
50
61
|
sources(text: string): Promise<ProgramSource[]>;
|
|
51
62
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
63
|
+
* What the host's introspection answered, whole. The compiler never introspects a source itself;
|
|
64
|
+
* push this before the check that should see it.
|
|
65
|
+
*
|
|
66
|
+
* A described source types the program under the key it was written as. A source that could not
|
|
67
|
+
* be described is a warning of {@link check}'s at the call that reads it — `io.csv("…")` — under
|
|
68
|
+
* its problem's code (`source/not-found`, `storage/*`, `engine/failed`), once per key. The latest
|
|
69
|
+
* answer about a key wins, so a source that describes on a later call loses its warning.
|
|
54
70
|
*/
|
|
55
|
-
|
|
71
|
+
registerIntrospection(introspection: Introspection): void;
|
|
56
72
|
/** The workspace underneath, for the rare question this surface does not ask. */
|
|
57
73
|
readonly workspace: FossilWorkspace;
|
|
58
74
|
/** Free the workspace. Every member fails after it. */
|
package/dist/program.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAkCA,OAAO,
|
|
1
|
+
{"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAkCA,OAAO,EAEL,KAAK,IAAI,EACT,KAAK,OAAO,EACZ,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,eAAe,EAAE,Q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AQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,aAAa,EAAE,CAAC;IACzE,2FAA2F;IAC3F,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,aAAa,EAAE,CAAC;IAC3E;;;OAGG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IAChD;;;;;;;;OAQG;IACH,qBAAqB,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IAC1D,iFAAiF;IACjF,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IACpC,uDAAuD;IACvD,KAAK,IAAI,IAAI,CAAC;CACf;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC,CA8ElG"}
|
package/dist/program.js
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
* check rather than poisoning it.
|
|
33
33
|
*/
|
|
34
34
|
import { resolveDocuments } from '@fossil-lang/storage';
|
|
35
|
-
import { until } from '@fossil-lang/types';
|
|
35
|
+
import { until, } from '@fossil-lang/types';
|
|
36
36
|
import { FossilWorkspace, tokenize, tokenKinds } from './client.js';
|
|
37
37
|
import { initFossilWasm } from './load.js';
|
|
38
38
|
/**
|
|
@@ -105,8 +105,11 @@ export async function openProgram(uri, options) {
|
|
|
105
105
|
await settle(next);
|
|
106
106
|
return workspace.sources(handle);
|
|
107
107
|
},
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
registerIntrospection({ descriptors, undescribed }) {
|
|
109
|
+
for (const descriptor of descriptors)
|
|
110
|
+
workspace.registerInferredDescriptor(descriptor);
|
|
111
|
+
for (const { source, problem } of undescribed)
|
|
112
|
+
workspace.registerUndescribed(source.key, problem);
|
|
110
113
|
},
|
|
111
114
|
workspace,
|
|
112
115
|
close() {
|
package/dist/program.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.js","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,
|
|
1
|
+
{"version":3,"file":"program.js","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,KAAK,GAKN,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AASpE,OAAO,EAAE,cAAc,EAAkB,MAAM,WAAW,CAAC;AA0E3D;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,GAAW,EAAE,OAA2B;IACxE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAClD,MAAM,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;IAE1C,MAAM,SAAS,GAAG,IAAI,eAAe,EAAE,CAAC;IACxC,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC7C,IAAI,MAAM,GAAG,IAAI,CAAC;IAElB,MAAM,IAAI,GAAG,CAAC,IAAY,EAAQ,EAAE;QAClC,IAAI,IAAI,KAAK,MAAM;YAAE,OAAO;QAC5B,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACnC,MAAM,GAAG,IAAI,CAAC;IAChB,CAAC,CAAC;IACF,gGAA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,CAAC;QACpG,CAAC;QACD,SAAS;QACT,KAAK;YACH,SAAS,CAAC,IAAI,EAAE,CAAC;QACnB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fossil-lang/wasm",
|
|
3
|
-
"version": "0.3.0-alpha.
|
|
3
|
+
"version": "0.3.0-alpha.23",
|
|
4
4
|
"description": "JS/TS wrapper around the fossil-wasm wasm-bindgen artifacts (--target web). Exposes initFossilWasm + tokenize + openProgram + FossilWorkspace class for downstream @fossil-lang/* packages.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
],
|
|
34
34
|
"sideEffects": false,
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fossil-lang/
|
|
37
|
-
"@fossil-lang/
|
|
36
|
+
"@fossil-lang/types": "0.3.0-alpha.23",
|
|
37
|
+
"@fossil-lang/storage": "0.3.0-alpha.23"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"typescript": "^5.6.0",
|
package/pkg/fossil_wasm.d.ts
CHANGED
|
@@ -207,6 +207,8 @@ export class FossilWorkspace {
|
|
|
207
207
|
*
|
|
208
208
|
* Registering the same URI twice REPLACES the previous descriptor
|
|
209
209
|
* — intentional, since the host re-introspects when the source changes.
|
|
210
|
+
* It also forgets a problem [`Self::register_undescribed`] recorded under
|
|
211
|
+
* that URI: the latest answer about a source is the one `check` reports.
|
|
210
212
|
*
|
|
211
213
|
* # Errors
|
|
212
214
|
*
|
|
@@ -215,6 +217,23 @@ export class FossilWorkspace {
|
|
|
215
217
|
* - The workspace is busy.
|
|
216
218
|
*/
|
|
217
219
|
registerInferredDescriptor(descriptor_json: string): void;
|
|
220
|
+
/**
|
|
221
|
+
* Record that the host could not describe the source the program wrote as
|
|
222
|
+
* `key`, and why: `problem_json` is the `Problem` its introspection
|
|
223
|
+
* answered (`{ code, data, help?, … }`; the fields the code does not carry
|
|
224
|
+
* are ignored).
|
|
225
|
+
*
|
|
226
|
+
* `check` then reports it at the binding that reads `key` — one warning
|
|
227
|
+
* per key, under the problem's own code — until a descriptor is registered
|
|
228
|
+
* under the same key, which forgets it. Registering a key twice replaces
|
|
229
|
+
* the problem.
|
|
230
|
+
*
|
|
231
|
+
* # Errors
|
|
232
|
+
*
|
|
233
|
+
* - `problem_json` is not a `Problem` fossil knows → `api/invalid-argument`.
|
|
234
|
+
* - The workspace is busy.
|
|
235
|
+
*/
|
|
236
|
+
registerUndescribed(key: string, problem_json: string): void;
|
|
218
237
|
/**
|
|
219
238
|
* Every classified span of the file: `{ range, kind, modifiers }` rows in
|
|
220
239
|
* source order, `kind` and `modifiers` by legend NAME. An editor lays these
|
|
@@ -347,6 +366,7 @@ export interface InitOutput {
|
|
|
347
366
|
readonly fossilworkspace_gotoDefinition: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
348
367
|
readonly fossilworkspace_semanticTokens: (a: number, b: number) => [number, number, number];
|
|
349
368
|
readonly fossilworkspace_registerInferredDescriptor: (a: number, b: number, c: number) => [number, number];
|
|
369
|
+
readonly fossilworkspace_registerUndescribed: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
350
370
|
readonly providers: () => [number, number, number];
|
|
351
371
|
readonly refs: (a: number, b: number) => [number, number, number];
|
|
352
372
|
readonly __wbindgen_malloc_command_export: (a: number, b: number) => number;
|
package/pkg/fossil_wasm.js
CHANGED
|
@@ -322,6 +322,8 @@ export class FossilWorkspace {
|
|
|
322
322
|
*
|
|
323
323
|
* Registering the same URI twice REPLACES the previous descriptor
|
|
324
324
|
* — intentional, since the host re-introspects when the source changes.
|
|
325
|
+
* It also forgets a problem [`Self::register_undescribed`] recorded under
|
|
326
|
+
* that URI: the latest answer about a source is the one `check` reports.
|
|
325
327
|
*
|
|
326
328
|
* # Errors
|
|
327
329
|
*
|
|
@@ -338,6 +340,34 @@ export class FossilWorkspace {
|
|
|
338
340
|
throw takeFromExternrefTable0(ret[0]);
|
|
339
341
|
}
|
|
340
342
|
}
|
|
343
|
+
/**
|
|
344
|
+
* Record that the host could not describe the source the program wrote as
|
|
345
|
+
* `key`, and why: `problem_json` is the `Problem` its introspection
|
|
346
|
+
* answered (`{ code, data, help?, … }`; the fields the code does not carry
|
|
347
|
+
* are ignored).
|
|
348
|
+
*
|
|
349
|
+
* `check` then reports it at the binding that reads `key` — one warning
|
|
350
|
+
* per key, under the problem's own code — until a descriptor is registered
|
|
351
|
+
* under the same key, which forgets it. Registering a key twice replaces
|
|
352
|
+
* the problem.
|
|
353
|
+
*
|
|
354
|
+
* # Errors
|
|
355
|
+
*
|
|
356
|
+
* - `problem_json` is not a `Problem` fossil knows → `api/invalid-argument`.
|
|
357
|
+
* - The workspace is busy.
|
|
358
|
+
* @param {string} key
|
|
359
|
+
* @param {string} problem_json
|
|
360
|
+
*/
|
|
361
|
+
registerUndescribed(key, problem_json) {
|
|
362
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
|
|
363
|
+
const len0 = WASM_VECTOR_LEN;
|
|
364
|
+
const ptr1 = passStringToWasm0(problem_json, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
|
|
365
|
+
const len1 = WASM_VECTOR_LEN;
|
|
366
|
+
const ret = wasm.fossilworkspace_registerUndescribed(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
367
|
+
if (ret[1]) {
|
|
368
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
341
371
|
/**
|
|
342
372
|
* Every classified span of the file: `{ range, kind, modifiers }` rows in
|
|
343
373
|
* source order, `kind` and `modifiers` by legend NAME. An editor lays these
|
package/pkg/fossil_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -20,6 +20,7 @@ export const fossilworkspace_completions: (a: number, b: number, c: number, d: n
|
|
|
20
20
|
export const fossilworkspace_gotoDefinition: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
21
21
|
export const fossilworkspace_semanticTokens: (a: number, b: number) => [number, number, number];
|
|
22
22
|
export const fossilworkspace_registerInferredDescriptor: (a: number, b: number, c: number) => [number, number];
|
|
23
|
+
export const fossilworkspace_registerUndescribed: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
23
24
|
export const providers: () => [number, number, number];
|
|
24
25
|
export const refs: (a: number, b: number) => [number, number, number];
|
|
25
26
|
export const __wbindgen_malloc_command_export: (a: number, b: number) => number;
|