@smoothbricks/nx-plugin 0.6.0 → 0.6.1
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 +13 -2
- package/dist/.build-inputs.json +13 -10
- package/dist/ensure-built-receipt.d.ts +9 -0
- package/dist/ensure-built-receipt.d.ts.map +1 -1
- package/dist/ensure-built-receipt.js +42 -1
- package/dist/executors/bounded-exec/cpu-pool-thread.d.ts +28 -0
- package/dist/executors/bounded-exec/cpu-pool-thread.d.ts.map +1 -0
- package/dist/executors/bounded-exec/cpu-pool-thread.js +20 -0
- package/dist/executors/bounded-exec/cpu-pool.d.ts +4 -4
- package/dist/executors/bounded-exec/cpu-pool.d.ts.map +1 -1
- package/dist/executors/bounded-exec/cpu-pool.js +7 -6
- package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
- package/dist/executors/bounded-exec/executor.js +20 -2
- package/dist/executors/bounded-exec/gateway-lease.d.ts +3 -2
- package/dist/executors/bounded-exec/gateway-lease.d.ts.map +1 -1
- package/dist/executors/bounded-exec/gateway-lease.js +23 -3
- package/dist/executors/bounded-exec/lease-wait.d.ts +23 -2
- package/dist/executors/bounded-exec/lease-wait.d.ts.map +1 -1
- package/dist/executors/bounded-exec/lease-wait.js +15 -11
- package/dist/executors/bounded-exec/mbx-pool.d.ts +31 -0
- package/dist/executors/bounded-exec/mbx-pool.d.ts.map +1 -0
- package/dist/executors/bounded-exec/mbx-pool.js +24 -0
- package/dist/executors/bounded-exec/run-cpu-pool.d.ts +9 -3
- package/dist/executors/bounded-exec/run-cpu-pool.d.ts.map +1 -1
- package/dist/executors/bounded-exec/run-cpu-pool.js +109 -12
- package/dist/executors/bounded-exec/verdict.d.ts +8 -0
- package/dist/executors/bounded-exec/verdict.d.ts.map +1 -1
- package/dist/executors/bounded-exec/verdict.js +1 -1
- package/dist/executors/typescript-emit/emit-overrides.d.ts +14 -0
- package/dist/executors/typescript-emit/emit-overrides.d.ts.map +1 -0
- package/dist/executors/typescript-emit/emit-overrides.js +24 -0
- package/dist/executors/typescript-emit/executor.d.ts.map +1 -1
- package/dist/executors/typescript-emit/executor.js +1 -19
- package/dist/managed-files/publish-workflow.js +14 -11
- package/dist/producer-receipts.d.ts.map +1 -1
- package/dist/producer-receipts.js +441 -1
- package/package.json +19 -2
- package/src/ensure-built-receipt.ts +41 -0
- package/src/executors/bounded-exec/cpu-pool-thread.ts +43 -0
- package/src/executors/bounded-exec/cpu-pool.ts +7 -6
- package/src/executors/bounded-exec/executor.ts +20 -2
- package/src/executors/bounded-exec/gateway-lease.ts +17 -7
- package/src/executors/bounded-exec/lease-wait.ts +39 -12
- package/src/executors/bounded-exec/mbx-pool.ts +48 -0
- package/src/executors/bounded-exec/run-cpu-pool.ts +117 -15
- package/src/executors/bounded-exec/verdict.ts +8 -1
- package/src/executors/typescript-emit/emit-overrides.ts +24 -0
- package/src/executors/typescript-emit/executor.ts +1 -20
- package/src/managed-files/publish-workflow.ts +20 -15
- package/src/producer-receipts.ts +28 -0
- package/test-timings.json +119 -118
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { RunnerKind } from './runner-sizing.js';
|
|
2
|
+
/**
|
|
3
|
+
* mbx's machine-wide pool as a leaf runner meets it (specs/cowshed/05_gateway.md, "Host scheduling", "Parallelism inside
|
|
4
|
+
* a job"). With the mbx capability the canonical environment names the one pool (`MBX_SCHEDULER=1` beside the shared
|
|
5
|
+
* `MBX_CACHE_DIR`) and the job's priority in it; that pool is the host's CPU and memory ledger, so no Nx run or leaf
|
|
6
|
+
* serves a pool of its own beside it.
|
|
7
|
+
*/
|
|
8
|
+
export interface MbxPool {
|
|
9
|
+
readonly priority: 'normal' | 'low';
|
|
10
|
+
}
|
|
11
|
+
/** The pool the environment names, or `null` where the project has no mbx and cowshed's own pools apply unchanged. */
|
|
12
|
+
export declare function mbxPool(environment: Readonly<NodeJS.ProcessEnv>): MbxPool | null;
|
|
13
|
+
/**
|
|
14
|
+
* How a leaf enters the pool once: a Cargo leaf runs through mbx, which admits its compiler and supported test work
|
|
15
|
+
* itself, so wrapping it would charge it twice; any other leaf holds `cpus` of the pool for its whole run through
|
|
16
|
+
* `mbx reserve`, `cpus` being the job's own count.
|
|
17
|
+
*/
|
|
18
|
+
export type MbxLeaf = {
|
|
19
|
+
readonly kind: 'cargo';
|
|
20
|
+
} | {
|
|
21
|
+
readonly kind: 'reserve';
|
|
22
|
+
readonly cpus: number;
|
|
23
|
+
readonly priority: 'normal' | 'low';
|
|
24
|
+
};
|
|
25
|
+
export declare function mbxLeaf(pool: MbxPool, kind: RunnerKind, want: number): MbxLeaf;
|
|
26
|
+
/**
|
|
27
|
+
* `command` as the shell runs it under its leaf's admission. `mbx` is the canonical environment's, whose realpath
|
|
28
|
+
* cowshed's admission proved to be the host's pinned mbx.
|
|
29
|
+
*/
|
|
30
|
+
export declare function withMbxLeaf(command: string, leaf: MbxLeaf): string;
|
|
31
|
+
//# sourceMappingURL=mbx-pool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mbx-pool.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/mbx-pool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD;;;;;GAKG;AACH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,KAAK,CAAC;CACrC;AAED,sHAAsH;AACtH,wBAAgB,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,OAAO,GAAG,IAAI,CAKhF;AAED;;;;GAIG;AACH,MAAM,MAAM,OAAO,GACf;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;CAAE,GAC1B;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,KAAK,CAAA;CAAE,CAAC;AAI7F,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAI9E;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,CAKlE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { shellQuote } from './verdict.js';
|
|
2
|
+
/** The pool the environment names, or `null` where the project has no mbx and cowshed's own pools apply unchanged. */
|
|
3
|
+
export function mbxPool(environment) {
|
|
4
|
+
if (environment.MBX_SCHEDULER !== '1' || !environment.MBX_CACHE_DIR) {
|
|
5
|
+
return null;
|
|
6
|
+
}
|
|
7
|
+
return { priority: environment.MBX_SCHEDULER_PRIORITY === 'normal' ? 'normal' : 'low' };
|
|
8
|
+
}
|
|
9
|
+
const CARGO_LEAVES = new Set(['cargo', 'cargo-mutants', 'nextest']);
|
|
10
|
+
export function mbxLeaf(pool, kind, want) {
|
|
11
|
+
return CARGO_LEAVES.has(kind)
|
|
12
|
+
? { kind: 'cargo' }
|
|
13
|
+
: { kind: 'reserve', cpus: Math.max(1, want), priority: pool.priority };
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* `command` as the shell runs it under its leaf's admission. `mbx` is the canonical environment's, whose realpath
|
|
17
|
+
* cowshed's admission proved to be the host's pinned mbx.
|
|
18
|
+
*/
|
|
19
|
+
export function withMbxLeaf(command, leaf) {
|
|
20
|
+
if (leaf.kind === 'cargo') {
|
|
21
|
+
return command;
|
|
22
|
+
}
|
|
23
|
+
return `mbx reserve --cpus ${leaf.cpus} --priority ${leaf.priority} -- /bin/sh -c ${shellQuote(command)}`;
|
|
24
|
+
}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import type { PostTasksExecutionContext, PreTasksExecutionContext } from 'nx/src/project-graph/plugins/public-api.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* The count of the pool a run is served, or null when it is served none. A run that inherits a pool (an enclosing
|
|
4
|
+
* executor's) takes from that one; with mbx, its pool is the host's one ledger, and a run pool beside it would count
|
|
5
|
+
* every leaf twice. Otherwise one token per core, or the inherited positive count when that is fewer.
|
|
6
|
+
*/
|
|
7
|
+
export declare function runPoolTokens(env: Readonly<NodeJS.ProcessEnv>, cores: number): number | null;
|
|
8
|
+
/**
|
|
9
|
+
* Serve `context`'s run a pool of `runPoolTokens` and publish it in `env`, which every task inherits, unless the run
|
|
10
|
+
* is served none. A pool that cannot be made is said, and the run's tasks are then sized only by the ceilings they
|
|
11
|
+
* inherit.
|
|
6
12
|
*/
|
|
7
13
|
export declare function serveRunCpuPool(context: Pick<PreTasksExecutionContext, 'id'>, env?: NodeJS.ProcessEnv, cores?: number): Promise<void>;
|
|
8
14
|
/** Close the pool `context`'s run was served, if it was served one. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-cpu-pool.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/run-cpu-pool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"run-cpu-pool.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/run-cpu-pool.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAmDtH;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM5F;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,IAAI,CAAC,wBAAwB,EAAE,IAAI,CAAC,EAC7C,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,KAAK,GAAE,MAA+B,GACrC,OAAO,CAAC,IAAI,CAAC,CAgBf;AAiED,uEAAuE;AACvE,wBAAsB,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,yBAAyB,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAUnG"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { availableParallelism } from 'node:os';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import { Worker } from 'node:worker_threads';
|
|
2
4
|
import { logger } from 'nx/src/devkit-exports.js';
|
|
3
|
-
import {
|
|
5
|
+
import { readInheritedCpuPool } from './cpu-pool.js';
|
|
6
|
+
import { mbxPool } from './mbx-pool.js';
|
|
4
7
|
import { CPU_TOKENS_ENV, parseInheritedTokens } from './runner-sizing.js';
|
|
5
8
|
/**
|
|
6
9
|
* The CPU pool of an Nx run (specs/cowshed/05_gateway.md, "Host scheduling", "Parallelism inside a job", "Every Nx run
|
|
@@ -16,30 +19,124 @@ import { CPU_TOKENS_ENV, parseInheritedTokens } from './runner-sizing.js';
|
|
|
16
19
|
* A run that inherits a pool (an enclosing executor's) takes from that one and serves none. Otherwise its pool holds
|
|
17
20
|
* one token per core, or the inherited positive `BOUNDED_EXEC_CPU_TOKENS` when that is fewer: inside a cowshed job
|
|
18
21
|
* that count is the job's own, so the job's `--want` bounds the run.
|
|
22
|
+
*
|
|
23
|
+
* The pool runs on a thread of its own (`cpu-pool-thread.ts`). The process that serves it, the Nx daemon when installed
|
|
24
|
+
* plugins load in it or the Nx CLI without one, hashes the run's tasks and builds its project graph in synchronous calls
|
|
25
|
+
* on its main thread. In a gate on 2026-10-28 one `hashPlans` ran for 14.2 s, and sixteen runners queued on a pool on
|
|
26
|
+
* that thread failed `SILENT` together while it was alive (05_gateway.md, "Deadlines"). The thread's event loop runs the
|
|
27
|
+
* pool alone; this module starts it, publishes the environment it reports and closes it.
|
|
19
28
|
*/
|
|
20
29
|
/** The pools this process serves, by Nx run id, until that run's `postTasksExecution`. */
|
|
21
30
|
const pools = new Map();
|
|
22
31
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
32
|
+
* The pool thread's module, in the form this one was loaded in: compiled JavaScript when Nx loads the plugin, its
|
|
33
|
+
* TypeScript source under Bun. A Bun worker starts without its parent's preloads, so from source the thread takes the
|
|
34
|
+
* transform preload this package's source needs, the one its bunfig names; compiled, it needs none.
|
|
35
|
+
*/
|
|
36
|
+
const FROM_SOURCE = import.meta.url.endsWith('.ts');
|
|
37
|
+
const THREAD_ENTRY = new URL(FROM_SOURCE ? './cpu-pool-thread.ts' : './cpu-pool-thread.js', import.meta.url);
|
|
38
|
+
const THREAD_PRELOAD = FROM_SOURCE
|
|
39
|
+
? { preload: [fileURLToPath(import.meta.resolve('@smoothbricks/validation/bun/preload'))] }
|
|
40
|
+
: {};
|
|
41
|
+
/**
|
|
42
|
+
* The count of the pool a run is served, or null when it is served none. A run that inherits a pool (an enclosing
|
|
43
|
+
* executor's) takes from that one; with mbx, its pool is the host's one ledger, and a run pool beside it would count
|
|
44
|
+
* every leaf twice. Otherwise one token per core, or the inherited positive count when that is fewer.
|
|
45
|
+
*/
|
|
46
|
+
export function runPoolTokens(env, cores) {
|
|
47
|
+
if (readInheritedCpuPool(env) !== null || mbxPool(env) !== null) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
const inherited = parseInheritedTokens(env[CPU_TOKENS_ENV]);
|
|
51
|
+
return inherited === null ? cores : Math.min(inherited, cores);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Serve `context`'s run a pool of `runPoolTokens` and publish it in `env`, which every task inherits, unless the run
|
|
55
|
+
* is served none. A pool that cannot be made is said, and the run's tasks are then sized only by the ceilings they
|
|
56
|
+
* inherit.
|
|
26
57
|
*/
|
|
27
58
|
export async function serveRunCpuPool(context, env = process.env, cores = availableParallelism()) {
|
|
28
|
-
|
|
59
|
+
const tokens = runPoolTokens(env, cores);
|
|
60
|
+
if (tokens === null) {
|
|
29
61
|
return;
|
|
30
62
|
}
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (!made.ok) {
|
|
35
|
-
logger.warn(`bounded-exec: this run's CPU pool failed (${made.error}); its tasks are sized only by the ceilings they inherit`);
|
|
63
|
+
const served = await servePoolThread(tokens);
|
|
64
|
+
if (!served.ok) {
|
|
65
|
+
logger.warn(`bounded-exec: this run's CPU pool failed (${served.error}); its tasks are sized only by the ceilings they inherit`);
|
|
36
66
|
return;
|
|
37
67
|
}
|
|
38
|
-
pools.set(context.id,
|
|
39
|
-
for (const [name, value] of Object.entries(
|
|
68
|
+
pools.set(context.id, served.pool);
|
|
69
|
+
for (const [name, value] of Object.entries(served.pool.environment)) {
|
|
40
70
|
env[name] = value;
|
|
41
71
|
}
|
|
42
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Start a pool of `tokens` on a thread of its own, and wait until it serves or says why it cannot. The first `close()`
|
|
75
|
+
* closes the pool and ends the thread; every call returns that close's outcome. A thread that throws or exits before it
|
|
76
|
+
* has said how its pool closed fails whichever wait is open, a later close returns that failure, and a thread lost while
|
|
77
|
+
* its pool serves is said at once.
|
|
78
|
+
*/
|
|
79
|
+
function servePoolThread(tokens) {
|
|
80
|
+
const thread = new Worker(THREAD_ENTRY, { workerData: { tokens }, ...THREAD_PRELOAD });
|
|
81
|
+
return new Promise((served) => {
|
|
82
|
+
let state = { kind: 'starting', served };
|
|
83
|
+
let closing;
|
|
84
|
+
// The pool is done with its thread once it has said how it ended: nothing of the pool's is left to run there.
|
|
85
|
+
const finish = (outcome) => {
|
|
86
|
+
const was = state;
|
|
87
|
+
state = { kind: 'ended', outcome };
|
|
88
|
+
void thread.terminate();
|
|
89
|
+
return was;
|
|
90
|
+
};
|
|
91
|
+
const lose = (why) => {
|
|
92
|
+
if (state.kind === 'ended') {
|
|
93
|
+
// The exit that finishing the thread caused.
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const error = `the CPU pool's thread ${why}`;
|
|
97
|
+
const was = finish({ ok: false, error });
|
|
98
|
+
if (was.kind === 'starting') {
|
|
99
|
+
was.served({ ok: false, error });
|
|
100
|
+
}
|
|
101
|
+
else if (was.kind === 'closing') {
|
|
102
|
+
was.closed({ ok: false, error });
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
logger.warn(`bounded-exec: this run's CPU pool stopped serving: ${error}`);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
const close = () => {
|
|
109
|
+
closing ??=
|
|
110
|
+
state.kind === 'ended'
|
|
111
|
+
? Promise.resolve(state.outcome)
|
|
112
|
+
: new Promise((closed) => {
|
|
113
|
+
state = { kind: 'closing', closed };
|
|
114
|
+
thread.postMessage(null);
|
|
115
|
+
});
|
|
116
|
+
return closing;
|
|
117
|
+
};
|
|
118
|
+
thread.on('message', (report) => {
|
|
119
|
+
const now = state;
|
|
120
|
+
if (now.kind === 'starting' && report.kind === 'serving') {
|
|
121
|
+
state = { kind: 'serving' };
|
|
122
|
+
now.served({ ok: true, pool: { environment: report.environment, close } });
|
|
123
|
+
}
|
|
124
|
+
else if (now.kind === 'starting' && report.kind === 'failed') {
|
|
125
|
+
finish({ ok: false, error: report.error });
|
|
126
|
+
now.served({ ok: false, error: report.error });
|
|
127
|
+
}
|
|
128
|
+
else if (now.kind === 'closing' && report.kind === 'closed') {
|
|
129
|
+
finish(report.outcome);
|
|
130
|
+
now.closed(report.outcome);
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
lose(`said ${report.kind} while ${now.kind}`);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
thread.on('error', (error) => lose(`failed: ${error instanceof Error ? error.message : String(error)}`));
|
|
137
|
+
thread.on('exit', (code) => lose(`exited with code ${code}`));
|
|
138
|
+
});
|
|
139
|
+
}
|
|
43
140
|
/** Close the pool `context`'s run was served, if it was served one. */
|
|
44
141
|
export async function closeRunCpuPool(context) {
|
|
45
142
|
const pool = pools.get(context.id);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CpuWaitRow } from './lease-wait.js';
|
|
1
2
|
import { type LockWait } from './lock-wait.js';
|
|
2
3
|
/**
|
|
3
4
|
* Why one bounded run ended, recorded per Nx task so a caller can tell a load-sensitive bound
|
|
@@ -84,6 +85,12 @@ export interface BoundedExecRecord {
|
|
|
84
85
|
readonly want: number;
|
|
85
86
|
readonly waitedMs: number;
|
|
86
87
|
};
|
|
88
|
+
/**
|
|
89
|
+
* The parent CPU pool's wait that expired and refused the run: its code, bound and elapsed time, the last heartbeat
|
|
90
|
+
* sequence it read, and the pool's socket and pid (specs/cowshed/05_gateway.md, "Deadlines"). Absent when no wait
|
|
91
|
+
* expired; written for the reader of a refused run, never read back.
|
|
92
|
+
*/
|
|
93
|
+
readonly cpuWait?: CpuWaitRow;
|
|
87
94
|
}
|
|
88
95
|
/** The Nx task a run executes as. Nx gives an executor no task id, only its parts. */
|
|
89
96
|
export interface BoundedExecTask {
|
|
@@ -187,6 +194,7 @@ export declare const GO_TEST: RegExp;
|
|
|
187
194
|
* that already chose bun's reporter, is returned unchanged and judged by its exit alone.
|
|
188
195
|
*/
|
|
189
196
|
export declare function withJunitReport(command: string, directory: string): Promise<string>;
|
|
197
|
+
export declare function shellQuote(value: string): string;
|
|
190
198
|
/** Remove a previous run's verdict and report, so neither can be read as this run's. */
|
|
191
199
|
export declare function clearTaskDirectory(directory: string): Promise<void>;
|
|
192
200
|
export declare function writeRecord(directory: string, record: BoundedExecRecord): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verdict.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/verdict.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,KAAK,QAAQ,EAAe,MAAM,gBAAgB,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAA;CAAE,GAC9B;IACE,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AAM,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,wBAAgB,eAAe,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAyBnE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CAgBjE"}
|
|
@@ -199,7 +199,7 @@ export async function withJunitReport(command, directory) {
|
|
|
199
199
|
await writeFile(config, `[profile.default.junit]\npath = ${JSON.stringify(report)}\n`);
|
|
200
200
|
return command.replace(NEXTEST_RUN, () => `nextest run --tool-config-file ${shellQuote(`smoo-report:${config}`)}`);
|
|
201
201
|
}
|
|
202
|
-
function shellQuote(value) {
|
|
202
|
+
export function shellQuote(value) {
|
|
203
203
|
return `'${value.replaceAll("'", "'\\''")}'`;
|
|
204
204
|
}
|
|
205
205
|
/** Remove a previous run's verdict and report, so neither can be read as this run's. */
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the emit changes about the project's own options: JavaScript and declarations from one non-incremental program.
|
|
3
|
+
* They ride the command line onto the project's tsconfig. A synthesized config would have to sit beside that tsconfig,
|
|
4
|
+
* because `${configDir}` and `paths` anchor to the directory of the config that consumes them, and a transient file there
|
|
5
|
+
* changes the directory listing a concurrent ttsc transform of another project proves while it compiles; that
|
|
6
|
+
* transform then refuses with `graph/accessible-entries-changed`.
|
|
7
|
+
*
|
|
8
|
+
* The one definition of how a package's TypeScript dist is emitted: the typescript-emit executor passes these, and so
|
|
9
|
+
* does every bootstrap that emits a dist before Nx can run (tooling/ttsc-emit.ts, the shell entry). A bootstrap that
|
|
10
|
+
* emitted incrementally wrote the tsconfig's tsBuildInfoFile into dist, a file no Nx output produces, and a release
|
|
11
|
+
* refused the verified dist at its merge boundary for it.
|
|
12
|
+
*/
|
|
13
|
+
export declare const EMIT_OVERRIDES: readonly string[];
|
|
14
|
+
//# sourceMappingURL=emit-overrides.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emit-overrides.d.ts","sourceRoot":"","sources":["../../../src/executors/typescript-emit/emit-overrides.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAW3C,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the emit changes about the project's own options: JavaScript and declarations from one non-incremental program.
|
|
3
|
+
* They ride the command line onto the project's tsconfig. A synthesized config would have to sit beside that tsconfig,
|
|
4
|
+
* because `${configDir}` and `paths` anchor to the directory of the config that consumes them, and a transient file there
|
|
5
|
+
* changes the directory listing a concurrent ttsc transform of another project proves while it compiles; that
|
|
6
|
+
* transform then refuses with `graph/accessible-entries-changed`.
|
|
7
|
+
*
|
|
8
|
+
* The one definition of how a package's TypeScript dist is emitted: the typescript-emit executor passes these, and so
|
|
9
|
+
* does every bootstrap that emits a dist before Nx can run (tooling/ttsc-emit.ts, the shell entry). A bootstrap that
|
|
10
|
+
* emitted incrementally wrote the tsconfig's tsBuildInfoFile into dist, a file no Nx output produces, and a release
|
|
11
|
+
* refused the verified dist at its merge boundary for it.
|
|
12
|
+
*/
|
|
13
|
+
export const EMIT_OVERRIDES = [
|
|
14
|
+
'--composite',
|
|
15
|
+
'false',
|
|
16
|
+
'--declaration',
|
|
17
|
+
'true',
|
|
18
|
+
'--declarationMap',
|
|
19
|
+
'true',
|
|
20
|
+
'--emitDeclarationOnly',
|
|
21
|
+
'false',
|
|
22
|
+
'--incremental',
|
|
23
|
+
'false',
|
|
24
|
+
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/executors/typescript-emit/executor.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,kBAAkB,EASxB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/executors/typescript-emit/executor.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,kBAAkB,EASxB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD,UAAU,qBAAqB;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,oBAAoB;IAC5B,OAAO,EAAE,OAAO,CAAC;CAClB;AAQD,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,MAAM,cAAc,GAAG,CAAC,UAAU,EAAE,kBAAkB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAElF,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAC5C,OAAO,EAAE,qBAAqB,EAC9B,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,oBAAoB,CAAC,CAG/B;AAED,kGAAkG;AAClG,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,qBAAqB,EAC9B,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,cAAc,EACtB,QAAQ,CAAC,EAAE,kBAAkB,GAC5B,OAAO,CAAC,oBAAoB,CAAC,CAwB/B"}
|
|
@@ -5,25 +5,7 @@ import { chmod, lstat, readdir, rm, rmdir, stat } from 'node:fs/promises';
|
|
|
5
5
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
6
6
|
import { buildInputProducer, buildInputRecord, gitWorkspaceRoot, globPathspec, pathspecFiles, workspacePath, writeBuildInputs, } from '@smoothbricks/build-inputs';
|
|
7
7
|
import { readJsonFile } from 'nx/src/devkit-exports.js';
|
|
8
|
-
|
|
9
|
-
* What the emit changes about the project's own options: JavaScript and declarations from one non-incremental program.
|
|
10
|
-
* They ride the command line onto the project's tsconfig. A synthesized config would have to sit beside that tsconfig,
|
|
11
|
-
* because `${configDir}` and `paths` anchor to the directory of the config that consumes them, and a transient file there
|
|
12
|
-
* changes the directory listing a concurrent ttsc transform of another project proves while it compiles; that
|
|
13
|
-
* transform then refuses with `graph/accessible-entries-changed`.
|
|
14
|
-
*/
|
|
15
|
-
const EMIT_OVERRIDES = [
|
|
16
|
-
'--composite',
|
|
17
|
-
'false',
|
|
18
|
-
'--declaration',
|
|
19
|
-
'true',
|
|
20
|
-
'--declarationMap',
|
|
21
|
-
'true',
|
|
22
|
-
'--emitDeclarationOnly',
|
|
23
|
-
'false',
|
|
24
|
-
'--incremental',
|
|
25
|
-
'false',
|
|
26
|
-
];
|
|
8
|
+
import { EMIT_OVERRIDES } from './emit-overrides.js';
|
|
27
9
|
export default function typescriptEmitExecutor(options, context) {
|
|
28
10
|
const producer = buildInputProducer(process.env);
|
|
29
11
|
return runTypeScriptEmit(options, context, runCompiler, producer);
|
|
@@ -432,10 +432,11 @@ function yamlLinesForStep(step, options) {
|
|
|
432
432
|
' #',
|
|
433
433
|
' # `nx` cannot do it: the project graph loads this very plugin, so',
|
|
434
434
|
' # `nx build nx-plugin` deadlocks on the executor it is building.',
|
|
435
|
-
' # ttsc needs only the package tsconfig --
|
|
436
|
-
' #
|
|
435
|
+
' # ttsc needs only the package tsconfig -- the bootstrap the shell entry',
|
|
436
|
+
' # runs (tooling/direnv/enter-shell.ts) -- and emits as the typescript-emit',
|
|
437
|
+
' # executor does (EMIT_OVERRIDES), so dist holds no build info.',
|
|
437
438
|
' working-directory: packages/nx-plugin',
|
|
438
|
-
' run: ttsc
|
|
439
|
+
' run: bun ../../tooling/ttsc-emit.ts',
|
|
439
440
|
];
|
|
440
441
|
case PublishWorkflowStepKind.RepairPendingReleases:
|
|
441
442
|
return [
|
|
@@ -487,8 +488,10 @@ function yamlLinesForStep(step, options) {
|
|
|
487
488
|
// Scoped to the release's candidates: the build phase and the packed-package
|
|
488
489
|
// checks cover what ships. Unscoped, validate compiled every project - on a
|
|
489
490
|
// release touching no Rust that was 3m30 of the cowshed CLI on the critical
|
|
490
|
-
// path, for a binary the release did not contain.
|
|
491
|
-
|
|
491
|
+
// path, for a binary the release did not contain. The publish job repairs
|
|
492
|
+
// pending releases before it publishes, so a pin at a tagged version the
|
|
493
|
+
// registry still lacks is published by then (--repairs-pending).
|
|
494
|
+
return conditionalRunStep(step, `smoo monorepo validate --projects "${githubExpression('steps.version.outputs.projects')}" --repairs-pending`);
|
|
492
495
|
case PublishWorkflowStepKind.TagRelease:
|
|
493
496
|
return tagReleaseStepLines(step.name);
|
|
494
497
|
case PublishWorkflowStepKind.PublishRelease:
|
|
@@ -614,18 +617,18 @@ function renderSingleJobPublishWorkflowSteps(steps, options) {
|
|
|
614
617
|
lines.push('');
|
|
615
618
|
if (producer && step.kind === PublishWorkflowStepKind.Checkout) {
|
|
616
619
|
// A declared producer always runs, even when the graph selects no platform family.
|
|
617
|
-
lines.push(
|
|
620
|
+
lines.push(` # Step ${stepNumber++}`, ...platformProducerPreflightStepLines(producer), '');
|
|
618
621
|
}
|
|
619
622
|
if (step.kind === PublishWorkflowStepKind.Build &&
|
|
620
623
|
(hasMacosPlatformTargets(options) || hasLinuxPlatformTargets(options))) {
|
|
621
|
-
lines.push(
|
|
624
|
+
lines.push(` # Step ${stepNumber++}`, ' - name: 🐧 Build supplemental Linux targets', " if: steps.version.outputs.mode != 'none'", ' run:', ' smoo github-ci nx-run-many --targets "' +
|
|
622
625
|
LINUX_PLATFORM_TARGET_GLOBS.join(',') +
|
|
623
626
|
'" --projects "' +
|
|
624
627
|
githubExpression('steps.version.outputs.projects') +
|
|
625
628
|
'" ' +
|
|
626
629
|
RELEASE_BUILD_ARGUMENT, '');
|
|
627
630
|
if (crossOnThisRunner) {
|
|
628
|
-
lines.push(
|
|
631
|
+
lines.push(` # Step ${stepNumber++}`, ' - name: 🍎 Build selected macOS and iOS release outputs', " if: steps.version.outputs.mode != 'none'", ' run:', ' smoo github-ci nx-run-many --targets "' +
|
|
629
632
|
macosPlatformFamilies(options).join(',') +
|
|
630
633
|
'" --projects "' +
|
|
631
634
|
githubExpression('steps.version.outputs.projects') +
|
|
@@ -634,7 +637,7 @@ function renderSingleJobPublishWorkflowSteps(steps, options) {
|
|
|
634
637
|
}
|
|
635
638
|
}
|
|
636
639
|
}
|
|
637
|
-
return mergeProducerStepEnvironment(lines, producer).join('\n').trimEnd()
|
|
640
|
+
return `${mergeProducerStepEnvironment(lines, producer).join('\n').trimEnd()}\n`;
|
|
638
641
|
}
|
|
639
642
|
function renderPlatformPublishWorkflowYaml(options) {
|
|
640
643
|
const deployInput = options.deploy === true
|
|
@@ -818,7 +821,7 @@ function renderMacosPlatformSteps(options) {
|
|
|
818
821
|
}
|
|
819
822
|
lines.push('', ` # Step ${stepNumber++}. Composite action internals do not affect top-level job step`, ' # anchors; update these comments if top-level steps move.', ' - name: 🧱 Setup Nix/devenv', ' id: setup', ' uses: ./.github/actions/setup-devenv');
|
|
820
823
|
if (isSmoothBricksCodebasePackageName(options.repoName)) {
|
|
821
|
-
lines.push('', ` # Step ${stepNumber++}`, ' - name: 🏗️ Build smoo Nx version actions', ' # Nx Release loads @smoothbricks/nx-plugin/version-actions through the', ' # export map in its own node process, and versioning runs before the', ' # build phase, so the hook must exist in dist first. Downstream', ' # consumers install the published package and skip this bootstrap.', ' #', ' # `nx` cannot do it: the project graph loads this very plugin, so', ' # `nx build nx-plugin` deadlocks on the executor it is building.', ' # ttsc needs only the package tsconfig --
|
|
824
|
+
lines.push('', ` # Step ${stepNumber++}`, ' - name: 🏗️ Build smoo Nx version actions', ' # Nx Release loads @smoothbricks/nx-plugin/version-actions through the', ' # export map in its own node process, and versioning runs before the', ' # build phase, so the hook must exist in dist first. Downstream', ' # consumers install the published package and skip this bootstrap.', ' #', ' # `nx` cannot do it: the project graph loads this very plugin, so', ' # `nx build nx-plugin` deadlocks on the executor it is building.', ' # ttsc needs only the package tsconfig -- the bootstrap the shell entry', ' # runs (tooling/direnv/enter-shell.ts) -- and emits as the typescript-emit', ' # executor does (EMIT_OVERRIDES), so dist holds no build info.', ' working-directory: packages/nx-plugin', ' run: bun ../../tooling/ttsc-emit.ts');
|
|
822
825
|
}
|
|
823
826
|
lines.push('', ` # Step ${stepNumber++}`, ' - name: 🤖 Configure release author', ' run:', ' git config user.name "github-actions[bot]" && git config user.email', ' "41898282+github-actions[bot]@users.noreply.github.com"', '', ` # Step ${stepNumber++}`, ' - name: 🔢 Version release', ' id: version', ' env:', ` SMOO_RELEASE_PROJECTS: ${githubExpression('inputs.projects')}`, ' run:', ` smoo release version --bump "${githubExpression('inputs.bump')}" --projects "$SMOO_RELEASE_PROJECTS" --dry-run "${githubExpression('inputs.dry_run')}" --github-output`, ' "$GITHUB_OUTPUT"');
|
|
824
827
|
const architectures = macosPlatformArchitectures(options);
|
|
@@ -877,7 +880,7 @@ function renderFinalLinuxPublishSteps(options) {
|
|
|
877
880
|
'merge-multiple: false',
|
|
878
881
|
]), '', ` # Step ${stepNumber++}`, ' - name: 🤖 Configure release author', ' run:', ' git config user.name "github-actions[bot]" && git config user.email', ' "41898282+github-actions[bot]@users.noreply.github.com"');
|
|
879
882
|
if (isSmoothBricksCodebasePackageName(options.repoName)) {
|
|
880
|
-
lines.push('', ` # Step ${stepNumber++}`, ' - name: 🏗️ Build smoo Nx version actions', ' # Nx Release loads @smoothbricks/nx-plugin/version-actions through the', ' # export map in its own node process, and that export has no source', ' # condition, so the next-prerelease bump inside smoo release publish', ' # needs dist/version-actions.cjs on disk. Downstream consumers install', ' # the published package and skip this bootstrap.', ' #', ' # `nx` cannot do it: the project graph loads this very plugin, so', ' # `nx build nx-plugin` deadlocks on the executor it is building.', ' # ttsc needs only the package tsconfig --
|
|
883
|
+
lines.push('', ` # Step ${stepNumber++}`, ' - name: 🏗️ Build smoo Nx version actions', ' # Nx Release loads @smoothbricks/nx-plugin/version-actions through the', ' # export map in its own node process, and that export has no source', ' # condition, so the next-prerelease bump inside smoo release publish', ' # needs dist/version-actions.cjs on disk. Downstream consumers install', ' # the published package and skip this bootstrap.', ' #', ' # `nx` cannot do it: the project graph loads this very plugin, so', ' # `nx build nx-plugin` deadlocks on the executor it is building.', ' # ttsc needs only the package tsconfig -- the bootstrap the shell entry', ' # runs (tooling/direnv/enter-shell.ts) -- and emits as the typescript-emit', ' # executor does (EMIT_OVERRIDES), so dist holds no build info.', ' working-directory: packages/nx-plugin', ' run: bun ../../tooling/ttsc-emit.ts');
|
|
881
884
|
}
|
|
882
885
|
lines.push('', ' # --- Repair -------------------------------------------------------------', '', ` # Step ${stepNumber++}`, ' - name: 🧯 Repair pending releases', ' run:', ` smoo release repair-pending --ref "${githubExpression('github.sha')}" --platform-outputs`, ` "${macosPlatformArtifactNames(options)
|
|
883
886
|
.map((name) => `${githubExpression('runner.temp')}/publish-artifacts/${name}/repairs`)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"producer-receipts.d.ts","sourceRoot":"","sources":["../src/producer-receipts.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnH,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AAEvF,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EAIxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAML,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"producer-receipts.d.ts","sourceRoot":"","sources":["../src/producer-receipts.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,mBAAmB,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