@smoothbricks/nx-plugin 0.6.0 → 0.6.2
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 +68 -56
- package/dist/.build-inputs.json +16 -13
- package/dist/cargo-retention-hook.d.ts +8 -1
- package/dist/cargo-retention-hook.d.ts.map +1 -1
- package/dist/cargo-retention-hook.js +12 -1
- 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/hang-diagnostics.d.ts.map +1 -1
- package/dist/executors/bounded-exec/hang-diagnostics.js +25 -1
- 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/files.d.ts.map +1 -1
- package/dist/managed-files/files.js +6 -0
- 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/managed/raw/envrc +15 -0
- package/managed/raw/tooling/direnv/developer-links.ts +12 -1
- package/managed/raw/tooling/direnv/devenv.smoo.nix +21 -8
- package/managed/raw/tooling/direnv/linked-snapshots.ts +50 -13
- package/managed/raw/tooling/direnv/setup-environment.ts +23 -11
- package/managed/raw/tooling/git-hooks/pre-push.sh +4 -1
- package/managed/raw/tooling/git-reword-commit +151 -0
- package/package.json +22 -5
- package/src/cargo-retention-hook.ts +12 -1
- 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/hang-diagnostics.ts +28 -1
- 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/files.ts +6 -0
- package/src/managed-files/publish-workflow.ts +20 -15
- package/src/producer-receipts.ts +28 -0
- package/test-timings.json +120 -118
package/src/producer-receipts.ts
CHANGED
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
providerReceipt,
|
|
36
36
|
type ReceiptEvidence,
|
|
37
37
|
receiptNode,
|
|
38
|
+
removeOrphanedOutputs,
|
|
38
39
|
} from './ensure-built-receipt.js';
|
|
39
40
|
import {
|
|
40
41
|
type CensusRead,
|
|
@@ -442,6 +443,24 @@ export async function preTasksExecution(
|
|
|
442
443
|
runs.set(context.id, { ok: false, detail: 'No default producer roots scheduled', rootIds });
|
|
443
444
|
return;
|
|
444
445
|
}
|
|
446
|
+
// Before anything runs: what the producer's previous receipt declared and this graph no longer declares goes, so a
|
|
447
|
+
// layout change leaves no orphan in a published closure (removeOrphanedOutputs).
|
|
448
|
+
for (const [target, graph] of graphs) {
|
|
449
|
+
const previous = previousTaskGraph(context.workspaceRoot, target);
|
|
450
|
+
if (previous === null) continue;
|
|
451
|
+
const removed = removeOrphanedOutputs(
|
|
452
|
+
context.workspaceRoot,
|
|
453
|
+
Object.values(previous.tasks),
|
|
454
|
+
Object.values(graph.tasks),
|
|
455
|
+
load('nx/src/native').expandOutputs,
|
|
456
|
+
(task) => projectGraph.nodes[task.target.project]?.data.targets?.[task.target.target] !== undefined,
|
|
457
|
+
);
|
|
458
|
+
if (removed.length > 0) {
|
|
459
|
+
process.stderr.write(
|
|
460
|
+
`producerReceipts: ${target}: removed outputs its previous receipt declared and no target declares now: ${removed.join(', ')}\n`,
|
|
461
|
+
);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
445
464
|
const outputs = new Map(
|
|
446
465
|
[...graphs].map(([target, graph]) => [
|
|
447
466
|
target,
|
|
@@ -637,6 +656,15 @@ function latestRefusal(root: string, target: string): string | null {
|
|
|
637
656
|
throw error;
|
|
638
657
|
}
|
|
639
658
|
}
|
|
659
|
+
/** The task graph the producer's previous published receipt recorded, whatever its validity now, or `null` when none reads. */
|
|
660
|
+
function previousTaskGraph(root: string, target: string): TaskGraph | null {
|
|
661
|
+
try {
|
|
662
|
+
const record = typia.json.isParse<PublishedReceipt>(readFileSync(recordPath(root, target, 'published'), 'utf8'));
|
|
663
|
+
return record === null || record.version !== 1 ? null : record.taskGraph;
|
|
664
|
+
} catch {
|
|
665
|
+
return null;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
640
668
|
function validatedReceipt(root: string, target: string): ReceiptEvidence<EnsureBuiltReceipt> {
|
|
641
669
|
const path = recordPath(root, target, 'published');
|
|
642
670
|
let text: string;
|
package/test-timings.json
CHANGED
|
@@ -2,130 +2,132 @@
|
|
|
2
2
|
"version": 1,
|
|
3
3
|
"files": {
|
|
4
4
|
"src/executors/bounded-exec/go-progress-host.test.ts": 113358,
|
|
5
|
-
"src/
|
|
5
|
+
"src/ensure-built.test.ts": 63589,
|
|
6
|
+
"src/owned-installation.test.ts": 52150,
|
|
7
|
+
"src/nx-daemon-validity.test.ts": 50650,
|
|
6
8
|
"src/executors/bounded-exec/cargo-progress-host.test.ts": 38973,
|
|
7
|
-
"src/
|
|
8
|
-
"src/
|
|
9
|
-
"src/
|
|
10
|
-
"src/
|
|
11
|
-
"src/
|
|
12
|
-
"src/
|
|
13
|
-
"src/cargo-source-hash.test.ts":
|
|
14
|
-
"src/
|
|
15
|
-
"src/
|
|
16
|
-
"src/
|
|
17
|
-
"src/
|
|
18
|
-
"src/
|
|
19
|
-
"src/
|
|
20
|
-
"src/executors/bounded-exec/ram-temp.test.ts":
|
|
21
|
-
"src/
|
|
22
|
-
"src/
|
|
23
|
-
"src/
|
|
24
|
-
"src/
|
|
25
|
-
"src/nx-daemon-idle-policy.test.ts":
|
|
26
|
-
"src/
|
|
27
|
-
"src/
|
|
28
|
-
"src/
|
|
29
|
-
"src/
|
|
30
|
-
"src/
|
|
31
|
-
"src/
|
|
32
|
-
"src/nx-
|
|
33
|
-
"src/
|
|
34
|
-
"src/nx-
|
|
35
|
-
"src/nx-
|
|
36
|
-
"src/nx-
|
|
37
|
-
"src/serial-group-wiring.test.ts":
|
|
38
|
-
"src/
|
|
39
|
-
"src/task-
|
|
40
|
-
"src/
|
|
41
|
-
"src/
|
|
42
|
-
"src/
|
|
43
|
-
"src/
|
|
44
|
-
"src/
|
|
45
|
-
"src/nx-
|
|
46
|
-
"src/
|
|
47
|
-
"src/
|
|
48
|
-
"src/
|
|
49
|
-
"src/
|
|
50
|
-
"src/
|
|
51
|
-
"src/
|
|
52
|
-
"src/
|
|
53
|
-
"src/
|
|
54
|
-
"src/
|
|
55
|
-
"src/nx-
|
|
56
|
-
"src/typescript-resolution.test.ts":
|
|
57
|
-
"src/
|
|
58
|
-
"src/
|
|
59
|
-
"src/
|
|
60
|
-
"src/
|
|
61
|
-
"src/
|
|
62
|
-
"src/
|
|
63
|
-
"src/
|
|
64
|
-
"src/
|
|
65
|
-
"src/
|
|
66
|
-
"src/nx-
|
|
67
|
-
"src/
|
|
68
|
-
"src/
|
|
69
|
-
"src/
|
|
70
|
-
"src/nx-
|
|
71
|
-
"src/
|
|
72
|
-
"src/
|
|
73
|
-
"src/
|
|
74
|
-
"src/
|
|
75
|
-
"src/
|
|
76
|
-
"src/
|
|
77
|
-
"src/
|
|
78
|
-
"src/
|
|
79
|
-
"src/
|
|
80
|
-
"src/executors/bounded-exec/
|
|
81
|
-
"src/
|
|
82
|
-
"src/version-actions.test.ts":
|
|
83
|
-
"src/
|
|
84
|
-
"src/
|
|
85
|
-
"src/
|
|
86
|
-
"src/
|
|
87
|
-
"src/managed-files/
|
|
88
|
-
"src/
|
|
89
|
-
"src/
|
|
90
|
-
"src/
|
|
91
|
-
"src/
|
|
92
|
-
"src/
|
|
93
|
-
"src/
|
|
94
|
-
"src/
|
|
9
|
+
"src/cargo-resolve-cache.test.ts": 35830,
|
|
10
|
+
"src/executors/bounded-exec/executor.test.ts": 27061,
|
|
11
|
+
"src/ensure-built-receipt.test.ts": 22597,
|
|
12
|
+
"src/index.test.ts": 17787,
|
|
13
|
+
"src/linked-snapshots.nx.test.ts": 17751,
|
|
14
|
+
"src/cargo-retention.test.ts": 17431,
|
|
15
|
+
"src/cargo-source-hash.test.ts": 16020,
|
|
16
|
+
"src/process-group.test.ts": 11471,
|
|
17
|
+
"src/cargo-closure-input.test.ts": 11140,
|
|
18
|
+
"src/nx-dot-input-policy.test.ts": 8998,
|
|
19
|
+
"src/nx-daemon-claim.test.ts": 8514,
|
|
20
|
+
"src/task-results.test.ts": 8194,
|
|
21
|
+
"src/executors/typescript-emit/executor.test.ts": 7952,
|
|
22
|
+
"src/executors/bounded-exec/ram-temp.test.ts": 7270,
|
|
23
|
+
"src/cargo-closure-key.test.ts": 6359,
|
|
24
|
+
"src/bounded-test-policy.test.ts": 5754,
|
|
25
|
+
"src/nextest-partitions.test.ts": 5407,
|
|
26
|
+
"src/nx-daemon-ignore-files.test.ts": 5306,
|
|
27
|
+
"src/nx-daemon-idle-policy.test.ts": 4132,
|
|
28
|
+
"src/managed-files/repo-path.test.ts": 3915,
|
|
29
|
+
"src/executors/bounded-exec/verdict.test.ts": 3665,
|
|
30
|
+
"src/runtime-input.test.ts": 3653,
|
|
31
|
+
"src/managed-files/forgejo-artifact.test.ts": 3633,
|
|
32
|
+
"src/cargo-workspace.test.ts": 3380,
|
|
33
|
+
"src/nx-daemon-start-never.test.ts": 3312,
|
|
34
|
+
"src/nx-project-graph-errors.test.ts": 3146,
|
|
35
|
+
"src/nx-task-output-lease.test.ts": 3142,
|
|
36
|
+
"src/nx-daemon-watch-filter.test.ts": 2746,
|
|
37
|
+
"src/nx-cache-restore-mtime.test.ts": 2727,
|
|
38
|
+
"src/nx-remote-cache-outage.test.ts": 2659,
|
|
39
|
+
"src/serial-group-wiring.test.ts": 2245,
|
|
40
|
+
"src/task-history-namespace.test.ts": 2160,
|
|
41
|
+
"src/nx-skipped-task-exit.test.ts": 2119,
|
|
42
|
+
"src/managed-files/generator.test.ts": 1989,
|
|
43
|
+
"src/nx-cache-kept-outputs.test.ts": 1953,
|
|
44
|
+
"src/nx-plugin-load-errors.test.ts": 1914,
|
|
45
|
+
"src/nx-files-archive-racy.test.ts": 1890,
|
|
46
|
+
"src/task-graph-policy.nx.test.ts": 1719,
|
|
47
|
+
"src/nx-use-local.test.ts": 1694,
|
|
48
|
+
"src/nx-daemon-env-identity.test.ts": 1653,
|
|
49
|
+
"src/typecheck-test-policy.test.ts": 1635,
|
|
50
|
+
"src/cross-check-policy.test.ts": 1506,
|
|
51
|
+
"src/managed-files/managed-format-json.test.ts": 1422,
|
|
52
|
+
"src/graph-input-contract.test.ts": 1406,
|
|
53
|
+
"src/test-walk-policy.test.ts": 1330,
|
|
54
|
+
"src/cargo-build-script-env.test.ts": 1286,
|
|
55
|
+
"src/nextest-code-bound.test.ts": 1178,
|
|
56
|
+
"src/nx-foreign-workspace-env.test.ts": 1117,
|
|
57
|
+
"src/bin/smoo-nx-bound-failures.test.ts": 1046,
|
|
58
|
+
"src/typescript-resolution.test.ts": 1001,
|
|
59
|
+
"src/testing.test.ts": 900,
|
|
60
|
+
"src/cargo-child-kill.test.ts": 867,
|
|
61
|
+
"src/nx-resident-graph-workers.test.ts": 778,
|
|
62
|
+
"src/executors/all-verdicts/executor.test.ts": 735,
|
|
63
|
+
"src/nx-failure-life-cycles.test.ts": 689,
|
|
64
|
+
"src/nx-incomplete-run-summary.test.ts": 667,
|
|
65
|
+
"src/nx-critical-path-schedule.test.ts": 662,
|
|
66
|
+
"src/package-target-policy.test.ts": 590,
|
|
67
|
+
"src/bun-bootstrap.test.ts": 547,
|
|
68
|
+
"src/nx-store-resolution.test.ts": 537,
|
|
69
|
+
"src/executors/bounded-exec/runner-hook.test.ts": 530,
|
|
70
|
+
"src/nx-cache-bound.test.ts": 516,
|
|
71
|
+
"src/test-clock-policy.test.ts": 425,
|
|
72
|
+
"src/nx-raw-inputs.test.ts": 424,
|
|
73
|
+
"src/lock-scope.test.ts": 409,
|
|
74
|
+
"src/managed-files/unserved-workspace-hooks.test.ts": 394,
|
|
75
|
+
"src/executors/cargo-zigbuild/executor.test.ts": 392,
|
|
76
|
+
"src/forbidden-spelling-policy.test.ts": 388,
|
|
77
|
+
"src/managed-files/github-host-cache-isolation.test.ts": 365,
|
|
78
|
+
"src/executors/scriptc-native/executor.test.ts": 362,
|
|
79
|
+
"src/ensure-built-witness.test.ts": 361,
|
|
80
|
+
"src/executors/bounded-exec/hang-diagnostics.test.ts": 347,
|
|
81
|
+
"src/nx-daemon-root-normalization.test.ts": 307,
|
|
82
|
+
"src/executors/bounded-exec/runtime-pin.test.ts": 136,
|
|
83
|
+
"src/test-timings.test.ts": 135,
|
|
84
|
+
"src/version-actions.test.ts": 132,
|
|
85
|
+
"src/generators/make-public/generator.test.ts": 131,
|
|
86
|
+
"src/managed-files/cache-ttsc-plugins.test.ts": 131,
|
|
87
|
+
"src/build-state-output-policy.test.ts": 130,
|
|
88
|
+
"src/release-config-policy.test.ts": 120,
|
|
89
|
+
"src/managed-files/setup-devenv-free-disk.test.ts": 114,
|
|
90
|
+
"src/cargo-toolchain-paths.test.ts": 110,
|
|
91
|
+
"src/executors/bounded-exec/cpu-pool.test.ts": 101,
|
|
92
|
+
"src/cargo-closure-filesets.test.ts": 98,
|
|
93
|
+
"src/producer-receipts.test.ts": 83,
|
|
94
|
+
"src/workspace-config-policy.test.ts": 80,
|
|
95
|
+
"src/nx-state-location.test.ts": 57,
|
|
96
|
+
"src/manifest-hash.test.ts": 53,
|
|
97
|
+
"src/wait-why-policy.test.ts": 40,
|
|
98
|
+
"src/executors/bounded-exec/ram-provenance.test.ts": 38,
|
|
99
|
+
"src/executors/bounded-exec/run-cpu-pool.test.ts": 38,
|
|
100
|
+
"src/executors/bounded-exec/disk-lease.test.ts": 33,
|
|
101
|
+
"src/managed-files/tree-permissions.test.ts": 33,
|
|
95
102
|
"src/executors/nextest-group/executor.test.ts": 28,
|
|
96
|
-
"src/executors/bounded-exec/
|
|
97
|
-
"src/
|
|
98
|
-
"src/
|
|
99
|
-
"src/
|
|
100
|
-
"src/generators/bun-test-tracing/generator.test.ts":
|
|
101
|
-
"src/
|
|
102
|
-
"src/generators/bounded-test-targets/generator.test.ts":
|
|
103
|
-
"src/executors/bounded-exec/
|
|
104
|
-
"src/
|
|
105
|
-
"src/
|
|
106
|
-
"src/
|
|
107
|
-
"src/
|
|
108
|
-
"src/
|
|
109
|
-
"src/
|
|
110
|
-
"src/
|
|
111
|
-
"src/
|
|
112
|
-
"src/disk-command-policy.test.ts": 9,
|
|
113
|
-
"src/executors/bounded-exec/ram-provenance.test.ts": 9,
|
|
103
|
+
"src/executors/bounded-exec/ram-temp-held.test.ts": 25,
|
|
104
|
+
"src/managed-files/trace-db-artifact.test.ts": 25,
|
|
105
|
+
"src/executors/clean-outputs/executor.test.ts": 23,
|
|
106
|
+
"src/managed-files/json-edit.test.ts": 22,
|
|
107
|
+
"src/generators/bun-test-tracing/generator.test.ts": 21,
|
|
108
|
+
"src/generators/create-package/generator.test.ts": 20,
|
|
109
|
+
"src/generators/bounded-test-targets/generator.test.ts": 17,
|
|
110
|
+
"src/executors/bounded-exec/ram-detach.test.ts": 15,
|
|
111
|
+
"src/cargo-closure-input.property.test.ts": 14,
|
|
112
|
+
"src/nx-daemon-idle-cpu.test.ts": 14,
|
|
113
|
+
"src/task-graph-policy.test.ts": 13,
|
|
114
|
+
"src/disk-command-policy.test.ts": 12,
|
|
115
|
+
"src/executors/bounded-exec/lock-wait.test.ts": 11,
|
|
116
|
+
"src/managed-files/tree.test.ts": 11,
|
|
117
|
+
"src/nx-project-resolution-cache.test.ts": 11,
|
|
118
|
+
"src/test-program.test.ts": 11,
|
|
114
119
|
"src/host-controller-wiring.test.ts": 9,
|
|
115
|
-
"src/
|
|
116
|
-
"src/
|
|
117
|
-
"src/
|
|
118
|
-
"src/
|
|
120
|
+
"src/managed-files/managed-content.test.ts": 9,
|
|
121
|
+
"src/nx-run-information.test.ts": 9,
|
|
122
|
+
"src/nx-task-graph-cycles.test.ts": 8,
|
|
123
|
+
"src/bun-file-packages.test.ts": 7,
|
|
119
124
|
"src/executors/bounded-exec/progress.test.ts": 7,
|
|
120
|
-
"src/executors/bounded-exec/ram-temp-held.test.ts": 7,
|
|
121
|
-
"src/managed-files/managed-content.test.ts": 7,
|
|
122
|
-
"src/managed-files/tree.test.ts": 7,
|
|
123
|
-
"src/nx-task-graph-cycles.test.ts": 7,
|
|
124
|
-
"src/bun-file-packages.test.ts": 6,
|
|
125
125
|
"src/executors/bounded-exec/ram-fixture.test.ts": 6,
|
|
126
|
+
"src/executors/bounded-exec/runner-lifecycle.test.ts": 6,
|
|
127
|
+
"src/executors/bounded-exec/runner-sizing.test.ts": 6,
|
|
128
|
+
"src/executors/bounded-exec/mbx-pool.test.ts": 5,
|
|
129
|
+
"src/cargo-retention-hook.test.ts": 5,
|
|
126
130
|
"src/executors/bounded-exec/owned-subtree.test.ts": 5,
|
|
127
|
-
"src/executors/bounded-exec/runner-sizing.test.ts": 5,
|
|
128
|
-
"src/executors/bounded-exec/runner-lifecycle.test.ts": 4,
|
|
129
131
|
"src/executors/bounded-exec/bounds.test.ts": 3
|
|
130
132
|
}
|
|
131
133
|
}
|