@smoothbricks/nx-plugin 0.7.17 → 0.7.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 +315 -114
- package/dist/.build-inputs.json +47 -38
- package/dist/built-output-packages.js +1 -1
- package/dist/bun-lock-scope.d.ts +128 -20
- package/dist/bun-lock-scope.d.ts.map +1 -1
- package/dist/bun-lock-scope.js +267 -44
- package/dist/cargo-closure-input.d.ts +8 -6
- package/dist/cargo-closure-input.d.ts.map +1 -1
- package/dist/cargo-closure-input.js +15 -12
- package/dist/cargo-source-hash.d.ts +26 -25
- package/dist/cargo-source-hash.d.ts.map +1 -1
- package/dist/cargo-source-hash.js +84 -105
- package/dist/cargo-toolchain-paths.d.ts +2 -2
- package/dist/cargo-toolchain-paths.js +2 -2
- package/dist/cargo-workspace.d.ts +20 -2
- package/dist/cargo-workspace.d.ts.map +1 -1
- package/dist/cargo-workspace.js +43 -22
- package/dist/ensure-built-receipt.d.ts +3 -2
- package/dist/ensure-built-receipt.d.ts.map +1 -1
- package/dist/ensure-built-receipt.js +3 -2
- package/dist/eslint-config-closure.d.ts +8 -3
- package/dist/eslint-config-closure.d.ts.map +1 -1
- package/dist/eslint-config-closure.js +24 -5
- package/dist/executors/bounded-exec/admission-queue.d.ts +3 -1
- package/dist/executors/bounded-exec/admission-queue.d.ts.map +1 -1
- package/dist/executors/bounded-exec/admission-queue.js +9 -10
- package/dist/executors/bounded-exec/awake-clock.d.ts +5 -0
- package/dist/executors/bounded-exec/awake-clock.d.ts.map +1 -0
- package/dist/executors/bounded-exec/awake-clock.js +22 -0
- package/dist/executors/bounded-exec/bounds.d.ts +19 -6
- package/dist/executors/bounded-exec/bounds.d.ts.map +1 -1
- package/dist/executors/bounded-exec/bounds.js +22 -15
- package/dist/executors/bounded-exec/case-gate.d.ts +114 -0
- package/dist/executors/bounded-exec/case-gate.d.ts.map +1 -0
- package/dist/executors/bounded-exec/case-gate.js +342 -0
- package/dist/executors/bounded-exec/cpu-pool-thread.d.ts +1 -0
- package/dist/executors/bounded-exec/cpu-pool-thread.d.ts.map +1 -1
- package/dist/executors/bounded-exec/cpu-pool-thread.js +2 -2
- package/dist/executors/bounded-exec/cpu-pool.d.ts +28 -1
- package/dist/executors/bounded-exec/cpu-pool.d.ts.map +1 -1
- package/dist/executors/bounded-exec/cpu-pool.js +102 -16
- package/dist/executors/bounded-exec/cpu-rise.d.ts +73 -0
- package/dist/executors/bounded-exec/cpu-rise.d.ts.map +1 -0
- package/dist/executors/bounded-exec/cpu-rise.js +111 -0
- package/dist/executors/bounded-exec/endpoint-life.d.ts +146 -0
- package/dist/executors/bounded-exec/endpoint-life.d.ts.map +1 -0
- package/dist/executors/bounded-exec/endpoint-life.js +228 -0
- package/dist/executors/bounded-exec/executor.d.ts +1 -1
- package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
- package/dist/executors/bounded-exec/executor.js +256 -86
- package/dist/executors/bounded-exec/gateway-lease.d.ts +1 -1
- package/dist/executors/bounded-exec/gateway-lease.d.ts.map +1 -1
- package/dist/executors/bounded-exec/gateway-lease.js +8 -1
- package/dist/executors/bounded-exec/go-run-summary.d.ts +51 -0
- package/dist/executors/bounded-exec/go-run-summary.d.ts.map +1 -0
- package/dist/executors/bounded-exec/go-run-summary.js +98 -0
- package/dist/executors/bounded-exec/hang-diagnostics.d.ts +11 -3
- package/dist/executors/bounded-exec/hang-diagnostics.d.ts.map +1 -1
- package/dist/executors/bounded-exec/hang-diagnostics.js +125 -47
- package/dist/executors/bounded-exec/lease-wait.d.ts +1 -0
- package/dist/executors/bounded-exec/lease-wait.d.ts.map +1 -1
- package/dist/executors/bounded-exec/lease-wait.js +1 -0
- package/dist/executors/bounded-exec/mbx-pool.d.ts +42 -7
- package/dist/executors/bounded-exec/mbx-pool.d.ts.map +1 -1
- package/dist/executors/bounded-exec/mbx-pool.js +45 -8
- package/dist/executors/bounded-exec/mbx-reservations.d.ts +12 -6
- package/dist/executors/bounded-exec/mbx-reservations.d.ts.map +1 -1
- package/dist/executors/bounded-exec/mbx-reservations.js +190 -284
- package/dist/executors/bounded-exec/parent-grant.d.ts +2 -0
- package/dist/executors/bounded-exec/parent-grant.d.ts.map +1 -1
- package/dist/executors/bounded-exec/parent-grant.js +1 -0
- package/dist/executors/bounded-exec/pool-admission.d.ts +29 -3
- package/dist/executors/bounded-exec/pool-admission.d.ts.map +1 -1
- package/dist/executors/bounded-exec/pool-admission.js +47 -1
- package/dist/executors/bounded-exec/progress-channel.d.ts +38 -0
- package/dist/executors/bounded-exec/progress-channel.d.ts.map +1 -0
- package/dist/executors/bounded-exec/progress-channel.js +113 -0
- package/dist/executors/bounded-exec/progress.d.ts +5 -1
- package/dist/executors/bounded-exec/progress.d.ts.map +1 -1
- package/dist/executors/bounded-exec/progress.js +31 -1
- package/dist/executors/bounded-exec/ram-temp.d.ts +24 -1
- package/dist/executors/bounded-exec/ram-temp.d.ts.map +1 -1
- package/dist/executors/bounded-exec/ram-temp.js +123 -16
- package/dist/executors/bounded-exec/reservation-connection.d.ts +90 -0
- package/dist/executors/bounded-exec/reservation-connection.d.ts.map +1 -0
- package/dist/executors/bounded-exec/reservation-connection.js +248 -0
- package/dist/executors/bounded-exec/run-cpu-pool.d.ts.map +1 -1
- package/dist/executors/bounded-exec/run-cpu-pool.js +3 -0
- package/dist/executors/bounded-exec/runner-sizing.d.ts +9 -5
- package/dist/executors/bounded-exec/runner-sizing.d.ts.map +1 -1
- package/dist/executors/bounded-exec/runner-sizing.js +13 -9
- package/dist/executors/bounded-exec/schema.d.ts +7 -2
- package/dist/executors/bounded-exec/schema.d.ts.map +1 -1
- package/dist/executors/bounded-exec/schema.js +17 -1
- package/dist/executors/bounded-exec/suite-minimum.d.ts +21 -0
- package/dist/executors/bounded-exec/suite-minimum.d.ts.map +1 -0
- package/dist/executors/bounded-exec/suite-minimum.js +85 -0
- package/dist/executors/bounded-exec/test-result-writer.d.ts +2 -0
- package/dist/executors/bounded-exec/test-result-writer.d.ts.map +1 -1
- package/dist/executors/bounded-exec/test-result-writer.js +1 -0
- package/dist/executors/bounded-exec/test-results.d.ts +5 -0
- package/dist/executors/bounded-exec/test-results.d.ts.map +1 -1
- package/dist/executors/bounded-exec/test-results.js +2 -2
- package/dist/executors/bounded-exec/verdict.d.ts +39 -10
- package/dist/executors/bounded-exec/verdict.d.ts.map +1 -1
- package/dist/executors/bounded-exec/verdict.js +60 -14
- package/dist/executors/cargo-zigbuild/executor.d.ts +10 -8
- package/dist/executors/cargo-zigbuild/executor.d.ts.map +1 -1
- package/dist/executors/cargo-zigbuild/executor.js +32 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +294 -152
- package/dist/managed-files/ci-workflow.d.ts +4 -1
- package/dist/managed-files/ci-workflow.d.ts.map +1 -1
- package/dist/managed-files/ci-workflow.js +9 -14
- package/dist/managed-files/files.d.ts +3 -3
- package/dist/managed-files/files.js +3 -3
- package/dist/managed-files/generator.d.ts +5 -1
- package/dist/managed-files/generator.d.ts.map +1 -1
- package/dist/managed-files/generator.js +22 -7
- package/dist/managed-files/render-memo.d.ts +13 -0
- package/dist/managed-files/render-memo.d.ts.map +1 -0
- package/dist/managed-files/render-memo.js +94 -0
- package/dist/task-results.js +2 -1
- package/dist/test-program.d.ts +11 -6
- package/dist/test-program.d.ts.map +1 -1
- package/dist/test-program.js +39 -35
- package/dist/tool-bins.d.ts +12 -0
- package/dist/tool-bins.d.ts.map +1 -1
- package/dist/tool-bins.js +31 -6
- package/dist/typecheck-test-policy.d.ts +10 -1
- package/dist/typecheck-test-policy.d.ts.map +1 -1
- package/dist/typecheck-test-policy.js +40 -24
- package/dist/workspace-config-policy.d.ts.map +1 -1
- package/dist/workspace-config-policy.js +135 -42
- package/dist/workspace-index.d.ts +14 -1
- package/dist/workspace-index.d.ts.map +1 -1
- package/dist/workspace-index.js +36 -4
- package/executors.json +2 -0
- package/managed/raw/envrc +24 -0
- package/managed/raw/patches/nx@24.0.3.patch +1851 -221
- package/managed/raw/patches/ttsc@0.37.1.patch +1055 -0
- package/managed/raw/tooling/direnv/developer-links.ts +122 -14
- package/managed/raw/tooling/direnv/devenv.smoo.nix +20 -19
- package/managed/templates/github/actions/save-nix-devenv/action.yml +19 -1
- package/managed/templates/github/actions/setup-devenv/action.yml +2 -0
- package/package.json +68 -11
- package/runtime/nx-publish/.build-inputs.json +2 -2
- package/runtime/nx-publish/cache_adapter.js +293 -3
- package/runtime/nx-publish/nx_publish.js +36 -14
- package/src/built-output-packages.ts +1 -1
- package/src/bun-lock-scope.ts +293 -40
- package/src/cargo-closure-input.ts +20 -12
- package/src/cargo-source-hash.ts +119 -145
- package/src/cargo-toolchain-paths.ts +2 -2
- package/src/cargo-workspace.ts +59 -21
- package/src/ensure-built-receipt.ts +3 -2
- package/src/eslint-config-closure.ts +27 -6
- package/src/executors/bounded-exec/admission-queue.ts +11 -10
- package/src/executors/bounded-exec/awake-clock.ts +20 -0
- package/src/executors/bounded-exec/bounds.ts +41 -19
- package/src/executors/bounded-exec/case-gate.ts +365 -0
- package/src/executors/bounded-exec/cpu-pool-thread.ts +3 -3
- package/src/executors/bounded-exec/cpu-pool.ts +139 -12
- package/src/executors/bounded-exec/cpu-rise.ts +156 -0
- package/src/executors/bounded-exec/endpoint-life.ts +279 -0
- package/src/executors/bounded-exec/executor.ts +341 -123
- package/src/executors/bounded-exec/gateway-lease.ts +6 -0
- package/src/executors/bounded-exec/go-run-summary.ts +137 -0
- package/src/executors/bounded-exec/hang-diagnostics.ts +150 -50
- package/src/executors/bounded-exec/lease-wait.ts +1 -0
- package/src/executors/bounded-exec/mbx-pool.ts +57 -9
- package/src/executors/bounded-exec/mbx-reservations.ts +216 -183
- package/src/executors/bounded-exec/parent-grant.ts +3 -0
- package/src/executors/bounded-exec/pool-admission.ts +59 -2
- package/src/executors/bounded-exec/progress-channel.ts +129 -0
- package/src/executors/bounded-exec/progress.ts +39 -3
- package/src/executors/bounded-exec/ram-temp.ts +137 -17
- package/src/executors/bounded-exec/reservation-connection.ts +221 -0
- package/src/executors/bounded-exec/run-cpu-pool.ts +2 -0
- package/src/executors/bounded-exec/runner-sizing.ts +13 -8
- package/src/executors/bounded-exec/schema.json +1 -1
- package/src/executors/bounded-exec/schema.ts +21 -2
- package/src/executors/bounded-exec/suite-minimum.ts +81 -0
- package/src/executors/bounded-exec/test-result-writer.ts +3 -0
- package/src/executors/bounded-exec/test-results.ts +5 -0
- package/src/executors/bounded-exec/verdict.ts +83 -22
- package/src/executors/cargo-zigbuild/executor.ts +30 -19
- package/src/index.ts +357 -166
- package/src/managed-files/ci-workflow.ts +13 -17
- package/src/managed-files/files.ts +3 -3
- package/src/managed-files/generator.ts +21 -6
- package/src/managed-files/render-memo.ts +135 -0
- package/src/test-program.ts +36 -41
- package/src/tool-bins.ts +35 -6
- package/src/typecheck-test-policy.ts +49 -24
- package/src/workspace-config-policy.ts +161 -43
- package/src/workspace-index.ts +40 -5
- package/test-timings.json +157 -141
- package/managed/raw/patches/ttsc@0.36.3.patch +0 -1660
|
@@ -7,6 +7,8 @@ export interface NativeTestResult {
|
|
|
7
7
|
readonly source: ClosedTestResult['source'];
|
|
8
8
|
readonly contradictsCursor?: number;
|
|
9
9
|
readonly durationMs: number | null;
|
|
10
|
+
/** How long the case waited at its leaf's gate before it ran, which `durationMs` leaves out; absent for none. */
|
|
11
|
+
readonly waitMs?: number;
|
|
10
12
|
readonly sourceRef: string | null;
|
|
11
13
|
readonly failureOutput: string | null;
|
|
12
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-result-writer.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/test-result-writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAA6D,MAAM,mBAAmB,CAAC;AAErH,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAM7C,wFAAwF;AACxF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB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88
|
...(result.contradictsCursor === undefined ? {} : { contradictsCursor: result.contradictsCursor }),
|
|
89
89
|
durationMs: result.durationMs,
|
|
90
|
+
...(result.waitMs === undefined ? {} : { waitMs: result.waitMs }),
|
|
90
91
|
sourceRef: normalizeSourceRef(result.sourceRef, sourceRoot),
|
|
91
92
|
causeRef,
|
|
92
93
|
}, offset);
|
|
@@ -12,6 +12,11 @@ export interface ClosedTestResult {
|
|
|
12
12
|
readonly contradictsCursor?: ByteOffset;
|
|
13
13
|
/** Null when the native runner reports no duration (for example a skipped test). */
|
|
14
14
|
readonly durationMs: (number & tags.Minimum<0>) | null;
|
|
15
|
+
/**
|
|
16
|
+
* How long the case waited for a core at its leaf's gate before it ran (specs/cowshed/05_gateway.md, "A case starts
|
|
17
|
+
* on a core"), which `durationMs` leaves out; absent for a case that did not wait.
|
|
18
|
+
*/
|
|
19
|
+
readonly waitMs?: number & tags.Minimum<0>;
|
|
15
20
|
/** Native file:line, never a location inferred from human output. */
|
|
16
21
|
readonly sourceRef: string | null;
|
|
17
22
|
/** UTF-8 byte range [startByte, endByte), relative to the task artifact directory. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-results.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/test-results.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,IAAI,EAAE,MAAM,OAAO,CAAC;AAEzC,eAAO,MAAM,iBAAiB,uBAAuB,CAAC;AACtD,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AAEtD,KAAK,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAEhF,8FAA8F;AAC9F,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC7C,QAAQ,CAAC,EAAE,EAAE,MAAM,C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_FILE = 'test-results.jsonl';
|
|
5
5
|
export const TEST_FAILURES_FILE = 'test-failures.log';
|
|
6
6
|
export const isClosedTestResult = (() => {
|
|
7
|
-
const _io0 = (input, _exceptionable = true) => "string" === typeof input.runId && _isFormatUuid_1._isFormatUuid(input.runId) && "string" === typeof input.id && ("fail" === input.status || "pass" === input.status || "skip" === input.status) && ("junit" === input.source || "native" === input.source || "progress" === input.source) && (undefined === input.contradictsCursor || "number" === typeof input.contradictsCursor && (_isTypeUint64_1._isTypeUint64(input.contradictsCursor) && input.contradictsCursor <= 9007199254740991)) && (null === input.durationMs || "number" === typeof input.durationMs && 0 <= input.durationMs) && (null === input.sourceRef || "string" === typeof input.sourceRef) && (null === input.causeRef || "object" === typeof input.causeRef && null !== input.causeRef && _io1(input.causeRef, true && _exceptionable)) && ("number" === typeof input.cursor && (_isTypeUint64_1._isTypeUint64(input.cursor) && input.cursor <= 9007199254740991)) && (8 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
8
|
-
if (["runId", "id", "status", "source", "contradictsCursor", "durationMs", "sourceRef", "causeRef", "cursor"].some(prop => key === prop))
|
|
7
|
+
const _io0 = (input, _exceptionable = true) => "string" === typeof input.runId && _isFormatUuid_1._isFormatUuid(input.runId) && "string" === typeof input.id && ("fail" === input.status || "pass" === input.status || "skip" === input.status) && ("junit" === input.source || "native" === input.source || "progress" === input.source) && (undefined === input.contradictsCursor || "number" === typeof input.contradictsCursor && (_isTypeUint64_1._isTypeUint64(input.contradictsCursor) && input.contradictsCursor <= 9007199254740991)) && (null === input.durationMs || "number" === typeof input.durationMs && 0 <= input.durationMs) && (undefined === input.waitMs || "number" === typeof input.waitMs && 0 <= input.waitMs) && (null === input.sourceRef || "string" === typeof input.sourceRef) && (null === input.causeRef || "object" === typeof input.causeRef && null !== input.causeRef && _io1(input.causeRef, true && _exceptionable)) && ("number" === typeof input.cursor && (_isTypeUint64_1._isTypeUint64(input.cursor) && input.cursor <= 9007199254740991)) && (8 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
8
|
+
if (["runId", "id", "status", "source", "contradictsCursor", "durationMs", "waitMs", "sourceRef", "causeRef", "cursor"].some(prop => key === prop))
|
|
9
9
|
return true;
|
|
10
10
|
const value = input[key];
|
|
11
11
|
if (undefined === value)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CpuGrantRecord } from './cpu-grant.js';
|
|
2
|
+
import { type CpuRise } from './cpu-rise.js';
|
|
2
3
|
import type { CpuWaitRow } from './lease-wait.js';
|
|
3
4
|
import { type LockWait } from './lock-wait.js';
|
|
4
5
|
import type { MbxQueuedRequest } from './mbx-queue.js';
|
|
@@ -12,18 +13,25 @@ import type { NativeTestResult } from './test-result-writer.js';
|
|
|
12
13
|
* outlived `timeoutMs` (`total`), its fixture segment outlived `fixtureTimeoutMs`
|
|
13
14
|
* (`fixture`), or every failing test in the runner's report failed on
|
|
14
15
|
* its runner's per-test timeout (`test`). A loaded host produces exactly these.
|
|
15
|
-
* - `wedged`: `idleTimeoutMs` fired: no test finished for that long during a
|
|
16
|
-
* the suite's completion bound was exceeded, not that every process stopped:
|
|
17
|
-
* exceed it too. The verdict names tests reported running but never finished and
|
|
18
|
-
* aborted; diagnostics distinguish a stalled wait from a progressing but oversized
|
|
19
|
-
* When the snapshot named a lock wait, `lockWaits` names the file the run holds on a numbered descriptor
|
|
20
|
-
* processes outside the run that also hold it open: open-handle evidence, not a kernel lock owner.
|
|
16
|
+
* - `wedged`: `idleTimeoutMs` fired: no test finished and no running test reported progress for that long during a
|
|
17
|
+
* chargeable test interval. This proves the suite's completion bound was exceeded, not that every process stopped:
|
|
18
|
+
* an expensive active fixture can exceed it too. The verdict names tests reported running but never finished and
|
|
19
|
+
* tests the report says were aborted; diagnostics distinguish a stalled wait from a progressing but oversized
|
|
20
|
+
* lifecycle. When the snapshot named a lock wait, `lockWaits` names the file the run holds on a numbered descriptor
|
|
21
|
+
* and the processes outside the run that also hold it open: open-handle evidence, not a kernel lock owner. When it
|
|
22
|
+
* named a process whose CPU time rose, `cpuRising` names it: a build inside the test, which is a defect and not a
|
|
23
|
+
* hang. CPU never restarts the bound, which counts finished tests and the progress running tests report.
|
|
21
24
|
* - `no-space`: the run failed and its output said a write found no space (ENOSPC). Whatever its tests then reported,
|
|
22
25
|
* they failed on the disk, not on their own: the verdict names the line that said so and, when the task held one,
|
|
23
26
|
* its RAM temp volume as it stood when that line arrived.
|
|
24
27
|
* - `queued`: the command failed before any admission after a live task PID was explicitly seen waiting in mbx, or
|
|
25
28
|
* while its reserved leaf's request waited on its run's mbx reservation endpoint. Its observed wait, and any public
|
|
26
29
|
* queue positions, describe admission pressure, never a wedged test.
|
|
30
|
+
* - `operational`: bounded-exec itself ended or refused the run for a cause its command did not make, and `cause` says
|
|
31
|
+
* which: its leaf's mbx reservation was refused (`reservation-refused`, naming the endpoint asked and the connect
|
|
32
|
+
* error's code, `ENOENT` when the endpoint's socket is gone), or the executor's own machinery failed (`executor`: a
|
|
33
|
+
* lost CPU grant or pool, a broken progress channel or runner lifecycle, leftovers it could not retire). The tests the
|
|
34
|
+
* report named are failures, never bounds, and the run never records exit 0.
|
|
27
35
|
* - `failed`: anything else that did not pass. That includes an assertion named in the report,
|
|
28
36
|
* or a non-zero exit with no report to say why.
|
|
29
37
|
*/
|
|
@@ -48,6 +56,8 @@ export type BoundedExecVerdict = {
|
|
|
48
56
|
readonly tests: readonly string[];
|
|
49
57
|
/** Lock waits the snapshot named: holder evidence (open handles), not a kernel lock owner. */
|
|
50
58
|
readonly lockWaits: readonly LockWait[];
|
|
59
|
+
/** Processes of the run's tree whose CPU time rose while the bound counted down: a build inside the test. */
|
|
60
|
+
readonly cpuRising: readonly CpuRise[];
|
|
51
61
|
} | ({
|
|
52
62
|
readonly outcome: 'no-space';
|
|
53
63
|
readonly exitCode: number;
|
|
@@ -56,6 +66,23 @@ export type BoundedExecVerdict = {
|
|
|
56
66
|
readonly outcome: 'failed';
|
|
57
67
|
readonly exitCode: number;
|
|
58
68
|
readonly tests: readonly string[];
|
|
69
|
+
} | {
|
|
70
|
+
readonly outcome: 'operational';
|
|
71
|
+
readonly exitCode: number;
|
|
72
|
+
readonly tests: readonly string[];
|
|
73
|
+
readonly cause: OperationalCause;
|
|
74
|
+
};
|
|
75
|
+
/** Why bounded-exec ended or refused a run whatever its command did (`operational`). */
|
|
76
|
+
export type OperationalCause = {
|
|
77
|
+
readonly kind: 'reservation-refused';
|
|
78
|
+
/** The run's mbx reservation endpoint the leaf asked. */
|
|
79
|
+
readonly endpoint: string;
|
|
80
|
+
/** The code of the error that ended the connection (`ENOENT`: the endpoint's socket is gone), else null. */
|
|
81
|
+
readonly errno: string | null;
|
|
82
|
+
readonly message: string;
|
|
83
|
+
} | {
|
|
84
|
+
readonly kind: 'executor';
|
|
85
|
+
readonly message: string;
|
|
59
86
|
};
|
|
60
87
|
/** Observed admission wait, supplied only while the command has never received a grant. */
|
|
61
88
|
export interface AdmissionQueueWait {
|
|
@@ -172,6 +199,8 @@ export interface RunEnd {
|
|
|
172
199
|
readonly noSpace: NoSpaceSighting | null;
|
|
173
200
|
/** The lock waits the expiry's snapshot named; empty when none, or when that capture did not complete. */
|
|
174
201
|
readonly lockWaits: readonly LockWait[];
|
|
202
|
+
/** The processes the expiry's snapshot saw gain CPU time; empty when none did, or when that capture did not finish. */
|
|
203
|
+
readonly cpuRising: readonly CpuRise[];
|
|
175
204
|
/** Explicit observed queue evidence before first admission; absent after any grant. */
|
|
176
205
|
readonly admissionQueue?: AdmissionQueueWait | null;
|
|
177
206
|
}
|
|
@@ -185,11 +214,11 @@ export interface RunEnd {
|
|
|
185
214
|
*/
|
|
186
215
|
export declare function judgeRun(run: RunEnd): BoundedExecVerdict;
|
|
187
216
|
/**
|
|
188
|
-
* A run that failed for a reason its command did not cause: its
|
|
189
|
-
* cleanly. It is
|
|
190
|
-
* reports are failures, never bounds.
|
|
217
|
+
* A run that failed for a reason its command did not cause (`OperationalCause`): its reservation was refused, its CPU
|
|
218
|
+
* grant was lost, or its sub-pool did not close cleanly. It is operational whatever the command exited with and
|
|
219
|
+
* whatever bound also fired, and the tests it reports are failures, never bounds. It never records exit 0.
|
|
191
220
|
*/
|
|
192
|
-
export declare function judgeOperationalFailure(exitCode: number, report: JunitFailures | null): BoundedExecVerdict;
|
|
221
|
+
export declare function judgeOperationalFailure(exitCode: number, report: JunitFailures | null, cause: OperationalCause): BoundedExecVerdict;
|
|
193
222
|
/** Where `task`'s verdict and report live: this checkout's own Nx workspace-data directory. */
|
|
194
223
|
export declare function taskDirectory(workspaceData: string, taskId: string): string;
|
|
195
224
|
export declare const VERDICT_FILE = "verdict.json";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verdict.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/verdict.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAmB,KAAK,QAAQ,EAAe,MAAM,gBAAgB,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGhE
|
|
1
|
+
{"version":3,"file":"verdict.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/verdict.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAoB,KAAK,OAAO,EAAoB,MAAM,eAAe,CAAC;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAmB,KAAK,QAAQ,EAAe,MAAM,gBAAgB,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;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A0F;AAC1F,MAAM,MAAM,UAAU,GAClB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,kBAAkB,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;CAAE,GACpH;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9E;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CA6BrG;AAED,kFAAkF;AAClF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAQvE;AACD,wBAAgB,eAAe,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAgCnE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CAgBjE"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import * as _isTypeUint32_1 from "typia/lib/internal/_isTypeUint32";
|
|
1
2
|
import { mkdir, readFile, rename, rm, writeFile } from 'node:fs/promises';
|
|
2
3
|
import { join } from 'node:path';
|
|
3
4
|
import typia from 'typia';
|
|
4
5
|
import { parseCpuGrant } from './cpu-grant.js';
|
|
6
|
+
import { CPU_RISING_CLASS, describeCpuRises } from './cpu-rise.js';
|
|
5
7
|
import { describeHolders } from './lock-wait.js';
|
|
6
8
|
import { TEST_FAILURES_FILE, TEST_RESULTS_FILE } from './test-results.js';
|
|
7
9
|
const isQueuedVerdict = (() => {
|
|
@@ -10,6 +12,25 @@ const isQueuedVerdict = (() => {
|
|
|
10
12
|
const _io2 = input => "number" === typeof input.pid && "number" === typeof input.ticket && "number" === typeof input.queuePosition;
|
|
11
13
|
return input => "object" === typeof input && null !== input && _io0(input);
|
|
12
14
|
})();
|
|
15
|
+
const isOperationalVerdict = (() => {
|
|
16
|
+
const _ip0 = input => "string" === typeof input["message"];
|
|
17
|
+
const _io0 = input => "operational" === input.outcome && "number" === typeof input.exitCode && (Array.isArray(input.tests) && input.tests.every(elem => "string" === typeof elem)) && ("object" === typeof input.cause && null !== input.cause && _iu0(input.cause));
|
|
18
|
+
const _io1 = input => "reservation-refused" === input.kind && "string" === typeof input.endpoint && (null === input.errno || "string" === typeof input.errno) && _ip0(input);
|
|
19
|
+
const _io2 = input => "executor" === input.kind && _ip0(input);
|
|
20
|
+
const _iu0 = input => (() => {
|
|
21
|
+
if ("reservation-refused" === input.kind)
|
|
22
|
+
return _io1(input);
|
|
23
|
+
else if ("executor" === input.kind)
|
|
24
|
+
return _io2(input);
|
|
25
|
+
else
|
|
26
|
+
return false;
|
|
27
|
+
})();
|
|
28
|
+
return input => "object" === typeof input && null !== input && _io0(input);
|
|
29
|
+
})();
|
|
30
|
+
const isCpuRising = (() => {
|
|
31
|
+
const _io0 = input => "number" === typeof input.pid && (_isTypeUint32_1._isTypeUint32(input.pid) && 1 <= input.pid) && "string" === typeof input.command && ("number" === typeof input.gainedMs && 0 <= input.gainedMs);
|
|
32
|
+
return input => Array.isArray(input) && input.every(elem => "object" === typeof elem && null !== elem && _io0(elem));
|
|
33
|
+
})();
|
|
13
34
|
/** The environment variable naming the absolute path a command writes its JUnit report to. */
|
|
14
35
|
export const JUNIT_REPORT_ENV = 'BOUNDED_EXEC_JUNIT';
|
|
15
36
|
/**
|
|
@@ -208,7 +229,14 @@ export function judgeRun(run) {
|
|
|
208
229
|
}
|
|
209
230
|
if (run.expiry?.kind === 'idle') {
|
|
210
231
|
const tests = [...new Set([...run.expiry.tests, ...(run.report?.cancelled ?? [])])];
|
|
211
|
-
return {
|
|
232
|
+
return {
|
|
233
|
+
outcome: 'wedged',
|
|
234
|
+
idleMs: run.expiry.limitMs,
|
|
235
|
+
elapsedMs: run.elapsedMs,
|
|
236
|
+
tests,
|
|
237
|
+
lockWaits: run.lockWaits,
|
|
238
|
+
cpuRising: run.cpuRising,
|
|
239
|
+
};
|
|
212
240
|
}
|
|
213
241
|
if (run.report !== null && run.report.failed.length > 0) {
|
|
214
242
|
return { outcome: 'failed', exitCode: run.exitCode, tests: run.report.failed };
|
|
@@ -231,13 +259,13 @@ export function judgeRun(run) {
|
|
|
231
259
|
return { outcome: 'failed', exitCode: run.exitCode, tests: [] };
|
|
232
260
|
}
|
|
233
261
|
/**
|
|
234
|
-
* A run that failed for a reason its command did not cause: its
|
|
235
|
-
* cleanly. It is
|
|
236
|
-
* reports are failures, never bounds.
|
|
262
|
+
* A run that failed for a reason its command did not cause (`OperationalCause`): its reservation was refused, its CPU
|
|
263
|
+
* grant was lost, or its sub-pool did not close cleanly. It is operational whatever the command exited with and
|
|
264
|
+
* whatever bound also fired, and the tests it reports are failures, never bounds. It never records exit 0.
|
|
237
265
|
*/
|
|
238
|
-
export function judgeOperationalFailure(exitCode, report) {
|
|
266
|
+
export function judgeOperationalFailure(exitCode, report, cause) {
|
|
239
267
|
const tests = report === null ? [] : [...report.failed, ...report.timedOut, ...report.cancelled];
|
|
240
|
-
return { outcome: '
|
|
268
|
+
return { outcome: 'operational', exitCode: exitCode === 0 ? 1 : exitCode, tests, cause };
|
|
241
269
|
}
|
|
242
270
|
/** Where `task`'s verdict and report live: this checkout's own Nx workspace-data directory. */
|
|
243
271
|
export function taskDirectory(workspaceData, taskId) {
|
|
@@ -379,13 +407,23 @@ function parseVerdict(value) {
|
|
|
379
407
|
}
|
|
380
408
|
break;
|
|
381
409
|
case 'wedged': {
|
|
382
|
-
// A record written before lock waits were named carries none.
|
|
410
|
+
// A record written before lock waits or CPU rises were named carries none.
|
|
383
411
|
const lockWaits = value.lockWaits === undefined ? [] : parseLockWaits(value.lockWaits);
|
|
412
|
+
const recorded = value.cpuRising;
|
|
413
|
+
const cpuRising = recorded === undefined ? [] : isCpuRising(recorded) ? recorded : null;
|
|
384
414
|
if (typeof value.idleMs === 'number' &&
|
|
385
415
|
typeof value.elapsedMs === 'number' &&
|
|
386
416
|
isStrings(value.tests) &&
|
|
387
|
-
lockWaits !== null
|
|
388
|
-
|
|
417
|
+
lockWaits !== null &&
|
|
418
|
+
cpuRising !== null) {
|
|
419
|
+
return {
|
|
420
|
+
outcome: 'wedged',
|
|
421
|
+
idleMs: value.idleMs,
|
|
422
|
+
elapsedMs: value.elapsedMs,
|
|
423
|
+
tests: value.tests,
|
|
424
|
+
lockWaits,
|
|
425
|
+
cpuRising,
|
|
426
|
+
};
|
|
389
427
|
}
|
|
390
428
|
break;
|
|
391
429
|
}
|
|
@@ -402,6 +440,10 @@ function parseVerdict(value) {
|
|
|
402
440
|
}
|
|
403
441
|
break;
|
|
404
442
|
}
|
|
443
|
+
case 'operational':
|
|
444
|
+
if (isOperationalVerdict(value))
|
|
445
|
+
return value;
|
|
446
|
+
break;
|
|
405
447
|
case 'failed':
|
|
406
448
|
if (typeof value.exitCode === 'number' && isStrings(value.tests)) {
|
|
407
449
|
return { outcome: 'failed', exitCode: value.exitCode, tests: value.tests };
|
|
@@ -524,18 +566,22 @@ export function describeVerdict(verdict) {
|
|
|
524
566
|
: verdict.bound === 'fixture'
|
|
525
567
|
? `its fixture outlived its ${verdict.limitMs}ms bound (${verdict.elapsedMs}ms)`
|
|
526
568
|
: `outlived its ${verdict.limitMs}ms bound (${verdict.elapsedMs}ms)`;
|
|
527
|
-
case 'wedged':
|
|
528
|
-
|
|
569
|
+
case 'wedged': {
|
|
570
|
+
const locks = verdict.lockWaits.map((wait) => `; waiting on a lock: ${wait.path} held open by ${describeHolders(wait.holders)}`);
|
|
571
|
+
const cpu = verdict.cpuRising.length > 0 ? [`; ${CPU_RISING_CLASS}: ${describeCpuRises(verdict.cpuRising)}`] : [];
|
|
572
|
+
const running = verdict.tests.length > 0
|
|
529
573
|
? `still running: ${verdict.tests.join(', ')}`
|
|
530
|
-
: 'the runner named no test still running'
|
|
531
|
-
|
|
532
|
-
|
|
574
|
+
: 'the runner named no test still running';
|
|
575
|
+
return `wedged: no test finished or reported progress for ${verdict.idleMs}ms after ${verdict.elapsedMs}ms; ${running}${[...locks, ...cpu].join('')}`;
|
|
576
|
+
}
|
|
533
577
|
case 'no-space':
|
|
534
578
|
return `${describeNoSpace(verdict)}${verdict.tests.length > 0 ? `; the tests that then failed: ${verdict.tests.join(', ')}` : ''}`;
|
|
535
579
|
case 'failed':
|
|
536
580
|
return verdict.tests.length > 0
|
|
537
581
|
? `failed: ${verdict.tests.join(', ')}`
|
|
538
582
|
: `exited ${verdict.exitCode} with no report naming a timeout`;
|
|
583
|
+
case 'operational':
|
|
584
|
+
return `${verdict.cause.message}${verdict.tests.length > 0 ? `; the tests that failed: ${verdict.tests.join(', ')}` : ''}`;
|
|
539
585
|
}
|
|
540
586
|
}
|
|
541
587
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type BuildInputProducer, type BuildInputRecord } from '@smoothbricks/build-inputs';
|
|
2
|
-
import {
|
|
2
|
+
import type { CargoLockResolve } from '@smoothbricks/build-inputs/cargo-closure';
|
|
3
|
+
import type { Result } from '@smoothbricks/cargo-retain';
|
|
3
4
|
import type { CargoZigbuildOptions } from './schema.js';
|
|
4
5
|
interface CargoZigbuildContext {
|
|
5
6
|
root: string;
|
|
@@ -39,12 +40,12 @@ export declare function zigbuildArgs(options: CargoZigbuildOptions, manifestPath
|
|
|
39
40
|
/** `x86_64-unknown-linux-gnu.2.17` → `x86_64-unknown-linux-gnu`. */
|
|
40
41
|
export declare function cargoTriple(target: string): string;
|
|
41
42
|
/**
|
|
42
|
-
* The remedy for a failed build of `target
|
|
43
|
-
*
|
|
44
|
-
*
|
|
43
|
+
* The remedy for a failed build of `target`, when rustc has no standard library for its triple: every managed shell
|
|
44
|
+
* carries the whole Linux rust-std set, so that rustc is not the one the checkout's shell provides. A build outside it
|
|
45
|
+
* fails in rustc, which names the missing target but not the shell. `libdir` is what
|
|
45
46
|
* `rustc --print target-libdir --target <triple>` printed, or null when rustc could not answer.
|
|
46
47
|
*/
|
|
47
|
-
export declare function missingRustStdRemedy(command: string, target: string,
|
|
48
|
+
export declare function missingRustStdRemedy(command: string, target: string, libdir: {
|
|
48
49
|
readonly path: string;
|
|
49
50
|
readonly exists: boolean;
|
|
50
51
|
} | null): string | null;
|
|
@@ -74,10 +75,11 @@ export declare function depInfoPath(built: string): string;
|
|
|
74
75
|
/**
|
|
75
76
|
* The input record (build-inputs.ts) of the build that wrote `built`, or why none can be made: the record
|
|
76
77
|
* `smoo-nx-build-inputs` writes after a macOS build, from the dep-info beside the artifact, so one link check judges
|
|
77
|
-
* both. `
|
|
78
|
-
* Nx task running the build, which the executor reads from its
|
|
78
|
+
* both. `cargo` is the resolve Cargo reports for the build's manifest, which names the workspace manifest and the
|
|
79
|
+
* lockfile closure the record states. `producer` is the Nx task running the build, which the executor reads from its
|
|
80
|
+
* environment.
|
|
79
81
|
*/
|
|
80
|
-
export declare function buildInputsOf(built: string, manifestPath: string,
|
|
82
|
+
export declare function buildInputsOf(built: string, manifestPath: string, cargo: CargoLockResolve, producer?: BuildInputProducer): Result<BuildInputRecord, string>;
|
|
81
83
|
/**
|
|
82
84
|
* Writes the artifact and its input record into the directory `output` is in, which the target declares as its Nx
|
|
83
85
|
* output (`{options.output}/../`), so a cache hit restores both. The artifact is copied then renamed, so the output
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/executors/cargo-zigbuild/executor.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EAKtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,
|
|
1
|
+
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/executors/cargo-zigbuild/executor.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK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GACjE,MAAM,GAAG,IAAI,CAOf;AAoBD;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,UAAU,CAQrF;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,GAAG,MAAM,GAAG,IAAI,CAqB1G;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGjD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,gBAAgB,EACvB,QAAQ,CAAC,EAAE,kBAAkB,GAC5B,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAkBlC;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,gBAAgB,EAC1B,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,IAAI,CAAC,CAUf;AAED,wBAA8B,qBAAqB,CACjD,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAsE/B"}
|
|
@@ -6,8 +6,8 @@ import { chmod, copyFile, mkdir, rename } from 'node:fs/promises';
|
|
|
6
6
|
import path from 'node:path';
|
|
7
7
|
import { createInterface } from 'node:readline';
|
|
8
8
|
import { buildInputProducer, cargoBuildInputs, gitWorkspaceRoot, writeBuildInputs, } from '@smoothbricks/build-inputs';
|
|
9
|
-
import { cargoWorkspace, describeRetentionError } from '@smoothbricks/cargo-retain';
|
|
10
9
|
import typia from 'typia';
|
|
10
|
+
import { CargoMetadataError, readCargoResolve } from '../../cargo-source-hash.js';
|
|
11
11
|
const validateReason = (() => {
|
|
12
12
|
let errors;
|
|
13
13
|
let _report;
|
|
@@ -166,17 +166,17 @@ export function cargoTriple(target) {
|
|
|
166
166
|
return glibcSuffix === null ? target : target.slice(0, glibcSuffix.index);
|
|
167
167
|
}
|
|
168
168
|
/**
|
|
169
|
-
* The remedy for a failed build of `target
|
|
170
|
-
*
|
|
171
|
-
*
|
|
169
|
+
* The remedy for a failed build of `target`, when rustc has no standard library for its triple: every managed shell
|
|
170
|
+
* carries the whole Linux rust-std set, so that rustc is not the one the checkout's shell provides. A build outside it
|
|
171
|
+
* fails in rustc, which names the missing target but not the shell. `libdir` is what
|
|
172
172
|
* `rustc --print target-libdir --target <triple>` printed, or null when rustc could not answer.
|
|
173
173
|
*/
|
|
174
|
-
export function missingRustStdRemedy(command, target,
|
|
175
|
-
if (
|
|
174
|
+
export function missingRustStdRemedy(command, target, libdir) {
|
|
175
|
+
if (libdir === null || libdir.exists)
|
|
176
176
|
return null;
|
|
177
|
-
return (`${command}: rustc has no standard library for ${cargoTriple(target)} (${libdir.path} is absent).
|
|
178
|
-
"Linux rust-std set
|
|
179
|
-
'
|
|
177
|
+
return (`${command}: rustc has no standard library for ${cargoTriple(target)} (${libdir.path} is absent). Every managed ` +
|
|
178
|
+
"shell carries the Linux rust-std set, so this rustc is not the checkout's shell's: enter it (direnv reload) and " +
|
|
179
|
+
'run nx run <project>:<target> again');
|
|
180
180
|
}
|
|
181
181
|
/** What `rustc --print target-libdir` names for the triple of `target`, and whether it exists; null if rustc failed. */
|
|
182
182
|
async function rustLibdir(target) {
|
|
@@ -256,10 +256,11 @@ export function depInfoPath(built) {
|
|
|
256
256
|
/**
|
|
257
257
|
* The input record (build-inputs.ts) of the build that wrote `built`, or why none can be made: the record
|
|
258
258
|
* `smoo-nx-build-inputs` writes after a macOS build, from the dep-info beside the artifact, so one link check judges
|
|
259
|
-
* both. `
|
|
260
|
-
* Nx task running the build, which the executor reads from its
|
|
259
|
+
* both. `cargo` is the resolve Cargo reports for the build's manifest, which names the workspace manifest and the
|
|
260
|
+
* lockfile closure the record states. `producer` is the Nx task running the build, which the executor reads from its
|
|
261
|
+
* environment.
|
|
261
262
|
*/
|
|
262
|
-
export function buildInputsOf(built, manifestPath,
|
|
263
|
+
export function buildInputsOf(built, manifestPath, cargo, producer) {
|
|
263
264
|
const directory = path.dirname(manifestPath);
|
|
264
265
|
const workspaceRoot = gitWorkspaceRoot(directory);
|
|
265
266
|
if (workspaceRoot === null) {
|
|
@@ -269,7 +270,13 @@ export function buildInputsOf(built, manifestPath, cargoRoot, producer) {
|
|
|
269
270
|
if (!existsSync(depInfo)) {
|
|
270
271
|
return { ok: false, error: `${depInfo} does not exist: cargo wrote no dep-info beside ${built}` };
|
|
271
272
|
}
|
|
272
|
-
|
|
273
|
+
let record;
|
|
274
|
+
try {
|
|
275
|
+
record = cargoBuildInputs(workspaceRoot, readFileSync(depInfo, 'utf8'), cargo, producer);
|
|
276
|
+
}
|
|
277
|
+
catch (error) {
|
|
278
|
+
return { ok: false, error: `${depInfo}: ${error instanceof Error ? error.message : String(error)}` };
|
|
279
|
+
}
|
|
273
280
|
if (record === null)
|
|
274
281
|
return { ok: false, error: `${depInfo} names no file of ${workspaceRoot}` };
|
|
275
282
|
return { ok: true, value: record };
|
|
@@ -327,7 +334,7 @@ export default async function cargoZigbuildExecutor(options, context) {
|
|
|
327
334
|
}
|
|
328
335
|
if (status.code !== 0) {
|
|
329
336
|
console.error(`${command}: exited with ${status.signal ?? `status ${status.code}`}`);
|
|
330
|
-
const remedy = missingRustStdRemedy(command, options.target,
|
|
337
|
+
const remedy = missingRustStdRemedy(command, options.target, await rustLibdir(options.target));
|
|
331
338
|
if (remedy !== null)
|
|
332
339
|
console.error(remedy);
|
|
333
340
|
return { success: false };
|
|
@@ -338,13 +345,19 @@ export default async function cargoZigbuildExecutor(options, context) {
|
|
|
338
345
|
return { success: false };
|
|
339
346
|
}
|
|
340
347
|
// From the dep-info cargo just wrote, before the artifact is copied: a build whose inputs cannot be named leaves the
|
|
341
|
-
// output as it was, and a source edited while the artifact is copied is not recorded with its new bytes.
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
348
|
+
// output as it was, and a source edited while the artifact is copied is not recorded with its new bytes. The resolve
|
|
349
|
+
// is the one the task's key was computed from (readCargoResolve), so the record states the key's lockfile closure.
|
|
350
|
+
let cargo;
|
|
351
|
+
try {
|
|
352
|
+
cargo = await readCargoResolve(manifestPath, context.root);
|
|
353
|
+
}
|
|
354
|
+
catch (error) {
|
|
355
|
+
if (!(error instanceof CargoMetadataError))
|
|
356
|
+
throw error;
|
|
357
|
+
console.error(`${command}: ${error.message}`);
|
|
345
358
|
return { success: false };
|
|
346
359
|
}
|
|
347
|
-
const inputs = buildInputsOf(built, manifestPath, cargo
|
|
360
|
+
const inputs = buildInputsOf(built, manifestPath, cargo, producer);
|
|
348
361
|
if (!inputs.ok) {
|
|
349
362
|
console.error(`${command}: ${inputs.error}`);
|
|
350
363
|
return { success: false };
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EAGnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EAGtB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EAGnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EAGtB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAC;AAyFlC,OAAO,EACL,KAAK,uBAAuB,EAG7B,MAAM,wBAAwB,CAAC;AA2BhC,gEAAgE;AAChE,eAAO,MAAM,aA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