@elaraai/east 1.0.82 → 1.0.83
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/dist/src/compile/runtime.d.ts +4 -1
- package/dist/src/compile/runtime.d.ts.map +1 -1
- package/dist/src/compile/runtime.js +5 -2
- package/dist/src/compile/runtime.js.map +1 -1
- package/dist/src/runner_protocol.d.ts +25 -1
- package/dist/src/runner_protocol.d.ts.map +1 -1
- package/dist/src/runner_protocol.js +25 -1
- package/dist/src/runner_protocol.js.map +1 -1
- package/package.json +1 -1
|
@@ -37,7 +37,10 @@ export declare const CALL_DEPTH_MESSAGE = "call stack exhausted: East calls nest
|
|
|
37
37
|
* call's location, which a program can catch; anything else is thrown as it
|
|
38
38
|
* is. Converting where the overflow is caught may itself overflow — the new
|
|
39
39
|
* `RangeError` then reaches the next call site out, which tries again with
|
|
40
|
-
* more stack.
|
|
40
|
+
* more stack. So the conversion runs nothing that fails otherwise there: the
|
|
41
|
+
* message is searched as a string, never by a regular expression, which V8
|
|
42
|
+
* compiles the first time it runs and which, compiled with no stack left,
|
|
43
|
+
* throws a `SyntaxError` no call site converts. */
|
|
41
44
|
export declare function callDepthErrorAt(e: unknown, loc_id: bigint, source_map: SourceMap | null): unknown;
|
|
42
45
|
/** @internal Track iteration locks to prevent concurrent modification */
|
|
43
46
|
export declare const iterationLocks: WeakMap<any, number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/compile/runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,KAAK,EAAY,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,EAAE,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,uEAAuE;AACvE,qBAAa,cAAc;IACN,KAAK,EAAE,MAAM;gBAAb,KAAK,EAAE,MAAM;CACjC;AAED,2GAA2G;AAC3G,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,GAAG,IAAI,EAAE,UAAU,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,CAiBpI;AAED;;;yBAGyB;AACzB,wBAAgB,eAAe,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,GAAG,IAAI,GAAG,OAAO,CAIjG;AAED;yDACyD;AACzD,MAAM,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,GAAG,IAAI,EAAE,WAAW,EAAE,gBAAgB,EAAE,EAAE,GAAG,SAAS,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAE/J,0CAA0C;AAC1C,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,CAAC"}
|
|
@@ -35,9 +35,12 @@ export const CALL_DEPTH_MESSAGE = "call stack exhausted: East calls nested too d
|
|
|
35
35
|
* call's location, which a program can catch; anything else is thrown as it
|
|
36
36
|
* is. Converting where the overflow is caught may itself overflow — the new
|
|
37
37
|
* `RangeError` then reaches the next call site out, which tries again with
|
|
38
|
-
* more stack.
|
|
38
|
+
* more stack. So the conversion runs nothing that fails otherwise there: the
|
|
39
|
+
* message is searched as a string, never by a regular expression, which V8
|
|
40
|
+
* compiles the first time it runs and which, compiled with no stack left,
|
|
41
|
+
* throws a `SyntaxError` no call site converts. */
|
|
39
42
|
export function callDepthErrorAt(e, loc_id, source_map) {
|
|
40
|
-
return e instanceof RangeError &&
|
|
43
|
+
return e instanceof RangeError && e.message.toLowerCase().includes("call stack")
|
|
41
44
|
? new EastError(CALL_DEPTH_MESSAGE, { location: (source_map?.resolve(loc_id) ?? []) })
|
|
42
45
|
: e;
|
|
43
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../../src/compile/runtime.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGtE,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAsB,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE3E;;6DAE6D;AAE7D,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,iBAAiB,CAAoC,CAAC;AAE7F,6EAA6E;AAC7E,0EAA0E;AAC1E,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAkBtG,oEAAoE;AACpE,MAAM,UAAU,cAAc,CAAC,QAAiD;IAC9E,OAAO,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC,QAAQ,CAAC;AAC/C,CAAC;AAED,6DAA6D;AAC7D,MAAM,UAAU,eAAe,CAAC,GAAmB,EAAE,IAAY;IAC/D,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;IACxB,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,aAAa,CAAC,aAAa,IAAI,gCAAgC,CAAC,CAAC;IAC7E,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,gFAAgF;AAEhF;;+CAE+C;AAC/C,MAAM,CAAC,MAAM,cAAc,GAAG,uEAAuE,CAAC;AAEtG;;2EAE2E;AAC3E,MAAM,CAAC,MAAM,kBAAkB,GAAG,oDAAoD,CAAC;AAEv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AA2G;AAC3G,MAAM,UAAU,aAAa,CAAC,MAAc,EAAE,UAA4B,EAAE,UAAmC,EAAE,GAAG,IAAW;IAC7H,IAAI,CAAC;QACH,OAAO,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC;IAC7B,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QACpB,IAAI,CAAC,YAAY,eAAe,EAAE,CAAC;YACjC,OAAO,CAAC,CAAC,KAAK,CAAC;QACjB,CAAC;aAAM,IAAI,CAAC,YAAY,SAAS,EAAE,CAAC;YAClC,uEAAuE;YACvE,MAAK,CAAC,CAAC,CAAC,CAAC;QACX,CAAC;aAAM,IAAI,CAAC,YAAY,iBAAiB,EAAE,CAAC;YAC1C,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC,KAAK,cAAc,MAAM,EAAE,CAAC,CAAA;QACjF,CAAC;aAAM,IAAI,CAAC,YAAY,cAAc,EAAE,CAAC;YACvC,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC,KAAK,cAAc,MAAM,EAAE,CAAC,CAAA;QAC9E,CAAC;aAAM,CAAC;YACN,MAAM,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;yBAGyB;AACzB,MAAM,UAAU,eAAe,CAAC,CAAU,EAAE,MAAc,EAAE,UAA4B;IACtF,OAAO,CAAC,YAAY,aAAa;QAC/B,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAe,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;QACrG,CAAC,CAAC,CAAC,CAAC;AACR,CAAC"}
|
|
@@ -20,8 +20,27 @@
|
|
|
20
20
|
* The types live here, beside the collection layer, because every runner and
|
|
21
21
|
* the platform that schedules them read them; east-c declares the same types
|
|
22
22
|
* in C, and the conformance corpus pins that all three runners agree.
|
|
23
|
+
*
|
|
24
|
+
* A collection a unit reads is staged as its manifest and the manifest's
|
|
25
|
+
* segments beside it, `<file>.segments/<hash>.beast2`. A host whose store is
|
|
26
|
+
* elsewhere may leave the segments out and place each as the runner first
|
|
27
|
+
* reads it, so a unit downloads what it reads: the unit says so (`fetch`). Its
|
|
28
|
+
* runner then asks for a staged manifest's segment file it finds absent, by
|
|
29
|
+
* creating `<segment file>.want` beside where it would be, and waits for the
|
|
30
|
+
* host to place the file, whole, or to write `<segment file>.error`, holding
|
|
31
|
+
* why it cannot, which the runner fails with. A unit that does not say so reads
|
|
32
|
+
* an absent segment as the input's own error, at once. Such a unit and the
|
|
33
|
+
* files beside it are a snapshot of the work only once its segments are there.
|
|
34
|
+
*/
|
|
35
|
+
import { ArrayType, BooleanType, FloatType, IntegerType, NullType, OptionType, StringType, StructType, VariantType, type ValueTypeOf } from "./types.js";
|
|
36
|
+
/**
|
|
37
|
+
* The environment variable a runner's `exec` sets to `1` in its own process
|
|
38
|
+
* when its unit asks for segments as it reads them (`fetch`), which the
|
|
39
|
+
* runner's manifest openers read — east-c's, for east-c and east-py alike. A
|
|
40
|
+
* host never sets it for a runner: e3 strips it from every runner it starts,
|
|
41
|
+
* so only a unit turns it on.
|
|
23
42
|
*/
|
|
24
|
-
|
|
43
|
+
export declare const FETCH_SEGMENTS_ENV = "E3_FETCH_SEGMENTS";
|
|
25
44
|
/**
|
|
26
45
|
* Where a unit's output goes, by the kind of output it is.
|
|
27
46
|
*
|
|
@@ -169,6 +188,7 @@ export type UnitWork = ValueTypeOf<typeof UnitWorkType>;
|
|
|
169
188
|
* }),
|
|
170
189
|
* platforms: [],
|
|
171
190
|
* threads: 1n,
|
|
191
|
+
* fetch: false,
|
|
172
192
|
* result: "result.beast2",
|
|
173
193
|
* };
|
|
174
194
|
* writeFileSync("unit.beast2", encodeBeast2For(UnitType)(unit));
|
|
@@ -276,6 +296,10 @@ export declare const UnitType: StructType<{
|
|
|
276
296
|
/** The threads the runner may use, its own pools included: one frames every
|
|
277
297
|
* output inline. */
|
|
278
298
|
readonly threads: IntegerType;
|
|
299
|
+
/** Whether the host places the segments of the collections the unit reads
|
|
300
|
+
* as the runner asks for them: a segment file of a staged manifest may be
|
|
301
|
+
* absent, and the runner asks for it (see the module's description). */
|
|
302
|
+
readonly fetch: BooleanType;
|
|
279
303
|
/** Where the runner writes its {@link UnitResultType}. */
|
|
280
304
|
readonly result: StringType;
|
|
281
305
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner_protocol.d.ts","sourceRoot":"","sources":["../../src/runner_protocol.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"runner_protocol.d.ts","sourceRoot":"","sources":["../../src/runner_protocol.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAGzJ;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AAEtD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;IACzB;sDACkD;;IAElD;sCACkC;;IAElC;;6DAEyD;;IAEzD;;mEAE+D;;;;;IAE/D;;6CAEyC;;;;;;EAEzC,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC;AACnD,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,wBAAwB;AACxB,eAAO,MAAM,YAAY;IACvB;+DAC2D;;;;;YAzB3D;8DACkD;;YAElD;8CACkC;;YAElC;;qEAEyD;;YAEzD;;2EAE+D;;;;;YAE/D;;qDAEyC;;;;;;;;IAWzC;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,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;IACzB,0BAA0B;;QAjC1B,gCAAgC;;QAEhC;;uBAEe;;;;;;;;;;IA+Bf;qBACiB;;IAEjB,2BAA2B;;QA1B3B,yDAAyD;;QAEzD,qEAAqE;;QAErE,iDAAiD;;QAEjD,4BAA4B;;;EAsB5B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC;AACnD,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -20,9 +20,28 @@
|
|
|
20
20
|
* The types live here, beside the collection layer, because every runner and
|
|
21
21
|
* the platform that schedules them read them; east-c declares the same types
|
|
22
22
|
* in C, and the conformance corpus pins that all three runners agree.
|
|
23
|
+
*
|
|
24
|
+
* A collection a unit reads is staged as its manifest and the manifest's
|
|
25
|
+
* segments beside it, `<file>.segments/<hash>.beast2`. A host whose store is
|
|
26
|
+
* elsewhere may leave the segments out and place each as the runner first
|
|
27
|
+
* reads it, so a unit downloads what it reads: the unit says so (`fetch`). Its
|
|
28
|
+
* runner then asks for a staged manifest's segment file it finds absent, by
|
|
29
|
+
* creating `<segment file>.want` beside where it would be, and waits for the
|
|
30
|
+
* host to place the file, whole, or to write `<segment file>.error`, holding
|
|
31
|
+
* why it cannot, which the runner fails with. A unit that does not say so reads
|
|
32
|
+
* an absent segment as the input's own error, at once. Such a unit and the
|
|
33
|
+
* files beside it are a snapshot of the work only once its segments are there.
|
|
23
34
|
*/
|
|
24
|
-
import { ArrayType, FloatType, IntegerType, NullType, OptionType, StringType, StructType, VariantType } from "./types.js";
|
|
35
|
+
import { ArrayType, BooleanType, FloatType, IntegerType, NullType, OptionType, StringType, StructType, VariantType } from "./types.js";
|
|
25
36
|
import { LocationType } from "./ir.js";
|
|
37
|
+
/**
|
|
38
|
+
* The environment variable a runner's `exec` sets to `1` in its own process
|
|
39
|
+
* when its unit asks for segments as it reads them (`fetch`), which the
|
|
40
|
+
* runner's manifest openers read — east-c's, for east-c and east-py alike. A
|
|
41
|
+
* host never sets it for a runner: e3 strips it from every runner it starts,
|
|
42
|
+
* so only a unit turns it on.
|
|
43
|
+
*/
|
|
44
|
+
export const FETCH_SEGMENTS_ENV = "E3_FETCH_SEGMENTS";
|
|
26
45
|
/**
|
|
27
46
|
* Where a unit's output goes, by the kind of output it is.
|
|
28
47
|
*
|
|
@@ -96,6 +115,7 @@ export const UnitWorkType = VariantType({
|
|
|
96
115
|
* }),
|
|
97
116
|
* platforms: [],
|
|
98
117
|
* threads: 1n,
|
|
118
|
+
* fetch: false,
|
|
99
119
|
* result: "result.beast2",
|
|
100
120
|
* };
|
|
101
121
|
* writeFileSync("unit.beast2", encodeBeast2For(UnitType)(unit));
|
|
@@ -111,6 +131,10 @@ export const UnitType = StructType({
|
|
|
111
131
|
/** The threads the runner may use, its own pools included: one frames every
|
|
112
132
|
* output inline. */
|
|
113
133
|
threads: IntegerType,
|
|
134
|
+
/** Whether the host places the segments of the collections the unit reads
|
|
135
|
+
* as the runner asks for them: a segment file of a staged manifest may be
|
|
136
|
+
* absent, and the runner asks for it (see the module's description). */
|
|
137
|
+
fetch: BooleanType,
|
|
114
138
|
/** Where the runner writes its {@link UnitResultType}. */
|
|
115
139
|
result: StringType,
|
|
116
140
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner_protocol.js","sourceRoot":"","sources":["../../src/runner_protocol.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"runner_protocol.js","sourceRoot":"","sources":["../../src/runner_protocol.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAoB,M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