@fossil-lang/wasm 0.3.0-alpha.17 → 0.3.0-alpha.19

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 CHANGED
@@ -4,7 +4,8 @@ JS/TS wrapper around the `fossil-wasm` Rust crate's wasm-bindgen artefacts. Prov
4
4
 
5
5
  - `openProgram(uri, { host, text })` — one program open for an editor, and the
6
6
  call a host with an editor makes. See below.
7
- - `initFossilWasm()` — boots the module (memoised). Its `.wasm` ships in this
7
+ - `initFossilWasm()` — boots the module, within 60 s (`module/unreachable` when it
8
+ cannot be fetched); a boot that failed is forgotten, so the next call tries again. Its `.wasm` ships in this
8
9
  package and the host's bundler emits it as an asset; the host copies nothing.
9
10
  - `tokenize(text)` — calls the Rust lexer, returns `TokenRow[]`. The Rust lexer
10
11
  is the only lexer: no host reimplements one and drifts from the grammar.
package/dist/client.d.ts CHANGED
@@ -200,7 +200,8 @@ export declare class FossilWorkspace {
200
200
  * so a host that wants column types must run the `DESCRIBE` and push the
201
201
  * result in here.
202
202
  *
203
- * @throws Error if the descriptor JSON fails to deserialise on the Rust side.
203
+ * @throws {FossilError} `api/invalid-argument` if the descriptor fails to deserialise on the Rust
204
+ * side, the `serde_json` error as its cause.
204
205
  */
205
206
  registerInferredDescriptor(descriptor: InferredDescriptorJson): void;
206
207
  }
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAEL,UAAU,IAAI,aAAa,EAM5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,QAAQ,EACT,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,QAAQ,EACR,aAAa,EACb,aAAa,EACb,QAAQ,EACR,sBAAsB,EACtB,aAAa,EACb,YAAY,EAC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AS,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;;;;;;;;;;;;OAYG;IACH,0BAA0B,CAAC,UAAU,EAAE,sBAAsB,GAAG,IAAI;CAKrE"}
package/dist/client.js CHANGED
@@ -240,7 +240,8 @@ export class FossilWorkspace {
240
240
  * so a host that wants column types must run the `DESCRIBE` and push the
241
241
  * result in here.
242
242
  *
243
- * @throws Error if the descriptor JSON fails to deserialise on the Rust side.
243
+ * @throws {FossilError} `api/invalid-argument` if the descriptor fails to deserialise on the Rust
244
+ * side, the `serde_json` error as its cause.
244
245
  */
245
246
  registerInferredDescriptor(descriptor) {
246
247
  // The wasm-bindgen wrapper accepts a JSON string; serialise here so callers
@@ -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,eAAe,IAAI,iBAAiB,EACpC,UAAU,IAAI,aAAa,EAC3B,IAAI,IAAI,OAAO,EACf,SAAS,IAAI,YAAY,GAC1B,MAAM,uBAAuB,CAAC;AA4B/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;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,iBAAiB,EAA0B,CAAC;AACrD,CAAC;AAED;;;;;;;;;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;;OAGG;IACH,KAAK;QACH,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,EAAgB,CAAC;IAC3C,CAAC;IAED;;OAEG;IACH,cAAc,CAAC,MAAkB;QAC/B,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAe,CAAC;IAC3D,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,MAAkB,EAAE,IAAY,EAAE,SAAiB;QACvD,yEAAyE;QACzE,kDAAkD;QAClD,OAAQ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,CAAiC,IAAI,IAAI,CAAC;IAC7F,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,MAAkB,EAAE,IAAY,EAAE,SAAiB;QAC7D,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,CAAoB,CAAC;IAC7E,CAAC;IAED;;;;;;;OAOG;IACH,cAAc,CAAC,MAAkB,EAAE,IAAY,EAAE,SAAiB;QAChE,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,CAAoB,CAAC;IAChF,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,0BAA0B,CAAC,UAAkC;QAC3D,4EAA4E;QAC5E,uBAAuB;QACvB,IAAI,CAAC,MAAM,CAAC,0BAA0B,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;IACrE,CAAC;CACF"}
package/dist/index.d.ts CHANGED
@@ -3,7 +3,8 @@
3
3
  *
4
4
  * Public API (one of the @fossil-lang/* packages; `git ls-files packages` is
5
5
  * the list):
6
- * - {@link initFossilWasm} — boots the module; its `.wasm` is a bundler asset (memoised).
6
+ * - {@link initFossilWasm} — boots the module; its `.wasm` is a bundler asset. A failed boot is
7
+ * forgotten, so the next call tries again.
7
8
  * - {@link tokenize} — calls the Rust lexer, returns TokenRow[].
8
9
  * - {@link tokenKinds} — the legend for TokenRow.kind: variant names by index.
9
10
  * - {@link semanticLegend} — returns the LSP SemanticTokensLegend.
@@ -47,17 +48,9 @@ export interface ProviderInfo {
47
48
  extensions: string[];
48
49
  kind: 'schema' | 'data' | 'both';
49
50
  }
50
- /** Diagnostic row returned by {@link FossilWorkspace.check} and
51
- * {@link FossilWorkspace.diagnosticsFor} — mirrors `fossil-wasm`'s
52
- * `CheckRow` JSON shape (the LSP `Diagnostic` projected through
53
- * `fossil_ide::LineIndex` for UTF-16 ranges).
54
- */
55
- export interface CheckRow {
56
- uri: string;
57
- range: LspRange;
58
- severity: number;
59
- message: string;
60
- }
51
+ /** The rows {@link FossilWorkspace.check} and {@link FossilWorkspace.diagnosticsFor} return —
52
+ * defined in `@fossil-lang/types`, beside the `Code` and `ProblemData` that type them. */
53
+ export type { CheckRow, CheckRelated } from '@fossil-lang/types';
61
54
  /** An LSP range: zero-based lines, `character` in UTF-16 code units — the units
62
55
  * a JavaScript string is indexed in, so no byte arithmetic converts it. (The
63
56
  * lexer's {@link TokenRow} offsets are the other thing: those ARE bytes.) */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAQH,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EACL,QAAQ,EACR,UAAU,EACV,cAAc,EACd,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;AAEtE;;;4EAG4E;AAC5E,MAAM,WAAW,aAA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,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -3,7 +3,8 @@
3
3
  *
4
4
  * Public API (one of the @fossil-lang/* packages; `git ls-files packages` is
5
5
  * the list):
6
- * - {@link initFossilWasm} — boots the module; its `.wasm` is a bundler asset (memoised).
6
+ * - {@link initFossilWasm} — boots the module; its `.wasm` is a bundler asset. A failed boot is
7
+ * forgotten, so the next call tries again.
7
8
  * - {@link tokenize} — calls the Rust lexer, returns TokenRow[].
8
9
  * - {@link tokenKinds} — the legend for TokenRow.kind: variant names by index.
9
10
  * - {@link semanticLegend} — returns the LSP SemanticTokensLegend.
@@ -24,12 +25,6 @@
24
25
  * const program = await openProgram('job.fossil', { host, text });
25
26
  * const extensions = fossil({ ...program, onNavigate });
26
27
  */
27
- // The wasm-bindgen glue (`../pkg/fossil_wasm.js`) is imported ONLY from leaf
28
- // modules — `load.ts` (init) and `client.ts` (the lexer / LSP / Workspace API) —
29
- // never here in the entry. See `client.ts`: importing the stateful glue from the
30
- // package entry lets a `sideEffects:false` bundler duplicate it, splitting
31
- // `init()`'s wasm instance from the one the functions use (the crash the
32
- // codemirror tokenizer hit on the main thread). This entry only re-exports.
33
28
  export { initFossilWasm } from './load.js';
34
29
  export { tokenize, tokenKinds, semanticLegend, FossilWorkspace, refs, providers, } from './client.js';
35
30
  export { openProgram } from './program.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,6EAA6E;AAC7E,iFAAiF;AACjF,iFAAiF;AACjF,2EAA2E;AAC3E,yEAAyE;AACzE,4EAA4E;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C,OAAO,EACL,QAAQ,EACR,UAAU,EACV,cAAc,EACd,eAAe,EACf,IAAI,EACJ,SAAS,GACV,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAUH,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C,OAAO,EACL,QAAQ,EACR,UAAU,EACV,cAAc,EACd,eAAe,EACf,IAAI,EACJ,SAAS,GACV,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
package/dist/load.d.ts CHANGED
@@ -3,7 +3,9 @@ export type { InitInput };
3
3
  /**
4
4
  * Boot the fossil-wasm module. MUST be awaited before calling any of
5
5
  * {@link tokenize}, {@link semanticLegend}, or instantiating
6
- * {@link FossilWorkspace}. Memoised — subsequent calls return the same promise.
6
+ * {@link FossilWorkspace}. A boot that succeeded is kept; one that failed is
7
+ * not, so the next call tries again — `module/unreachable` for a module that could not be
8
+ * fetched within 60 s, `internal/bug` for one that would not instantiate.
7
9
  *
8
10
  * **Called with nothing, the module finds its own `.wasm`.** The glue resolves
9
11
  * `new URL('fossil_wasm_bg.wasm', import.meta.url)`, which is the pattern Vite,
@@ -1 +1 @@
1
- {"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,YAAY,EAAE,SAAS,EAAE,CAAC;AAI1B;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,CAMjE;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAEtC"}
1
+ {"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../src/load.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAIvD,YAAY,EAAE,SAAS,EAAE,CAAC;AAI1B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,CAUjE;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAEtC"}
package/dist/load.js CHANGED
@@ -2,11 +2,14 @@
2
2
  // It is gitignored (repo .gitignore `packages/wasm/pkg/`) but always present at build time and in
3
3
  // the published tarball. Its `.d.ts` is consumed via the file's `/* @ts-self-types */` pragma.
4
4
  import init from '../pkg/fossil_wasm.js';
5
+ import { boot } from '@fossil-lang/types';
5
6
  let _initPromise = null;
6
7
  /**
7
8
  * Boot the fossil-wasm module. MUST be awaited before calling any of
8
9
  * {@link tokenize}, {@link semanticLegend}, or instantiating
9
- * {@link FossilWorkspace}. Memoised — subsequent calls return the same promise.
10
+ * {@link FossilWorkspace}. A boot that succeeded is kept; one that failed is
11
+ * not, so the next call tries again — `module/unreachable` for a module that could not be
12
+ * fetched within 60 s, `internal/bug` for one that would not instantiate.
10
13
  *
11
14
  * **Called with nothing, the module finds its own `.wasm`.** The glue resolves
12
15
  * `new URL('fossil_wasm_bg.wasm', import.meta.url)`, which is the pattern Vite,
@@ -17,9 +20,14 @@ let _initPromise = null;
17
20
  * `file://`, hands the bytes (`BufferSource`) or a `Response`.
18
21
  */
19
22
  export function initFossilWasm(wasm) {
20
- if (!_initPromise) {
23
+ if (_initPromise === null) {
21
24
  // The object form: the positional one still works but logs a deprecation warning.
22
- _initPromise = init(wasm === undefined ? undefined : { module_or_path: wasm });
25
+ const pending = boot('fossil_wasm_bg.wasm', () => init(wasm === undefined ? undefined : { module_or_path: wasm }));
26
+ _initPromise = pending;
27
+ pending.catch(() => {
28
+ if (_initPromise === pending)
29
+ _initPromise = null; // forgotten, so the next call boots again
30
+ });
23
31
  }
24
32
  return _initPromise;
25
33
  }
package/dist/load.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"load.js","sourceRoot":"","sources":["../src/load.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C;IACL,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC7B,YAAY,GAAG,IAAI,CAAC;AACtB,CAAC"}
package/dist/program.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Host, ProgramSource } from '@fossil-lang/types';
1
+ import { type Host, type ProgramSource } from '@fossil-lang/types';
2
2
  import { FossilWorkspace, tokenize, tokenKinds } from './client.js';
3
3
  import type { CheckRow, CompletionRow, DefinitionRow, HoverRow, InferredDescriptorJson } from './index.js';
4
4
  import { type InitInput } from './load.js';
@@ -10,6 +10,8 @@ export interface OpenProgramOptions {
10
10
  text?: string;
11
11
  /** The module's `.wasm`, for a host with no bundler — see {@link initFossilWasm}. */
12
12
  wasm?: InitInput;
13
+ /** Stops the open — the boot and the first read of the documents — rejecting with its reason. */
14
+ signal?: AbortSignal;
13
15
  }
14
16
  /**
15
17
  * A program open in its own workspace. Every member that answers about the program takes the
@@ -26,6 +28,10 @@ export interface FossilProgram {
26
28
  * Push the text, read every document it names that the workspace lacks, and check. No debounce:
27
29
  * `fossil()`'s linter waits out its own delay AND waits for this to return before it schedules
28
30
  * again, which is what an LSP client does with `didChange`.
31
+ *
32
+ * A document that could not be read is a row of its own at the top of the program, under the code
33
+ * of its read — `storage/host-silent`, `storage/unreachable`, … — beside the checker's rows, which
34
+ * see it only as missing.
29
35
  */
30
36
  check(text: string): Promise<CheckRow[]>;
31
37
  /** The type under the cursor, and the type the target shape demands of it — or `null`. */
@@ -52,8 +58,8 @@ export interface FossilProgram {
52
58
  /**
53
59
  * Boot the module, open `uri` in a fresh workspace, and read the documents its text names.
54
60
  *
55
- * One call and the answer goes straight into `fossil()`. The boot is memoised, so a second program
56
- * in the same tab costs a workspace and nothing else.
61
+ * One call and the answer goes straight into `fossil()`. A boot that succeeded is kept, so a second
62
+ * program in the same tab costs a workspace and nothing else.
57
63
  */
58
64
  export declare function openProgram(uri: string, options: OpenProgramOptions): Promise<Fossil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E,OAAO,QAAQ,CAAC;IACnC,uCAAuC;IACvC,QAAQ,CAAC,UAAU,EAAE,OAAO,UAAU,CAAC;IACvC;;;;;;;;OAQG;IACH,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IACzC,0FAA0F;IAC1F,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC;IACtE,qEAAqE;IACrE,QAAQ,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;;;OAGG;IACH,kBAAkB,CAAC,UAAU,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC7D,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,CAyElG"}
package/dist/program.js CHANGED
@@ -32,17 +32,18 @@
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
36
  import { FossilWorkspace, tokenize, tokenKinds } from './client.js';
36
37
  import { initFossilWasm } from './load.js';
37
38
  /**
38
39
  * Boot the module, open `uri` in a fresh workspace, and read the documents its text names.
39
40
  *
40
- * One call and the answer goes straight into `fossil()`. The boot is memoised, so a second program
41
- * in the same tab costs a workspace and nothing else.
41
+ * One call and the answer goes straight into `fossil()`. A boot that succeeded is kept, so a second
42
+ * program in the same tab costs a workspace and nothing else.
42
43
  */
43
44
  export async function openProgram(uri, options) {
44
- const { host, text = '', wasm } = options;
45
- await initFossilWasm(wasm);
45
+ const { host, text = '', wasm, signal } = options;
46
+ await until(initFossilWasm(wasm), signal);
46
47
  const workspace = new FossilWorkspace();
47
48
  const handle = workspace.openFile(uri, text);
48
49
  let pushed = text;
@@ -52,18 +53,37 @@ export async function openProgram(uri, options) {
52
53
  workspace.updateFile(handle, next);
53
54
  pushed = next;
54
55
  };
55
- const settle = async (next) => {
56
+ // What the last read of the documents could not read; every settle reads what is missing again.
57
+ let unread = [];
58
+ const settle = async (next, stop) => {
56
59
  sync(next);
57
- await resolveDocuments(workspace.workspace(handle), host);
60
+ ({ unread } = await resolveDocuments(workspace.workspace(handle), host, { signal: stop }));
58
61
  };
59
- await settle(text);
62
+ try {
63
+ await settle(text, signal);
64
+ }
65
+ catch (cause) {
66
+ workspace.free();
67
+ throw cause;
68
+ }
60
69
  return {
61
70
  uri,
62
71
  tokenize,
63
72
  tokenKinds,
64
73
  async check(next) {
65
74
  await settle(next);
66
- return workspace.check();
75
+ const rows = workspace.check();
76
+ const failed = unread.map(({ key, problem }) => ({
77
+ uri,
78
+ range: { start: { line: 0, character: 0 }, end: { line: 0, character: 0 } },
79
+ severity: 1,
80
+ code: problem.code,
81
+ data: problem.data,
82
+ title: problem.title,
83
+ message: `${key}: ${problem.detail}`,
84
+ ...(problem.help === undefined ? {} : { help: problem.help }),
85
+ }));
86
+ return [...failed, ...rows];
67
87
  },
68
88
  hover(next, line, character) {
69
89
  sync(next);
@@ -1 +1 @@
1
- {"version":3,"file":"program.js","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,gBAAgB,EAAE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M,CAAC,IAAI,CAAC,CAAC;YACnB,OAAO,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACnC,CAAC;QACD,kBAAkB,CAAC,UAAU;YAC3B,SAAS,CAAC,0BAA0B,CAAC,UAAU,CAAC,CAAC;QACnD,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.17",
3
+ "version": "0.3.0-alpha.19",
4
4
  "description": "JS/TS wrapper around the fossil-wasm wasm-bindgen artifacts (--target web). Exposes initFossilWasm + tokenize + semanticLegend + 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/storage": "0.3.0-alpha.17",
37
- "@fossil-lang/types": "0.3.0-alpha.17"
36
+ "@fossil-lang/storage": "0.3.0-alpha.19",
37
+ "@fossil-lang/types": "0.3.0-alpha.19"
38
38
  },
39
39
  "devDependencies": {
40
40
  "typescript": "^5.6.0",
@@ -69,9 +69,8 @@ export class FossilWorkspace {
69
69
  [Symbol.dispose](): void;
70
70
  /**
71
71
  * Every open **program**'s diagnostics as a flat JS array of
72
- * `{ uri, range, severity, message }` rows keyed by file URI — the
73
- * diagnostics panel's view. It is NOT the LSP wire's shape; see
74
- * [`CheckRow`].
72
+ * [`CheckRow`]s keyed by file URI — the diagnostics panel's view. It is
73
+ * NOT the LSP wire's shape; see [`CheckRow`].
75
74
  *
76
75
  * A buffer the installed provider catalogue claims — a `.shex` being
77
76
  * edited, a `.csv`, a `.parquet` — is an INPUT and is not parsed as fossil.
@@ -80,9 +79,8 @@ export class FossilWorkspace {
80
79
  *
81
80
  * `range` is the UTF-16 LSP range (via `fossil_ide::LineIndex` — the
82
81
  * rust-analyzer model). `severity` is the LSP integer constant
83
- * (1 = error, 2 = warning, 3 = info). `message` carries any
84
- * `suggestion_source` as a `\nhelp: ...` suffix. All three come from
85
- * [`fossil_ide::lsp_diagnostic`], the rendering an editor is shown.
82
+ * (1 = error, 2 = warning, 3 = info). `message` is the problem rendered
83
+ * and nothing else; `help` is its own field.
86
84
  *
87
85
  * # Errors
88
86
  *
@@ -90,9 +90,8 @@ export class FossilWorkspace {
90
90
  }
91
91
  /**
92
92
  * Every open **program**'s diagnostics as a flat JS array of
93
- * `{ uri, range, severity, message }` rows keyed by file URI — the
94
- * diagnostics panel's view. It is NOT the LSP wire's shape; see
95
- * [`CheckRow`].
93
+ * [`CheckRow`]s keyed by file URI — the diagnostics panel's view. It is
94
+ * NOT the LSP wire's shape; see [`CheckRow`].
96
95
  *
97
96
  * A buffer the installed provider catalogue claims — a `.shex` being
98
97
  * edited, a `.csv`, a `.parquet` — is an INPUT and is not parsed as fossil.
@@ -101,9 +100,8 @@ export class FossilWorkspace {
101
100
  *
102
101
  * `range` is the UTF-16 LSP range (via `fossil_ide::LineIndex` — the
103
102
  * rust-analyzer model). `severity` is the LSP integer constant
104
- * (1 = error, 2 = warning, 3 = info). `message` carries any
105
- * `suggestion_source` as a `\nhelp: ...` suffix. All three come from
106
- * [`fossil_ide::lsp_diagnostic`], the rendering an editor is shown.
103
+ * (1 = error, 2 = warning, 3 = info). `message` is the problem rendered
104
+ * and nothing else; `help` is its own field.
107
105
  *
108
106
  * # Errors
109
107
  *
@@ -528,13 +526,6 @@ function __wbg_get_imports() {
528
526
  const ret = Error(getStringFromWasm0(arg0, arg1));
529
527
  return ret;
530
528
  },
531
- __wbg_String_8564e559799eccda: function(arg0, arg1) {
532
- const ret = String(arg1);
533
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
534
- const len1 = WASM_VECTOR_LEN;
535
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
536
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
537
- },
538
529
  __wbg___wbindgen_boolean_get_c3dd5c39f1b5a12b: function(arg0) {
539
530
  const v = arg0;
540
531
  const ret = typeof(v) === 'boolean' ? v : undefined;
@@ -556,6 +547,14 @@ function __wbg_get_imports() {
556
547
  const ret = typeof(val) === 'object' && val !== null;
557
548
  return ret;
558
549
  },
550
+ __wbg___wbindgen_is_string_eddc07a3efad52e6: function(arg0) {
551
+ const ret = typeof(arg0) === 'string';
552
+ return ret;
553
+ },
554
+ __wbg___wbindgen_is_undefined_244a92c34d3b6ec0: function(arg0) {
555
+ const ret = arg0 === undefined;
556
+ return ret;
557
+ },
559
558
  __wbg___wbindgen_jsval_loose_eq_1978f1e77b4bce62: function(arg0, arg1) {
560
559
  const ret = arg0 == arg1;
561
560
  return ret;
@@ -603,6 +602,10 @@ function __wbg_get_imports() {
603
602
  __wbg_getRandomValues_3f44b700395062e5: function() { return handleError(function (arg0, arg1) {
604
603
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
605
604
  }, arguments); },
605
+ __wbg_get_41476db20fef99a8: function() { return handleError(function (arg0, arg1) {
606
+ const ret = Reflect.get(arg0, arg1);
607
+ return ret;
608
+ }, arguments); },
606
609
  __wbg_get_652f640b3b0b6e3e: function(arg0, arg1) {
607
610
  const ret = arg0[arg1 >>> 0];
608
611
  return ret;
@@ -625,6 +628,16 @@ function __wbg_get_imports() {
625
628
  const ret = result;
626
629
  return ret;
627
630
  },
631
+ __wbg_instanceof_Error_5e21755e9d9cbee5: function(arg0) {
632
+ let result;
633
+ try {
634
+ result = arg0 instanceof Error;
635
+ } catch (_) {
636
+ result = false;
637
+ }
638
+ const ret = result;
639
+ return ret;
640
+ },
628
641
  __wbg_instanceof_Uint8Array_57d77acd50e4c44d: function(arg0) {
629
642
  let result;
630
643
  try {
@@ -647,6 +660,14 @@ function __wbg_get_imports() {
647
660
  const ret = arg0.length;
648
661
  return ret;
649
662
  },
663
+ __wbg_message_d5628ca19de920d3: function(arg0) {
664
+ const ret = arg0.message;
665
+ return ret;
666
+ },
667
+ __wbg_name_bf92195f4668ab6e: function(arg0) {
668
+ const ret = arg0.name;
669
+ return ret;
670
+ },
650
671
  __wbg_new_227d7c05414eb861: function() {
651
672
  const ret = new Error();
652
673
  return ret;
@@ -663,6 +684,10 @@ function __wbg_get_imports() {
663
684
  const ret = new Uint8Array(arg0);
664
685
  return ret;
665
686
  },
687
+ __wbg_new_c9ea13ea803a692e: function(arg0, arg1) {
688
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
689
+ return ret;
690
+ },
666
691
  __wbg_next_261c3c48c6e309a5: function(arg0) {
667
692
  const ret = arg0.next;
668
693
  return ret;
@@ -671,15 +696,26 @@ function __wbg_get_imports() {
671
696
  const ret = arg0.next();
672
697
  return ret;
673
698
  }, arguments); },
699
+ __wbg_parse_342d5616e14beccc: function() { return handleError(function (arg0, arg1) {
700
+ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
701
+ return ret;
702
+ }, arguments); },
674
703
  __wbg_prototypesetcall_fd4050e806e1d519: function(arg0, arg1, arg2) {
675
704
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
676
705
  },
706
+ __wbg_set_5337f8ac82364a3f: function() { return handleError(function (arg0, arg1, arg2) {
707
+ const ret = Reflect.set(arg0, arg1, arg2);
708
+ return ret;
709
+ }, arguments); },
677
710
  __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
678
711
  arg0[arg1] = arg2;
679
712
  },
680
713
  __wbg_set_f614f6a0608d1d1d: function(arg0, arg1, arg2) {
681
714
  arg0[arg1 >>> 0] = arg2;
682
715
  },
716
+ __wbg_set_name_76644e7964825fa3: function(arg0, arg1, arg2) {
717
+ arg0.name = getStringFromWasm0(arg1, arg2);
718
+ },
683
719
  __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
684
720
  const ret = arg1.stack;
685
721
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
Binary file