@smoothbricks/nx-plugin 0.4.25 → 0.4.26
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 +144 -41
- package/dist/bin/smoo-nx-exec.js +3 -14
- package/dist/cargo-closure-input.d.ts +13 -15
- package/dist/cargo-closure-input.d.ts.map +1 -1
- package/dist/cargo-closure-input.js +29 -37
- package/dist/cargo-source-hash.d.ts +12 -7
- package/dist/cargo-source-hash.d.ts.map +1 -1
- package/dist/cargo-source-hash.js +416 -32
- package/dist/cargo-workspace.d.ts +7 -7
- package/dist/cargo-workspace.js +8 -8
- package/dist/ensure-built.d.ts +6 -0
- package/dist/ensure-built.d.ts.map +1 -1
- package/dist/ensure-built.js +79 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +69 -96
- package/dist/managed-assets.d.ts +6 -0
- package/dist/managed-assets.d.ts.map +1 -1
- package/dist/manifest-hash.d.ts.map +1 -1
- package/dist/manifest-hash.js +6 -2
- package/dist/workspace-manifest.d.ts +0 -1
- package/dist/workspace-manifest.d.ts.map +1 -1
- package/managed/raw/envrc +6 -1
- package/managed/raw/tooling/direnv/developer-links.ts +43 -11
- package/managed/raw/tooling/direnv/devenv.smoo.nix +1 -0
- package/managed/raw/tooling/direnv/inherited-devenv.ts +69 -19
- package/managed/raw/tooling/direnv/setup-environment.ts +79 -2
- package/nextest.toml +3 -37
- package/package.json +2 -2
- package/src/__tests__/counted-cargo-process.ts +286 -0
- package/src/__tests__/counted-cargo.ts +711 -0
- package/src/__tests__/fixture-cargo-home.ts +36 -0
- package/src/__tests__/fixture-nx-env.ts +93 -3
- package/src/bin/smoo-nx-exec.ts +3 -14
- package/src/bounded-test-policy.test.ts +0 -1
- package/src/cargo-closure-input.test.ts +313 -15
- package/src/cargo-closure-input.ts +42 -50
- package/src/cargo-resolve-cache.test.ts +975 -0
- package/src/cargo-source-hash.test.ts +17 -3
- package/src/cargo-source-hash.ts +447 -37
- package/src/cargo-workspace.ts +8 -8
- package/src/ensure-built.test.ts +122 -20
- package/src/ensure-built.ts +82 -5
- package/src/index.test.ts +203 -107
- package/src/index.ts +86 -115
- package/src/managed-assets.ts +12 -0
- package/src/manifest-hash.ts +7 -2
- package/src/nextest-partitions.test.ts +150 -0
- package/src/nx-cache-bound.test.ts +114 -0
- package/src/nx-resident-graph-workers.test.ts +121 -0
- package/src/nx-store-resolution.test.ts +98 -0
- package/src/task-history-namespace.test.ts +183 -0
- package/src/workspace-manifest.ts +0 -1
- package/test-timings.json +30 -28
- package/src/__tests__/in-process-nx-index.ts +0 -9
package/dist/ensure-built.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
|
-
import { closeSync, existsSync, lstatSync, openSync, readdirSync, readlinkSync, readSync } from 'node:fs';
|
|
3
|
+
import { closeSync, existsSync, lstatSync, openSync, readdirSync, readlinkSync, readSync, realpathSync } from 'node:fs';
|
|
4
4
|
import { createRequire } from 'node:module';
|
|
5
|
-
import { isAbsolute, join, resolve } from 'node:path';
|
|
5
|
+
import { dirname, isAbsolute, join, resolve } from 'node:path';
|
|
6
6
|
function createWorkspaceNxRequire(workspaceRoot) {
|
|
7
7
|
const requireFromWorkspace = createRequire(join(workspaceRoot, 'package.json'));
|
|
8
8
|
return function requireNx(specifier) {
|
|
@@ -109,13 +109,22 @@ export async function ensureBuilt(options) {
|
|
|
109
109
|
const workspaceRoot = resolve(options.cwd);
|
|
110
110
|
const callerCwd = process.cwd();
|
|
111
111
|
const callerEnv = { ...process.env };
|
|
112
|
+
// Whether the environment this process was launched with belongs to the
|
|
113
|
+
// workspace asked for, decided before the chdir and the rebinding below. The
|
|
114
|
+
// caller's workspace is the one its own Nx would bind: `NX_WORKSPACE_ROOT_PATH`
|
|
115
|
+
// when set, else the nearest `nx.json` above where it stands (none, when it
|
|
116
|
+
// stands in no workspace).
|
|
117
|
+
const callerRoot = callerEnv.NX_WORKSPACE_ROOT_PATH
|
|
118
|
+
? resolve(callerCwd, callerEnv.NX_WORKSPACE_ROOT_PATH)
|
|
119
|
+
: findNxWorkspaceRoot(callerCwd);
|
|
120
|
+
const callerOwnsRoot = callerRoot !== null && isSameDirectory(callerRoot, workspaceRoot);
|
|
112
121
|
try {
|
|
113
122
|
// `cd <root> && nx run ...` is the invocation whose hashes are in the
|
|
114
123
|
// cache. Everything below — plugin hooks, `runtime` inputs, and the hasher,
|
|
115
124
|
// which keys against `process.cwd()` — has to see the same directory or the
|
|
116
125
|
// probe keys differently from the CLI and never hits.
|
|
117
126
|
process.chdir(workspaceRoot);
|
|
118
|
-
return await ensureBuiltInWorkspace(workspaceRoot, selector, options.onMiss ?? 'stream');
|
|
127
|
+
return await ensureBuiltInWorkspace(workspaceRoot, selector, options.onMiss ?? 'stream', callerOwnsRoot);
|
|
119
128
|
}
|
|
120
129
|
finally {
|
|
121
130
|
// Nx configures itself through the environment and this function runs
|
|
@@ -136,7 +145,71 @@ export async function ensureBuilt(options) {
|
|
|
136
145
|
}
|
|
137
146
|
}
|
|
138
147
|
}
|
|
139
|
-
|
|
148
|
+
/**
|
|
149
|
+
* Nx's own overrides for where one workspace keeps its daemon socket, daemon
|
|
150
|
+
* record, task database and cache. Each names the state of a single
|
|
151
|
+
* workspace, and Nx takes it literally: a daemon spawned for another root
|
|
152
|
+
* with `NX_SOCKET_DIR` inherited listens on, and on stop deletes, the socket
|
|
153
|
+
* directory of the workspace that exported it; with
|
|
154
|
+
* `NX_WORKSPACE_DATA_DIRECTORY` it reads and overwrites that workspace's
|
|
155
|
+
* daemon record and task database; and the cache has to move with the
|
|
156
|
+
* database or a hit names artifacts the run never wrote.
|
|
157
|
+
*/
|
|
158
|
+
const WORKSPACE_STATE_ENV_KEYS = [
|
|
159
|
+
'NX_SOCKET_DIR',
|
|
160
|
+
'NX_DAEMON_SOCKET_DIR',
|
|
161
|
+
'NX_WORKSPACE_DATA_DIRECTORY',
|
|
162
|
+
'NX_CACHE_DIRECTORY',
|
|
163
|
+
];
|
|
164
|
+
/**
|
|
165
|
+
* The nearest directory at or above `from` holding an `nx.json`, or null.
|
|
166
|
+
* The marker this wrapper roots a workspace at when `--workspace-root` is
|
|
167
|
+
* not given.
|
|
168
|
+
*/
|
|
169
|
+
export function findNxWorkspaceRoot(from) {
|
|
170
|
+
let directory = from;
|
|
171
|
+
for (;;) {
|
|
172
|
+
if (existsSync(join(directory, 'nx.json'))) {
|
|
173
|
+
return directory;
|
|
174
|
+
}
|
|
175
|
+
const parent = dirname(directory);
|
|
176
|
+
if (parent === directory) {
|
|
177
|
+
return null;
|
|
178
|
+
}
|
|
179
|
+
directory = parent;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
function isSameDirectory(left, right) {
|
|
183
|
+
try {
|
|
184
|
+
return realpathSync(left) === realpathSync(right);
|
|
185
|
+
}
|
|
186
|
+
catch {
|
|
187
|
+
// A path that cannot be resolved cannot be shown to be the same
|
|
188
|
+
// workspace, and "not the same" is the isolating answer.
|
|
189
|
+
return false;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Point every Nx this call starts — the daemon client loaded below and the
|
|
194
|
+
* `nx` CLI a miss spawns — at `workspaceRoot`, and give it that workspace's
|
|
195
|
+
* state locations. A caller that was set up for this same root keeps its
|
|
196
|
+
* overrides: they are the owner's cache and sandbox boundary. A caller set up
|
|
197
|
+
* for another root, or for none, passes none of them on, so Nx falls back to
|
|
198
|
+
* the per-root defaults. Nothing is reset or bypassed: the root's own daemon
|
|
199
|
+
* and cache are used as they stand. `ensureBuilt` restores the caller's
|
|
200
|
+
* environment when it returns.
|
|
201
|
+
*/
|
|
202
|
+
function isolateWorkspaceEnvironment(workspaceRoot, callerOwnsRoot) {
|
|
203
|
+
process.env.NX_WORKSPACE_ROOT_PATH = workspaceRoot;
|
|
204
|
+
if (callerOwnsRoot) {
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
for (const key of WORKSPACE_STATE_ENV_KEYS) {
|
|
208
|
+
delete process.env[key];
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
async function ensureBuiltInWorkspace(workspaceRoot, selector, onMiss, callerOwnsRoot) {
|
|
212
|
+
isolateWorkspaceEnvironment(workspaceRoot, callerOwnsRoot);
|
|
140
213
|
// The environment has precedence over nx.json. Avoid loading Nx at all on
|
|
141
214
|
// this explicit fallback path, which also lets a deliberately minimal
|
|
142
215
|
// checkout-local CLI stand in for Nx.
|
|
@@ -234,10 +307,10 @@ function selectorTaskId(selector) {
|
|
|
234
307
|
* a module-level singleton that reads `nx.json` from that root. So the root has
|
|
235
308
|
* to be bound before the first Nx module loads, which is why this module
|
|
236
309
|
* imports Nx dynamically throughout. A static import at the top of the file
|
|
237
|
-
* would bind the caller's launch directory instead.
|
|
310
|
+
* would bind the caller's launch directory instead. `isolateWorkspaceEnvironment`
|
|
311
|
+
* has already set `NX_WORKSPACE_ROOT_PATH`; this loads Nx and checks it took.
|
|
238
312
|
*/
|
|
239
313
|
function bindWorkspaceRoot(workspaceRoot, requireNx) {
|
|
240
|
-
process.env.NX_WORKSPACE_ROOT_PATH = workspaceRoot;
|
|
241
314
|
if (process.env.NX_PERF_LOGGING === 'true') {
|
|
242
315
|
// Installs Nx's PerformanceObserver, which reports every `performance
|
|
243
316
|
// .measure` this module and Nx itself record. Loading it unconditionally
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAGL,KAAK,aAAa,EAGnB,MAAM,0BAA0B,CAAC;AAalC,OAAO,EAKL,yBAAyB,EAa1B,MAAM,sBAAsB,CAAC;AA4B9B,OAAO,EAAE,yBAAyB,EAAE,CAAC;AAErC,gEAAgE;AAChE,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,uEAAuE;AACvE,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAqQlD,KAAK,gBAAgB,GAAG,OAAO,GAAG,KAAK,CAAC;AACxC,KAAK,gBAAgB,GAAG,OAAO,GAAG,OAAO,CAAC;AAE1C,UAAU,YAAY;IACpB,YAAY,EAAE,gBAAgB,CAAC;IAC/B,YAAY,EAAE,gBAAgB,CAAC;CAChC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAGL,KAAK,aAAa,EAGnB,MAAM,0BAA0B,CAAC;AAalC,OAAO,EAKL,yBAAyB,EAa1B,MAAM,sBAAsB,CAAC;AA4B9B,OAAO,EAAE,yBAAyB,EAAE,CAAC;AAErC,gEAAgE;AAChE,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,uEAAuE;AACvE,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAqQlD,KAAK,gBAAgB,GAAG,OAAO,GAAG,KAAK,CAAC;AACxC,KAAK,gBAAgB,GAAG,OAAO,GAAG,OAAO,CAAC;AAE1C,UAAU,YAAY;IACpB,YAAY,EAAE,gBAAgB,CAAC;IAC/B,YAAY,EAAE,gBAAgB,CAAC;CAChC;AAgJD,UAAU,oBAAqB,SAAQ,YAAY;IACjD,UAAU,EAAE,MAAM,CAAC;CACpB;AA0CD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,oBAAoB,GAAG,MAAM,CAEhF;AA6XD,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,GAAG,aAAa,CAEvG;AAED,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -335,6 +335,18 @@ function cargoRuntimeInput(projectRoot, command) {
|
|
|
335
335
|
const quotedRoot = `'${projectRoot.replaceAll("'", "'\"'\"'")}'`;
|
|
336
336
|
return { runtime: `cd ${quotedRoot} && ${command}` };
|
|
337
337
|
}
|
|
338
|
+
/**
|
|
339
|
+
* One shell command that runs `steps` in order and stops at the first failure.
|
|
340
|
+
*
|
|
341
|
+
* For a step that CONSUMES what an earlier step produces — the archive needs
|
|
342
|
+
* its directory, `wasm-bindgen` reads the `.wasm` that `cargo build` writes.
|
|
343
|
+
* The order lives in the command because that is the only place a
|
|
344
|
+
* producer-consumer pair inside one task can state it: `nx:run-commands`'
|
|
345
|
+
* `commands` array is a set of independent commands that Nx runs side by side.
|
|
346
|
+
*/
|
|
347
|
+
function sequence(steps) {
|
|
348
|
+
return steps.join(' && ');
|
|
349
|
+
}
|
|
338
350
|
/**
|
|
339
351
|
* Everything a target actually runs, as one string. `nx:run-commands` accepts
|
|
340
352
|
* either spelling and inference asks four questions of the text — does it run
|
|
@@ -436,11 +448,11 @@ function cargoWasmTargetDirectory(projectRoot, config, repoRooted, cargoWorkspac
|
|
|
436
448
|
function createCargoWasmTarget(projectRoot, config, repoRooted, cargoTargetDirectory) {
|
|
437
449
|
const outputDirectory = repoRooted ? posix.join(projectRoot, config.outputDirectory) : config.outputDirectory;
|
|
438
450
|
const cargoSelection = repoRooted ? `-p ${config.cargoPackage}` : `--manifest-path ${config.manifestPath}`;
|
|
439
|
-
const
|
|
451
|
+
const buildCommand = (profile) => sequence([
|
|
440
452
|
cargoFrozen(`build${CARGO_PROFILE_FLAG[profile]} --target wasm32-unknown-unknown ${cargoSelection}`),
|
|
441
453
|
...config.targets.map(({ bindgenTarget, outputName }) => `wasm-bindgen --target ${bindgenTarget} --out-dir ${outputDirectory}/${outputName} ` +
|
|
442
454
|
`${cargoTargetDirectory}/wasm32-unknown-unknown/${CARGO_PROFILE_OUTPUT_DIR[profile]}/${config.libraryName}.wasm`),
|
|
443
|
-
];
|
|
455
|
+
]);
|
|
444
456
|
return {
|
|
445
457
|
executor: 'nx:run-commands',
|
|
446
458
|
cache: true,
|
|
@@ -448,11 +460,10 @@ function createCargoWasmTarget(projectRoot, config, repoRooted, cargoTargetDirec
|
|
|
448
460
|
inputs: repoRooted ? REPO_ROOT_CARGO_OUTPUT_INPUTS : CARGO_OUTPUT_INPUTS,
|
|
449
461
|
outputs: [`{projectRoot}/${config.outputDirectory}`],
|
|
450
462
|
options: {
|
|
451
|
-
|
|
463
|
+
command: buildCommand('dev'),
|
|
452
464
|
cwd: repoRooted ? '.' : projectRoot,
|
|
453
|
-
parallel: false,
|
|
454
465
|
},
|
|
455
|
-
configurations: { [RELEASE_CONFIGURATION]: {
|
|
466
|
+
configurations: { [RELEASE_CONFIGURATION]: { command: buildCommand('release') } },
|
|
456
467
|
};
|
|
457
468
|
}
|
|
458
469
|
/**
|
|
@@ -462,11 +473,11 @@ function createCargoWasmTarget(projectRoot, config, repoRooted, cargoTargetDirec
|
|
|
462
473
|
* in its own unbounded target. Cargo reuses incremental compilation locally;
|
|
463
474
|
* Nx cannot cache this warming action without restoring shared mutable state.
|
|
464
475
|
*
|
|
465
|
-
* Cargo flocks one `target/` per invocation
|
|
466
|
-
*
|
|
467
|
-
*
|
|
468
|
-
*
|
|
469
|
-
*
|
|
476
|
+
* Cargo flocks one `target/` per invocation and owns that lock: a second cargo
|
|
477
|
+
* process on the same directory waits inside cargo ("Blocking waiting for file
|
|
478
|
+
* lock"). Inference adds no edge to keep writers apart — an edge says one
|
|
479
|
+
* target consumes another's output, and none of these do. These are unbounded
|
|
480
|
+
* `nx:run-commands` targets, so a wait is not charged against a test budget.
|
|
470
481
|
*
|
|
471
482
|
* Clippy runs ONCE over the whole workspace, in that same `target/`, rather
|
|
472
483
|
* than once per crate. Clippy of a crate is a check build of its whole
|
|
@@ -509,6 +520,9 @@ function createCargoTestCompileTarget(projectRoot) {
|
|
|
509
520
|
* Cached, unlike `cargo-test-compile`, because it produces a VALUE: one file,
|
|
510
521
|
* not a mutable build tree Nx would have to restore. `--workspace` matches the
|
|
511
522
|
* clippy selection exactly, so both gates unify features the same way.
|
|
523
|
+
*
|
|
524
|
+
* The directory and the archive are ONE command: nextest does not create the
|
|
525
|
+
* archive's parent, so the archive step consumes what the `mkdir` produced.
|
|
512
526
|
*/
|
|
513
527
|
function createCargoTestArchiveTarget(projectRoot, toolConfig) {
|
|
514
528
|
return {
|
|
@@ -517,12 +531,11 @@ function createCargoTestArchiveTarget(projectRoot, toolConfig) {
|
|
|
517
531
|
inputs: CARGO_INPUTS,
|
|
518
532
|
outputs: [`{projectRoot}/${CARGO_TEST_ARCHIVE_FILE}`],
|
|
519
533
|
options: {
|
|
520
|
-
|
|
534
|
+
command: sequence([
|
|
521
535
|
`mkdir -p ${posix.dirname(CARGO_TEST_ARCHIVE_FILE)}`,
|
|
522
536
|
cargoFrozen(`nextest archive --workspace --archive-file ${CARGO_TEST_ARCHIVE_FILE} --user-config-file none ${toolConfig}`),
|
|
523
|
-
],
|
|
537
|
+
]),
|
|
524
538
|
cwd: projectRoot,
|
|
525
|
-
parallel: false,
|
|
526
539
|
},
|
|
527
540
|
};
|
|
528
541
|
}
|
|
@@ -583,13 +596,12 @@ function createCargoCrossTestTargets(projectRoot, toolConfig, crossTarget, archi
|
|
|
583
596
|
outputs: [`{projectRoot}/${archiveFile}`],
|
|
584
597
|
dependsOn: [CARGO_FETCH_TARGET],
|
|
585
598
|
options: {
|
|
586
|
-
|
|
599
|
+
command: sequence([
|
|
587
600
|
`mkdir -p ${posix.dirname(archiveFile)}`,
|
|
588
601
|
`cargo-nextest nextest archive --workspace --target ${triple} --frozen ` +
|
|
589
602
|
`--archive-file ${archiveFile} --user-config-file none ${toolConfig}`,
|
|
590
|
-
],
|
|
603
|
+
]),
|
|
591
604
|
cwd: projectRoot,
|
|
592
|
-
parallel: false,
|
|
593
605
|
// `CARGO` is cargo's own driver variable and the only seam nextest
|
|
594
606
|
// offers: it shells out to `$CARGO metadata` and
|
|
595
607
|
// `$CARGO test --no-run --target <triple>`, so the declared script
|
|
@@ -703,9 +715,6 @@ function createNodesHandler(hostPlatform) {
|
|
|
703
715
|
errors.push([packageJsonPath, error instanceof Error ? error : new Error(String(error))]);
|
|
704
716
|
}
|
|
705
717
|
}));
|
|
706
|
-
// A project that failed before reaching its closure never awaited Cargo;
|
|
707
|
-
// no process this call started may outlive it.
|
|
708
|
-
await Promise.all(cargoWorkspaces.map((workspace) => workspace.closureSource));
|
|
709
718
|
if (errors.length > 0) {
|
|
710
719
|
throw new AggregateCreateNodesError(errors, results);
|
|
711
720
|
}
|
|
@@ -952,13 +961,12 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
952
961
|
// inferred list here, once when Nx merges the same declaration over this
|
|
953
962
|
// result — duplicating the very edges the spread exists to add.
|
|
954
963
|
//
|
|
955
|
-
// `dependsOn` REPLACES rather than unions. These lists
|
|
956
|
-
//
|
|
957
|
-
//
|
|
958
|
-
//
|
|
959
|
-
//
|
|
960
|
-
//
|
|
961
|
-
// make every inferred edge unremovable and a corrected order unrepresentable.
|
|
964
|
+
// `dependsOn` REPLACES rather than unions. These lists state what each target
|
|
965
|
+
// consumes — the fetched registry, the archive, the debug addon — and a
|
|
966
|
+
// package that must re-route one (build its artifact ahead of the test run,
|
|
967
|
+
// or drop `cargo-test-compile` because it compiles differently) can only say
|
|
968
|
+
// so by replacing the list; a union would make every inferred edge
|
|
969
|
+
// unremovable and a corrected order unrepresentable.
|
|
962
970
|
// Additive intent already has a spelling (`"..."` above), so a plugin-local
|
|
963
971
|
// additive key would be a second convention beside a working one.
|
|
964
972
|
//
|
|
@@ -1027,7 +1035,6 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1027
1035
|
options: {
|
|
1028
1036
|
commands: ['cargo fmt --all --check', CARGO_LINT_CLIPPY_COMMAND],
|
|
1029
1037
|
cwd: cargoWorkspaceRoot,
|
|
1030
|
-
parallel: false,
|
|
1031
1038
|
},
|
|
1032
1039
|
};
|
|
1033
1040
|
validationTargets.push('cargo-lint');
|
|
@@ -1160,8 +1167,8 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1160
1167
|
// Derived from the command text rather than a curated list of target names:
|
|
1161
1168
|
// the fact that makes a target need this is that it runs frozen cargo, so a
|
|
1162
1169
|
// frozen target added later is covered without anyone remembering to. The edge
|
|
1163
|
-
// goes on EVERY frozen target,
|
|
1164
|
-
//
|
|
1170
|
+
// goes on EVERY frozen target, so re-routing one target's `dependsOn` cannot
|
|
1171
|
+
// strip another's precondition.
|
|
1165
1172
|
// Package-rooted workspaces fetch beside their package.json; members of a
|
|
1166
1173
|
// repository-root workspace all depend on the root project's one fetch.
|
|
1167
1174
|
//
|
|
@@ -1184,15 +1191,14 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1184
1191
|
// there is nothing for Nx to restore in its place.
|
|
1185
1192
|
cache: false,
|
|
1186
1193
|
options: {
|
|
1194
|
+
// One fetch per manifest, independent of the others: Cargo's own
|
|
1195
|
+
// package-cache lock arbitrates the CARGO_HOME they share.
|
|
1187
1196
|
commands: [...frozenCargoManifests]
|
|
1188
1197
|
.sort()
|
|
1189
1198
|
.map((manifestPath) => manifestPath === 'Cargo.toml'
|
|
1190
1199
|
? CARGO_FETCH_COMMAND
|
|
1191
1200
|
: `${CARGO_FETCH_COMMAND} --manifest-path ${manifestPath}`),
|
|
1192
1201
|
cwd: projectRoot,
|
|
1193
|
-
// Two fetches into one CARGO_HOME contend on its package-cache flock;
|
|
1194
|
-
// serializing here spends the wait in Nx instead of inside cargo.
|
|
1195
|
-
parallel: false,
|
|
1196
1202
|
},
|
|
1197
1203
|
};
|
|
1198
1204
|
for (const [name, target] of Object.entries(targets)) {
|
|
@@ -1238,8 +1244,8 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1238
1244
|
cargoRuntimeInput(typeof cwd === 'string' ? cwd : projectRoot, `rustc -vV && cargo -V${versions}`),
|
|
1239
1245
|
];
|
|
1240
1246
|
}
|
|
1241
|
-
//
|
|
1242
|
-
//
|
|
1247
|
+
// `build` warms the test executables' compile; in a nested package that names
|
|
1248
|
+
// the root workspace's one compile.
|
|
1243
1249
|
const cargoTestCompileDependency = targets[CARGO_TEST_COMPILE_TARGET]
|
|
1244
1250
|
? CARGO_TEST_COMPILE_TARGET
|
|
1245
1251
|
: isCargoProject && cargoWorkspace
|
|
@@ -1249,18 +1255,10 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1249
1255
|
})
|
|
1250
1256
|
: null;
|
|
1251
1257
|
const napiDebug = targets['napi-debug'];
|
|
1252
|
-
if (napiDebug && cargoTestCompileDependency) {
|
|
1253
|
-
const dependsOn = napiDebug.dependsOn ?? [];
|
|
1254
|
-
if (!hasCargoTargetDependency(dependsOn, cargoTestCompileDependency)) {
|
|
1255
|
-
napiDebug.dependsOn = [...dependsOn, cargoTestCompileDependency];
|
|
1256
|
-
}
|
|
1257
|
-
}
|
|
1258
1258
|
if (napiDebug && cargoWorkspace) {
|
|
1259
1259
|
// A crate whose project also builds the debug cdylib runs its tests after
|
|
1260
1260
|
// that build: the tests dlopen what `napi-debug` writes into `target/debug`,
|
|
1261
|
-
// and an archived test binary still loads it from this tree.
|
|
1262
|
-
// chain gave the same guarantee by accident, to whichever crate happened to
|
|
1263
|
-
// be first; this states it for exactly the crates that own the artifact.
|
|
1261
|
+
// and an archived test binary still loads it from this tree.
|
|
1264
1262
|
for (const plan of cargoPackagePlans) {
|
|
1265
1263
|
for (const piece of plan.pieces) {
|
|
1266
1264
|
const target = targets[piece.targetName];
|
|
@@ -1277,7 +1275,7 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1277
1275
|
}
|
|
1278
1276
|
const dependsOn = target.dependsOn ?? [];
|
|
1279
1277
|
if (dependsOn.includes(CARGO_TEST_COMPILE_TARGET) && !dependsOn.includes('napi-debug')) {
|
|
1280
|
-
target.dependsOn = dependsOn
|
|
1278
|
+
target.dependsOn = [...dependsOn, 'napi-debug'];
|
|
1281
1279
|
}
|
|
1282
1280
|
}
|
|
1283
1281
|
const cargoTest = targets[CARGO_TEST_TARGET];
|
|
@@ -1290,33 +1288,9 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1290
1288
|
}
|
|
1291
1289
|
}
|
|
1292
1290
|
}
|
|
1293
|
-
//
|
|
1294
|
-
//
|
|
1295
|
-
|
|
1296
|
-
//
|
|
1297
|
-
// Only `cargo-napi` gets the ordering edge. A platform-suffixed target may NOT
|
|
1298
|
-
// have one: `validatePlatformTargetDependencies` (package-target-policy.ts:674)
|
|
1299
|
-
// walks each platform target's dependency closure and refuses any member of a
|
|
1300
|
-
// different family, because the publish flow builds and collects one platform
|
|
1301
|
-
// at a time — a `*-macos` collect that reached a familyless sibling would drag
|
|
1302
|
-
// in work the macOS runner has no business doing. `cargo-napi` carries no
|
|
1303
|
-
// platform suffix, so it is not scanned and the edge is legal there.
|
|
1304
|
-
//
|
|
1305
|
-
// The platform binaries therefore stay Nx siblings of cargo-test-compile and
|
|
1306
|
-
// serialize on cargo's flock instead of on a graph edge. That is the same
|
|
1307
|
-
// arrangement `cli-<arch>-<os>` and `napi-<arch>-<os>` already have with each
|
|
1308
|
-
// other — both `napi build` on one target dir — so this adds a third
|
|
1309
|
-
// participant to an existing wait, not a new hazard. The flock makes them wait;
|
|
1310
|
-
// it does not corrupt anything, and these are unbounded `nx:run-commands`
|
|
1311
|
-
// targets, so the wait is not charged against a test budget.
|
|
1312
|
-
const cargoWriterNames = hostPlatformTargetNames([...Object.keys(declaredTargets), ...Object.keys(targets)], hostPlatform);
|
|
1313
|
-
const cargoNapi = targets['cargo-napi'];
|
|
1314
|
-
if (cargoNapi && cargoTestCompileDependency) {
|
|
1315
|
-
const dependsOn = cargoNapi.dependsOn ?? [];
|
|
1316
|
-
if (!hasCargoTargetDependency(dependsOn, cargoTestCompileDependency)) {
|
|
1317
|
-
cargoNapi.dependsOn = [...dependsOn, cargoTestCompileDependency];
|
|
1318
|
-
}
|
|
1319
|
-
}
|
|
1291
|
+
// The inferring host's own platform binaries join the aggregate `build`;
|
|
1292
|
+
// publish still owns foreign platforms.
|
|
1293
|
+
const hostPlatformBinaries = hostPlatformTargetNames([...Object.keys(declaredTargets), ...Object.keys(targets)], hostPlatform);
|
|
1320
1294
|
// A deploy is never cached; the build half beside it always is.
|
|
1321
1295
|
//
|
|
1322
1296
|
// Nx's cache answers "did this exact input set already produce an output". A deploy's real
|
|
@@ -1395,9 +1369,7 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1395
1369
|
executor: 'nx:noop',
|
|
1396
1370
|
cache: true,
|
|
1397
1371
|
outputs: [],
|
|
1398
|
-
//
|
|
1399
|
-
// the two sources overlap; the Set keeps one edge per target while holding
|
|
1400
|
-
// the order the families are listed in.
|
|
1372
|
+
// One edge per target, in the order the sources are listed.
|
|
1401
1373
|
dependsOn: [
|
|
1402
1374
|
...new Set([
|
|
1403
1375
|
'^build',
|
|
@@ -1405,7 +1377,7 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1405
1377
|
// reuses its incremental state; Nx never restores that shared state.
|
|
1406
1378
|
...(cargoTestCompileDependency ? [cargoTestCompileDependency] : []),
|
|
1407
1379
|
...buildOutputTargetNames([...Object.keys(declaredTargets), ...Object.keys(targets)]),
|
|
1408
|
-
...
|
|
1380
|
+
...hostPlatformBinaries,
|
|
1409
1381
|
]),
|
|
1410
1382
|
],
|
|
1411
1383
|
};
|
|
@@ -1472,7 +1444,7 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1472
1444
|
],
|
|
1473
1445
|
...(lintCommands.length > 0
|
|
1474
1446
|
? {
|
|
1475
|
-
options: { commands: lintCommands, cwd: '.'
|
|
1447
|
+
options: { commands: lintCommands, cwd: '.' },
|
|
1476
1448
|
}
|
|
1477
1449
|
: {}),
|
|
1478
1450
|
};
|
|
@@ -1507,7 +1479,7 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1507
1479
|
return projectRoot === '.' || crate === projectRoot || crate.startsWith(`${projectRoot}/`);
|
|
1508
1480
|
}));
|
|
1509
1481
|
if (closureSources.length > 0) {
|
|
1510
|
-
namedInputs[CARGO_CLOSURE_INPUT] = await cargoClosureInputs(projectRoot,
|
|
1482
|
+
namedInputs[CARGO_CLOSURE_INPUT] = await cargoClosureInputs(projectRoot, closureSources.map((workspace) => workspace.closureSource));
|
|
1511
1483
|
}
|
|
1512
1484
|
return {
|
|
1513
1485
|
projects: {
|
|
@@ -1933,12 +1905,13 @@ async function resolveCargoWorkspaces(packageJsonPaths, workspaceRoot) {
|
|
|
1933
1905
|
});
|
|
1934
1906
|
}
|
|
1935
1907
|
if (pin !== null) {
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1908
|
+
for (let index = 1; index <= pkg.testShards; index += 1) {
|
|
1909
|
+
pieces.push({
|
|
1910
|
+
extra: ` --partition hash:${index}/${pkg.testShards}`,
|
|
1911
|
+
selector: `package(${pkg.name}) and (${pin})`,
|
|
1912
|
+
targetName: cargoTestPackageTargetName(pkg.name, `${CARGO_TEST_EXCEPTIONS_SUFFIX}-shard${index}`),
|
|
1913
|
+
});
|
|
1914
|
+
}
|
|
1942
1915
|
}
|
|
1943
1916
|
packages.push({ package: pkg, pieces });
|
|
1944
1917
|
}
|
|
@@ -1954,14 +1927,15 @@ async function resolveCargoWorkspaces(packageJsonPaths, workspaceRoot) {
|
|
|
1954
1927
|
// Started only once every workspace listed cleanly, so a listing that throws
|
|
1955
1928
|
// leaves no Cargo process behind.
|
|
1956
1929
|
const indexedManifests = indexedCargoManifests(workspaceRoot);
|
|
1957
|
-
return found.map((workspace) => ({
|
|
1930
|
+
return Promise.all(found.map(async (workspace) => ({
|
|
1958
1931
|
...workspace,
|
|
1959
|
-
closureSource: resolveCargoClosureSource(posix.join(workspace.projectRoot, 'Cargo.toml'), workspaceRoot, indexedManifests),
|
|
1960
|
-
}));
|
|
1932
|
+
closureSource: await resolveCargoClosureSource(posix.join(workspace.projectRoot, 'Cargo.toml'), workspaceRoot, indexedManifests),
|
|
1933
|
+
})));
|
|
1961
1934
|
}
|
|
1962
1935
|
/**
|
|
1963
1936
|
* One bounded target per crate; a crate that declares `smoothbricks.test.shards`
|
|
1964
|
-
* gets
|
|
1937
|
+
* gets that many ordinary and exceptional shards, so a class of tests with its
|
|
1938
|
+
* own time bound never delays an ordinary shard.
|
|
1965
1939
|
*
|
|
1966
1940
|
* Every piece EXECUTES, it never builds: it runs the binaries
|
|
1967
1941
|
* `cargo-test-archive` compiled once for the whole workspace. That is what
|
|
@@ -2003,12 +1977,11 @@ async function resolveCargoWorkspaces(packageJsonPaths, workspaceRoot) {
|
|
|
2003
1977
|
* time: a test that spawns `env!("CARGO_BIN_EXE_x")` holds the producing tree's
|
|
2004
1978
|
* path and must read the runtime variable instead to survive relocation.
|
|
2005
1979
|
*
|
|
2006
|
-
* nextest.toml singles some tests out with an override
|
|
2007
|
-
*
|
|
2008
|
-
*
|
|
2009
|
-
*
|
|
2010
|
-
*
|
|
2011
|
-
* depending on how the hash happened to fall.
|
|
1980
|
+
* nextest.toml singles some tests out with an override: a raised `slow-timeout`
|
|
1981
|
+
* marks a test whose cost is not the suite's. Those are lifted OUT of the hash
|
|
1982
|
+
* into their own hash-partitioned targets and the ordinary shards run the exact
|
|
1983
|
+
* complement, so which tests a shard holds stops depending on how the hash
|
|
1984
|
+
* happened to fall.
|
|
2012
1985
|
*
|
|
2013
1986
|
* The two filtersets are exact complements, so their union is the crate whatever
|
|
2014
1987
|
* either one matches. Every piece uses `--no-tests=pass`: a valid workspace
|
|
@@ -2022,9 +1995,9 @@ async function resolveCargoWorkspaces(packageJsonPaths, workspaceRoot) {
|
|
|
2022
1995
|
* Detecting that regression requires a separate coverage policy rather than
|
|
2023
1996
|
* making valid empty crates and shards fail execution.
|
|
2024
1997
|
*
|
|
2025
|
-
* Pieces fan out rather than chain
|
|
2026
|
-
*
|
|
2027
|
-
*
|
|
1998
|
+
* Pieces fan out rather than chain: a reused-build run writes nothing to cargo's
|
|
1999
|
+
* `target/`, so no piece waits on another. The one extraction per archive is
|
|
2000
|
+
* coordinated by `smoo-nx-nextest-extract` itself.
|
|
2028
2001
|
*/
|
|
2029
2002
|
async function addCargoTestTargets(targets, currentProjectName, projectRoot, workspaceRoot, workspace) {
|
|
2030
2003
|
const targetNames = [];
|
package/dist/managed-assets.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
/** Packaged assets, independent of the consumer's cwd and node_modules layout. */
|
|
2
2
|
export declare const managedAssetsRoot: string;
|
|
3
|
+
/** Explicit package-manager relink intent for the packaged bootstrap preservation helper. */
|
|
4
|
+
export interface KeepDeveloperLinksOptions {
|
|
5
|
+
readonly relink: readonly string[];
|
|
6
|
+
}
|
|
7
|
+
/** The managed helper's callable contract; type-only consumers need no installed runtime import. */
|
|
8
|
+
export type KeepDeveloperLinks = <T>(root: string, install: () => Promise<T>, options?: KeepDeveloperLinksOptions) => Promise<T>;
|
|
3
9
|
//# sourceMappingURL=managed-assets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"managed-assets.d.ts","sourceRoot":"","sources":["../src/managed-assets.ts"],"names":[],"mappings":"AAEA,kFAAkF;AAClF,eAAO,MAAM,iBAAiB,QAAyD,CAAC"}
|
|
1
|
+
{"version":3,"file":"managed-assets.d.ts","sourceRoot":"","sources":["../src/managed-assets.ts"],"names":[],"mappings":"AAEA,kFAAkF;AAClF,eAAO,MAAM,iBAAiB,QAAyD,CAAC;AAExF,6FAA6F;AAC7F,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAED,oGAAoG;AACpG,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,EACjC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACzB,OAAO,CAAC,EAAE,yBAAyB,KAChC,OAAO,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-hash.d.ts","sourceRoot":"","sources":["../src/manifest-hash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"manifest-hash.d.ts","sourceRoot":"","sources":["../src/manifest-hash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAqEpD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CA8CjF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,6BAA6B,CAAC,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiB/G"}
|
package/dist/manifest-hash.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import { readFile } from 'node:fs/promises';
|
|
3
3
|
import { join, posix } from 'node:path';
|
|
4
|
-
import { globWithWorkspaceContext } from 'nx/src/utils/workspace-context.js';
|
|
4
|
+
import { globWithWorkspaceContext, globWithWorkspaceContextSync } from 'nx/src/utils/workspace-context.js';
|
|
5
|
+
import { workspaceRoot as daemonWorkspaceRoot } from 'nx/src/utils/workspace-root.js';
|
|
5
6
|
/**
|
|
6
7
|
* A release rewrites `version` in every manifest it publishes. Those manifests
|
|
7
8
|
* are inputs of the validation targets, so a publish run misses the cache for
|
|
@@ -172,7 +173,10 @@ export async function hashVersionlessCrateManifests(projectRoot, workspaceRoot)
|
|
|
172
173
|
*/
|
|
173
174
|
async function listCrateManifests(projectRoot, workspaceRoot) {
|
|
174
175
|
const prefix = projectRoot === '.' ? '' : `${posix.normalize(projectRoot)}/`;
|
|
175
|
-
const
|
|
176
|
+
const pattern = [`${prefix}**/${CARGO_MANIFEST}`];
|
|
177
|
+
const files = workspaceRoot === daemonWorkspaceRoot
|
|
178
|
+
? await globWithWorkspaceContext(workspaceRoot, pattern)
|
|
179
|
+
: globWithWorkspaceContextSync(workspaceRoot, pattern);
|
|
176
180
|
return files.map((file) => file.slice(prefix.length)).sort();
|
|
177
181
|
}
|
|
178
182
|
/** `from` is just past the `[`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-manifest.d.ts","sourceRoot":"","sources":["../src/workspace-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,sDAAsD;AACtD,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/C,2DAA2D;AAC3D,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;AAE3C,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,KAAK,IAAI,aAAa,CAAC,CAAC,CAAC,CAEnE;AAED,mHAAmH;AACnH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAE1D;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,GACvC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,GACvB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAC;AAEvD,oEAAoE;AACpE,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;AAEhE,qGAAqG;AACrG,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEhF,MAAM,WAAW,iBAA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AM,EAAE,cAAc,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,MAAM;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;CAChF;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,iBAAiB,GAAG,SAAS,GAAG,aAAa,CAAC,MAAM,CAAC,CAE3F"}
|
package/managed/raw/envrc
CHANGED
|
@@ -38,7 +38,12 @@ watch_file tooling/direnv/inherited-devenv.ts
|
|
|
38
38
|
smoo_inherited_devenv() {
|
|
39
39
|
bun "$project_root/tooling/direnv/inherited-devenv.ts" "$project_root" "$@"
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
# bun comes from this workspace's own evaluated devenv profile. A checkout
|
|
42
|
+
# entered for the first time has none yet, and neither cowshed nor the host
|
|
43
|
+
# lends one, so devenv then evaluates in place.
|
|
44
|
+
if has bun; then
|
|
45
|
+
DEVENV_BIN=smoo_inherited_devenv
|
|
46
|
+
fi
|
|
42
47
|
cd tooling/direnv
|
|
43
48
|
. envrc.sh
|
|
44
49
|
unset -f smoo_inherited_devenv
|