carrick 0.3.86 → 0.3.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/contract.d.ts +9 -5
- package/dist/contract.js.map +1 -1
- package/dist/init/hosted.d.ts +100 -8
- package/dist/init/hosted.js +234 -33
- package/dist/init/hosted.js.map +1 -1
- package/dist/init/output.d.ts +5 -3
- package/dist/init/output.js +12 -4
- package/dist/init/output.js.map +1 -1
- package/dist/init/run.js +12 -6
- package/dist/init/run.js.map +1 -1
- package/package.json +6 -6
- package/sidecar/dist/src/bundler.d.ts +5 -0
- package/sidecar/dist/src/bundler.js +13 -3
- package/sidecar/dist/src/capture/machinery.d.ts +1 -1
- package/sidecar/dist/src/capture/machinery.js +1 -1
- package/sidecar/dist/src/capture/repair-dangling.d.ts +46 -0
- package/sidecar/dist/src/capture/repair-dangling.js +162 -0
- package/sidecar/dist/src/capture/self-check.js +61 -5
- package/sidecar/dist/src/definition-resolver.d.ts +7 -0
- package/sidecar/dist/src/definition-resolver.js +43 -4
- package/sidecar/dist/src/origin.d.ts +45 -0
- package/sidecar/dist/src/origin.js +86 -0
- package/sidecar/dist/src/type-inferrer.d.ts +8 -30
- package/sidecar/dist/src/type-inferrer.js +20 -76
- package/sidecar/dist/src/type-structural-expander.d.ts +38 -6
- package/sidecar/dist/src/type-structural-expander.js +61 -32
- package/templates/skills/carrick-census.md +5 -0
- package/templates/skills/carrick-impact.md +11 -4
package/dist/contract.d.ts
CHANGED
|
@@ -124,9 +124,10 @@ export type CheckResult = {
|
|
|
124
124
|
boundary_lines?: string[];
|
|
125
125
|
/**
|
|
126
126
|
* What a `--recheck` call did about this file having moved past the index
|
|
127
|
-
* (carrick#1036).
|
|
128
|
-
*
|
|
129
|
-
*
|
|
127
|
+
* (carrick#1036). Present on every `check --recheck`, including the ones
|
|
128
|
+
* where nothing ran — a file the tree has not changed, or one no longer on
|
|
129
|
+
* disk — so a reader of `ran` never meets an absent key (carrick#1374).
|
|
130
|
+
* Absent only on a read that did not ask for a re-check.
|
|
130
131
|
*/
|
|
131
132
|
recheck?: Recheck;
|
|
132
133
|
};
|
|
@@ -136,13 +137,16 @@ export type Recheck = {
|
|
|
136
137
|
* `extraction+types` — re-extracted, re-joined, and at least one row carries
|
|
137
138
|
* a type verdict. `extraction` — the same, and no row of this file carries
|
|
138
139
|
* one: nothing pairs with it, or its pairs were not both resolved.
|
|
139
|
-
* `none` — the items are the indexed ones
|
|
140
|
+
* `none` — the items are the indexed ones, `stale_since` says how old and
|
|
141
|
+
* `reason` says why nothing ran: the file has not changed, it is no longer
|
|
142
|
+
* on disk, or a warranted re-check did not finish (carrick#1374).
|
|
140
143
|
*/
|
|
141
144
|
ran: "extraction+types" | "extraction" | "none";
|
|
145
|
+
/** Wall time of the re-check. Zero where none was attempted. */
|
|
142
146
|
elapsed_ms: number;
|
|
143
147
|
/** RFC 3339 time the items were computed. Only on a `none`. */
|
|
144
148
|
stale_since?: string;
|
|
145
|
-
/** Why the re-check did not run. Only on a `none
|
|
149
|
+
/** Why the re-check did not run. Only on a `none`, and always there. */
|
|
146
150
|
reason?: string;
|
|
147
151
|
/**
|
|
148
152
|
* Functions the re-extracted file declares that the index does not hold
|
package/dist/contract.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,EAAE;AACF,yDAAyD;AACzD,+EAA+E;AAC/E,4DAA4D;AAC5D,6EAA6E;AAC7E,6EAA6E;AAC7E,+EAA+E;AAC/E,0CAA0C;
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,EAAE;AACF,yDAAyD;AACzD,+EAA+E;AAC/E,4DAA4D;AAC5D,6EAA6E;AAC7E,6EAA6E;AAC7E,+EAA+E;AAC/E,0CAA0C;AAqL1C,MAAM,CAAC,MA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AE,SAAS;QACrF,IAAI,OAAO,KAAK,CAAC,uBAAuB,CAAC,KAAK,QAAQ;YAAE,SAAS;QACjE,CAAC,MAAM,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,KAA8B,CAAC,CAAC;IAC7D,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,WAAW,CAAC,IAAe;IACzC,OAAO,IAAI,CAAC,MAAM,KAAK,WAAW,CAAC;AACrC,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,YAAY,CAAC,MAAmB;IAC9C,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QAC1C,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,OAAO;YAAE,OAAO,KAAK,CAAC;QAC3B,OAAO,OAAO,CAAC,MAAM,IAAI,IAAI,IAAI,OAAO,CAAC,MAAM,KAAK,YAAY,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,cAAc,CAAC,MAAmB;IAChD,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACrF,CAAC"}
|
package/dist/init/hosted.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { StatusResult } from "../contract.ts";
|
|
1
2
|
import type { StepProgress, StepReport } from "./output.ts";
|
|
2
3
|
/**
|
|
3
4
|
* One run of the scanner binary, injected so tests spawn nothing.
|
|
4
5
|
*
|
|
5
|
-
* `watch` asks for the run's progress markers: the
|
|
6
|
+
* `watch` asks for the run's progress markers: the re-read is the one call
|
|
6
7
|
* here that takes minutes, and `status --json` is a read whose output is the
|
|
7
8
|
* answer rather than a thing to draw.
|
|
8
9
|
*/
|
|
@@ -16,23 +17,69 @@ export type HostedDownload =
|
|
|
16
17
|
{
|
|
17
18
|
kind: "downloaded";
|
|
18
19
|
services: number;
|
|
20
|
+
reread: boolean;
|
|
19
21
|
}
|
|
20
22
|
/** The hosted blob predates this CLI, so its rows were not replayed. */
|
|
21
23
|
| {
|
|
22
24
|
kind: "version_mismatch";
|
|
23
25
|
services: number;
|
|
26
|
+
reread: boolean;
|
|
24
27
|
}
|
|
25
28
|
/** There is a local index, without the hosted rows: `state` says why. */
|
|
26
29
|
| {
|
|
27
30
|
kind: "local_only";
|
|
28
31
|
services: number;
|
|
29
32
|
state: string;
|
|
33
|
+
reread: boolean;
|
|
34
|
+
}
|
|
35
|
+
/** A scan is building this workspace's index right now, so this left it alone. */
|
|
36
|
+
| {
|
|
37
|
+
kind: "scanning";
|
|
30
38
|
}
|
|
31
39
|
/** There is no local index at all, and `problem` is why. */
|
|
32
40
|
| {
|
|
33
41
|
kind: "failed";
|
|
34
42
|
problem: string;
|
|
35
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* What `carrick status` says about the index in `.carrick/` before this step.
|
|
46
|
+
*
|
|
47
|
+
* The `reread` case carries the sentence for WHY the pass has to run. That
|
|
48
|
+
* pass is the wait a reader is about to sit through, and the label alone does
|
|
49
|
+
* not say which case they are in (carrick#1373).
|
|
50
|
+
*/
|
|
51
|
+
export type LocalIndexState =
|
|
52
|
+
/** Nothing a re-read would change: the pass is skipped. */
|
|
53
|
+
{
|
|
54
|
+
kind: "current";
|
|
55
|
+
}
|
|
56
|
+
/** Another scan owns this index right now; a second pass would contend with it. */
|
|
57
|
+
| {
|
|
58
|
+
kind: "scanning";
|
|
59
|
+
}
|
|
60
|
+
/** The pass has to run, and this is what makes it worth the minutes. */
|
|
61
|
+
| {
|
|
62
|
+
kind: "reread";
|
|
63
|
+
reason: string;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Whether the index this machine holds is already the one a re-read would
|
|
67
|
+
* write.
|
|
68
|
+
*
|
|
69
|
+
* Every input is on the status answer already, so this costs one read of a
|
|
70
|
+
* file: `changed_since_index` per service and `outside_every_service` per repo
|
|
71
|
+
* are the scanner's own count of source that has moved since the index was
|
|
72
|
+
* built, and both are filtered to files a scan reads — which matters here,
|
|
73
|
+
* because `carrick init` writes `carrick.json`, the hooks and the skills, and
|
|
74
|
+
* none of those is a reason to spend minutes (carrick#1007 item 5).
|
|
75
|
+
*
|
|
76
|
+
* `repos` is the workspace's repo list as `carrick derive` gave it, so a repo
|
|
77
|
+
* this folder holds and the index does not is a re-read and not a silent gap.
|
|
78
|
+
* Paths are compared as the filesystem resolves them: both sides descend from
|
|
79
|
+
* the same `--workspace` argument, and a pair that still fails to line up
|
|
80
|
+
* falls to the slow side, which is the safe one.
|
|
81
|
+
*/
|
|
82
|
+
export declare function localIndexState(status: StatusResult | null, repos: string[]): LocalIndexState;
|
|
36
83
|
/**
|
|
37
84
|
* What the download says while it runs: how far through, and how long so far.
|
|
38
85
|
*
|
|
@@ -47,9 +94,42 @@ export type HostedDownload =
|
|
|
47
94
|
* local half is a re-scan whose services differ in size by two orders of
|
|
48
95
|
* magnitude (carrick#1365). A number that cannot be derived is not shown.
|
|
49
96
|
*/
|
|
50
|
-
export declare function downloadProgress(say: StepProgress, now?: () => number):
|
|
51
|
-
/**
|
|
52
|
-
|
|
97
|
+
export declare function downloadProgress(say: StepProgress, now?: () => number): DownloadProgress;
|
|
98
|
+
/**
|
|
99
|
+
* The two ways the download's line is written: off the scanner's own markers,
|
|
100
|
+
* and off a clock.
|
|
101
|
+
*
|
|
102
|
+
* The clock is the half carrick#1373 is about. The markers arrive when the
|
|
103
|
+
* scanner finishes a service, and the hosted request in front of them is one
|
|
104
|
+
* call that can take minutes on a large project — so a run driven by markers
|
|
105
|
+
* alone says nothing at all through exactly the wait a reader needs told
|
|
106
|
+
* about. An agent harness with a tool timeout cannot tell that wait from a
|
|
107
|
+
* hang, and it is the silence that ends the run.
|
|
108
|
+
*/
|
|
109
|
+
export type DownloadProgress = {
|
|
110
|
+
/** One line of the scanner's stderr. */
|
|
111
|
+
read(line: string): void;
|
|
112
|
+
/** The clock: say where it has got to, whether or not anything moved. */
|
|
113
|
+
beat(): void;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* How often the download says where it is, at most and at least.
|
|
117
|
+
*
|
|
118
|
+
* At most, because the markers of a large workspace would otherwise be
|
|
119
|
+
* thousands of lines; at least, because a reader on a pipe reads silence as a
|
|
120
|
+
* hang. One constant for both halves is what makes the cadence a promise
|
|
121
|
+
* rather than an average.
|
|
122
|
+
*/
|
|
123
|
+
export declare const BEAT_MS = 5000;
|
|
124
|
+
/**
|
|
125
|
+
* The label the step carries, and the stem of every line it writes.
|
|
126
|
+
*
|
|
127
|
+
* Not "Downloading": the download is two requests, and everything else this
|
|
128
|
+
* step can spend is a local re-read of the tree (carrick#1373).
|
|
129
|
+
*/
|
|
130
|
+
export declare const STEP_LABEL = "Putting your index on this machine";
|
|
131
|
+
/** What the local half of the step is doing, in the words it costs a reader. */
|
|
132
|
+
export declare const REREADING = "re-reading your code";
|
|
53
133
|
/** The notice prefix the scanner states the hosted read's size under. */
|
|
54
134
|
export declare const HOSTED_BYTES = "hosted bytes ";
|
|
55
135
|
/**
|
|
@@ -62,13 +142,20 @@ export declare const HOSTED_BYTES = "hosted bytes ";
|
|
|
62
142
|
*/
|
|
63
143
|
export declare function nativeRunner(quiet: boolean, progress?: StepProgress | null): NativeRun;
|
|
64
144
|
/**
|
|
65
|
-
*
|
|
145
|
+
* Put the hosted index on this machine, and say what is there afterwards.
|
|
66
146
|
*
|
|
67
147
|
* `workspace` is the derived workspace root — the directory `carrick init`
|
|
68
|
-
* wrote the proposal into — so the index this
|
|
69
|
-
* read of that workspace finds.
|
|
148
|
+
* wrote the proposal into — so the index this reads is the one every later
|
|
149
|
+
* read of that workspace finds. `repos` is that workspace's repo list, which
|
|
150
|
+
* [`localIndexState`] needs to tell "indexed" from "indexes some of this".
|
|
151
|
+
*
|
|
152
|
+
* The status read comes first and decides whether the pass runs at all: the
|
|
153
|
+
* pass is a full local re-read, minutes on a large workspace, and a workspace
|
|
154
|
+
* `carrick index` has just indexed gets nothing out of a second one
|
|
155
|
+
* (carrick#1373). `say` states which case this is in, before the wait rather
|
|
156
|
+
* than after it.
|
|
70
157
|
*/
|
|
71
|
-
export declare function downloadHostedIndex(workspace: string, run?: NativeRun): Promise<HostedDownload>;
|
|
158
|
+
export declare function downloadHostedIndex(workspace: string, run?: NativeRun, repos?: string[], say?: StepProgress | null): Promise<HostedDownload>;
|
|
72
159
|
/**
|
|
73
160
|
* The one line init prints about it, and which marker it carries.
|
|
74
161
|
*
|
|
@@ -80,5 +167,10 @@ export declare function downloadHostedIndex(workspace: string, run?: NativeRun):
|
|
|
80
167
|
*
|
|
81
168
|
* This is the step's report, so it is also the line the spinner stops on: one
|
|
82
169
|
* line for the hosted read, in a terminal as everywhere else (carrick#1032).
|
|
170
|
+
*
|
|
171
|
+
* Whether the pass ran is on every line that has two versions. A run that
|
|
172
|
+
* skipped it took a second and a run that did not took minutes, and a reader
|
|
173
|
+
* who cannot tell them apart cannot tell whether their next `carrick init` is
|
|
174
|
+
* a wait (carrick#1373).
|
|
83
175
|
*/
|
|
84
176
|
export declare function hostedReport(outcome: HostedDownload, seconds?: number | null): StepReport;
|
package/dist/init/hosted.js
CHANGED
|
@@ -10,17 +10,126 @@
|
|
|
10
10
|
// refresh` is the pass that does it: it re-reads this workspace's source
|
|
11
11
|
// deterministically and replays the hosted rows onto it, and it runs no model
|
|
12
12
|
// and uploads nothing, so it costs nothing and replaces nobody's row.
|
|
13
|
-
//
|
|
14
|
-
//
|
|
13
|
+
//
|
|
14
|
+
// The re-read is the expensive half and the hosted fetch is the small one:
|
|
15
|
+
// the pass is minutes on a large workspace and the download is two requests
|
|
16
|
+
// (carrick#1373). So this asks `carrick status` FIRST and runs the pass only
|
|
17
|
+
// when the answer says it would change something — no index here, source that
|
|
18
|
+
// has moved since the index was built, a repo the index does not cover, or a
|
|
19
|
+
// hosted read this machine has not yet made signed in and connected. On a
|
|
20
|
+
// workspace `carrick index` has just indexed, nothing is re-read.
|
|
21
|
+
// carrick#985 is the other half of that saving, inside `refresh`: a repo whose
|
|
22
|
+
// local blob is already current should be fetched for rather than scanned.
|
|
15
23
|
//
|
|
16
24
|
// What it reports is read back from `carrick status`, not assumed from an
|
|
17
25
|
// exit code: a refresh that scanned fine can still have been refused the
|
|
18
26
|
// hosted rows, and the sentence a reader needs is different in each case
|
|
19
27
|
// (carrick#1012).
|
|
20
28
|
import { spawn } from "node:child_process";
|
|
29
|
+
import fs from "node:fs";
|
|
30
|
+
import path from "node:path";
|
|
21
31
|
import { parseStatusResult } from "../contract.js";
|
|
22
32
|
import { nativeEnv, resolveNativeBinary } from "../native.js";
|
|
23
33
|
import { elapsed, parseMarker } from "../scan.js";
|
|
34
|
+
/**
|
|
35
|
+
* The hosted states a re-read can still change, so an index carrying one is
|
|
36
|
+
* not current however clean the tree is.
|
|
37
|
+
*
|
|
38
|
+
* All four are "this machine never got a usable answer for a reason this run
|
|
39
|
+
* has just addressed": `carrick init` signs in, connects the repos and can put
|
|
40
|
+
* them in a project, and the recorded state predates all of it. The states
|
|
41
|
+
* left out are the ones a second read answers the same way — `enriched` is
|
|
42
|
+
* done, and `version_mismatch`, `read_failed` and `commit_missing` are the
|
|
43
|
+
* hosted blob's own condition, which nothing here moves (carrick#1024 is the
|
|
44
|
+
* dirty-blob one).
|
|
45
|
+
*/
|
|
46
|
+
const ANSWERED_BY_A_REREAD = new Set([
|
|
47
|
+
"not_signed_in",
|
|
48
|
+
"not_connected",
|
|
49
|
+
"remote_unnamed",
|
|
50
|
+
"no_index_yet",
|
|
51
|
+
]);
|
|
52
|
+
/**
|
|
53
|
+
* Whether the index this machine holds is already the one a re-read would
|
|
54
|
+
* write.
|
|
55
|
+
*
|
|
56
|
+
* Every input is on the status answer already, so this costs one read of a
|
|
57
|
+
* file: `changed_since_index` per service and `outside_every_service` per repo
|
|
58
|
+
* are the scanner's own count of source that has moved since the index was
|
|
59
|
+
* built, and both are filtered to files a scan reads — which matters here,
|
|
60
|
+
* because `carrick init` writes `carrick.json`, the hooks and the skills, and
|
|
61
|
+
* none of those is a reason to spend minutes (carrick#1007 item 5).
|
|
62
|
+
*
|
|
63
|
+
* `repos` is the workspace's repo list as `carrick derive` gave it, so a repo
|
|
64
|
+
* this folder holds and the index does not is a re-read and not a silent gap.
|
|
65
|
+
* Paths are compared as the filesystem resolves them: both sides descend from
|
|
66
|
+
* the same `--workspace` argument, and a pair that still fails to line up
|
|
67
|
+
* falls to the slow side, which is the safe one.
|
|
68
|
+
*/
|
|
69
|
+
export function localIndexState(status, repos) {
|
|
70
|
+
if (status === null)
|
|
71
|
+
return { kind: "reread", reason: "there is no index here yet" };
|
|
72
|
+
// Before the index is read at all: a detached `carrick index` writes this
|
|
73
|
+
// one, and a second pass over the same tree would be two scans contending
|
|
74
|
+
// (carrick#992).
|
|
75
|
+
if ((status.running_scans ?? []).some(stillScanning))
|
|
76
|
+
return { kind: "scanning" };
|
|
77
|
+
if (status.error !== undefined || status.services.length === 0) {
|
|
78
|
+
return { kind: "reread", reason: "there is no index here yet" };
|
|
79
|
+
}
|
|
80
|
+
const changed = status.services.reduce((total, service) => total + (service.changed_since_index ?? 0), 0) +
|
|
81
|
+
(status.repos ?? []).reduce((total, repo) => total + (repo.outside_every_service ?? 0), 0);
|
|
82
|
+
if (changed > 0) {
|
|
83
|
+
return { kind: "reread", reason: `${changed} file(s) changed since it was built` };
|
|
84
|
+
}
|
|
85
|
+
const indexed = new Set((status.repos ?? []).map(resolved));
|
|
86
|
+
const uncovered = repos.filter((repo) => !indexed.has(resolved(repo)));
|
|
87
|
+
if (uncovered.length > 0) {
|
|
88
|
+
return { kind: "reread", reason: `it covers ${uncovered.length} fewer repo(s) than this folder holds` };
|
|
89
|
+
}
|
|
90
|
+
const unasked = status.services.some((service) => service.hosted_state !== undefined && ANSWERED_BY_A_REREAD.has(service.hosted_state));
|
|
91
|
+
if (unasked)
|
|
92
|
+
return { kind: "reread", reason: "it holds no hosted rows yet" };
|
|
93
|
+
return { kind: "current" };
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Whether a scan row is a process that still holds this workspace.
|
|
97
|
+
*
|
|
98
|
+
* Two things have to be true, and the recorded status is only the first of
|
|
99
|
+
* them. The list also carries the scans that finished, failed or handed their
|
|
100
|
+
* prompts to Carrick Cloud, and none of those is holding anything — and a
|
|
101
|
+
* `running` row OUTLIVES its process: `forget_superseded` clears it on the
|
|
102
|
+
* next build, not when the scan ends, so a scan somebody interrupted leaves
|
|
103
|
+
* one behind. The scanner answers this with `kill(pid, 0)` everywhere it
|
|
104
|
+
* matters (`ScanState::is_running` in `src/local_mode/scan_state.rs`) and
|
|
105
|
+
* serialises the raw status, so this asks the same question of the same pid.
|
|
106
|
+
* A row with no readable pid is not a scan this can prove is alive, and the
|
|
107
|
+
* cost of being wrong that way is one re-read rather than an init that never
|
|
108
|
+
* re-reads again.
|
|
109
|
+
*/
|
|
110
|
+
function stillScanning(scan) {
|
|
111
|
+
if (scan.status !== "running" || typeof scan.pid !== "number")
|
|
112
|
+
return false;
|
|
113
|
+
try {
|
|
114
|
+
// Signal 0 performs no action; it only reports whether the pid can be
|
|
115
|
+
// signalled. EPERM is a live process this user does not own.
|
|
116
|
+
process.kill(scan.pid, 0);
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
return error.code === "EPERM";
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/** A path as the filesystem resolves it, for comparing two sides' spelling of one repo. */
|
|
124
|
+
function resolved(entry) {
|
|
125
|
+
const value = typeof entry === "string" ? entry : entry.repo;
|
|
126
|
+
try {
|
|
127
|
+
return fs.realpathSync(value);
|
|
128
|
+
}
|
|
129
|
+
catch {
|
|
130
|
+
return path.resolve(value);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
24
133
|
/**
|
|
25
134
|
* Run the scanner, letting its own progress reach the terminal.
|
|
26
135
|
*
|
|
@@ -52,6 +161,17 @@ function spawnNative(args, quiet, progress) {
|
|
|
52
161
|
let stderr = "";
|
|
53
162
|
let rest = "";
|
|
54
163
|
const report = progress === null ? null : downloadProgress(progress);
|
|
164
|
+
// The clock half of the cadence (carrick#1373). The hosted request in
|
|
165
|
+
// front of the markers is one call that can run for minutes, so a run
|
|
166
|
+
// driven by markers alone is silent through exactly the wait that needs a
|
|
167
|
+
// line. Unref'd: a ticker is not a reason for the process to stay up.
|
|
168
|
+
const beating = report === null ? null : setInterval(report.beat, BEAT_MS);
|
|
169
|
+
beating?.unref();
|
|
170
|
+
const settle = (value) => {
|
|
171
|
+
if (beating !== null)
|
|
172
|
+
clearInterval(beating);
|
|
173
|
+
resolve(value);
|
|
174
|
+
};
|
|
55
175
|
child.stdout.setEncoding("utf8");
|
|
56
176
|
child.stdout.on("data", (chunk) => {
|
|
57
177
|
stdout += chunk;
|
|
@@ -65,7 +185,7 @@ function spawnNative(args, quiet, progress) {
|
|
|
65
185
|
const lines = (rest + chunk).split("\n");
|
|
66
186
|
rest = lines.pop() ?? "";
|
|
67
187
|
for (const line of lines)
|
|
68
|
-
report(line);
|
|
188
|
+
report.read(line);
|
|
69
189
|
}
|
|
70
190
|
// Quiet under a spinner: a spinner owns its line and rewrites it, and a
|
|
71
191
|
// scanner line landing in the middle of that is a corrupted terminal.
|
|
@@ -75,8 +195,8 @@ function spawnNative(args, quiet, progress) {
|
|
|
75
195
|
if (!quiet && !args.includes("--json"))
|
|
76
196
|
process.stderr.write(withoutMarkers(chunk));
|
|
77
197
|
});
|
|
78
|
-
child.on("error", (error) =>
|
|
79
|
-
child.on("close", (code) =>
|
|
198
|
+
child.on("error", (error) => settle({ status: 1, stdout: "", stderr: error.message }));
|
|
199
|
+
child.on("close", (code) => settle({ status: code, stdout, stderr }));
|
|
80
200
|
});
|
|
81
201
|
}
|
|
82
202
|
/** A chunk with the machine-readable lines taken out of it. */
|
|
@@ -106,26 +226,61 @@ export function downloadProgress(say, now = Date.now) {
|
|
|
106
226
|
const startedAt = now();
|
|
107
227
|
let services = "";
|
|
108
228
|
let bytes = "";
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
229
|
+
let saidAt = null;
|
|
230
|
+
// One line at a time, and never two inside one beat. Both callers below can
|
|
231
|
+
// reach this in the same second — a marker arrives, the ticker fires — and a
|
|
232
|
+
// reader on a pipe gets the cadence, not every marker a large workspace
|
|
233
|
+
// raises (carrick#1315).
|
|
234
|
+
const emit = () => {
|
|
235
|
+
const at = now();
|
|
236
|
+
if (saidAt !== null && at - saidAt < BEAT_MS)
|
|
112
237
|
return;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
238
|
+
saidAt = at;
|
|
239
|
+
// `re-reading your code` on every line, because that is what the minutes
|
|
240
|
+
// are going on: the hosted half is two requests and the pass in front of
|
|
241
|
+
// it reads every file in the workspace (carrick#1373).
|
|
242
|
+
const where = services === "" ? "" : `, ${services}`;
|
|
243
|
+
say([STEP_LABEL, `${REREADING}${where}${bytes}, ${elapsed((at - startedAt) / 1000)}`].join(": "));
|
|
244
|
+
};
|
|
245
|
+
return {
|
|
246
|
+
read: (line) => {
|
|
247
|
+
const marker = parseMarker(line);
|
|
248
|
+
if (marker === null)
|
|
249
|
+
return;
|
|
250
|
+
if (marker.kind === "progress") {
|
|
251
|
+
const update = marker.update;
|
|
252
|
+
services = `${update.service_index} of ${update.service_total} services`;
|
|
253
|
+
emit();
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
// The hosted half says how much it read; the scanner states it as a
|
|
257
|
+
// notice because it is one fact, once, not a count that ticks.
|
|
258
|
+
if (marker.kind === "notice" && marker.text.startsWith(HOSTED_BYTES)) {
|
|
259
|
+
bytes = `, ${marker.text.slice(HOSTED_BYTES.length)}`;
|
|
260
|
+
emit();
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
beat: emit,
|
|
125
264
|
};
|
|
126
265
|
}
|
|
127
|
-
/**
|
|
128
|
-
|
|
266
|
+
/**
|
|
267
|
+
* How often the download says where it is, at most and at least.
|
|
268
|
+
*
|
|
269
|
+
* At most, because the markers of a large workspace would otherwise be
|
|
270
|
+
* thousands of lines; at least, because a reader on a pipe reads silence as a
|
|
271
|
+
* hang. One constant for both halves is what makes the cadence a promise
|
|
272
|
+
* rather than an average.
|
|
273
|
+
*/
|
|
274
|
+
export const BEAT_MS = 5000;
|
|
275
|
+
/**
|
|
276
|
+
* The label the step carries, and the stem of every line it writes.
|
|
277
|
+
*
|
|
278
|
+
* Not "Downloading": the download is two requests, and everything else this
|
|
279
|
+
* step can spend is a local re-read of the tree (carrick#1373).
|
|
280
|
+
*/
|
|
281
|
+
export const STEP_LABEL = "Putting your index on this machine";
|
|
282
|
+
/** What the local half of the step is doing, in the words it costs a reader. */
|
|
283
|
+
export const REREADING = "re-reading your code";
|
|
129
284
|
/** The notice prefix the scanner states the hosted read's size under. */
|
|
130
285
|
export const HOSTED_BYTES = "hosted bytes ";
|
|
131
286
|
/** The first line of a failure, for a sentence that has to fit on one. */
|
|
@@ -148,37 +303,68 @@ export function nativeRunner(quiet, progress = null) {
|
|
|
148
303
|
return (args, watch = false) => spawnNative(args, quiet, watch ? progress : null);
|
|
149
304
|
}
|
|
150
305
|
/**
|
|
151
|
-
*
|
|
306
|
+
* Put the hosted index on this machine, and say what is there afterwards.
|
|
152
307
|
*
|
|
153
308
|
* `workspace` is the derived workspace root — the directory `carrick init`
|
|
154
|
-
* wrote the proposal into — so the index this
|
|
155
|
-
* read of that workspace finds.
|
|
309
|
+
* wrote the proposal into — so the index this reads is the one every later
|
|
310
|
+
* read of that workspace finds. `repos` is that workspace's repo list, which
|
|
311
|
+
* [`localIndexState`] needs to tell "indexed" from "indexes some of this".
|
|
312
|
+
*
|
|
313
|
+
* The status read comes first and decides whether the pass runs at all: the
|
|
314
|
+
* pass is a full local re-read, minutes on a large workspace, and a workspace
|
|
315
|
+
* `carrick index` has just indexed gets nothing out of a second one
|
|
316
|
+
* (carrick#1373). `say` states which case this is in, before the wait rather
|
|
317
|
+
* than after it.
|
|
156
318
|
*/
|
|
157
|
-
export async function downloadHostedIndex(workspace, run = nativeRunner(false)) {
|
|
319
|
+
export async function downloadHostedIndex(workspace, run = nativeRunner(false), repos = [], say = null) {
|
|
320
|
+
const before = await readStatus(workspace, run);
|
|
321
|
+
const local = localIndexState(before, repos);
|
|
322
|
+
if (local.kind === "scanning")
|
|
323
|
+
return { kind: "scanning" };
|
|
324
|
+
if (local.kind === "current")
|
|
325
|
+
return classify(before, null, false);
|
|
326
|
+
say?.(`${STEP_LABEL}: ${local.reason}, ${REREADING}`);
|
|
158
327
|
const refreshed = await run(["refresh", "--workspace", workspace], true);
|
|
159
328
|
if (refreshed.status !== 0) {
|
|
160
329
|
return { kind: "failed", problem: firstLine(refreshed.stderr, "the scanner gave no reason") };
|
|
161
330
|
}
|
|
331
|
+
return classify(await readStatus(workspace, run), refreshed.stderr, true);
|
|
332
|
+
}
|
|
333
|
+
/** `carrick status --json`, parsed, or null when there is nothing to parse. */
|
|
334
|
+
async function readStatus(workspace, run) {
|
|
162
335
|
const answer = await run(["status", "--workspace", workspace, "--json"]);
|
|
163
|
-
|
|
336
|
+
// Not gated on the exit code: a workspace with no index answers non-zero
|
|
337
|
+
// with the refusal in the body, and that body is what says so (carrick#1023
|
|
338
|
+
// item 1).
|
|
339
|
+
return parseStatusResult(answer.stdout);
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* What this machine holds, read off the status answer.
|
|
343
|
+
*
|
|
344
|
+
* `reread` is whether the pass ran, which every sentence below turns on: the
|
|
345
|
+
* same rows are worth a different sentence when the minutes were spent and
|
|
346
|
+
* when they were not. `problem` is the scanner's last words, for the one case
|
|
347
|
+
* where the status answer itself is the thing that is missing.
|
|
348
|
+
*/
|
|
349
|
+
function classify(status, problem, reread) {
|
|
164
350
|
if (!status || status.services.length === 0) {
|
|
165
351
|
return {
|
|
166
352
|
kind: "failed",
|
|
167
|
-
problem: firstLine(status?.message ??
|
|
353
|
+
problem: firstLine(status?.message ?? problem ?? "", "the index it wrote holds no service this build can read"),
|
|
168
354
|
};
|
|
169
355
|
}
|
|
170
356
|
const services = status.services.length;
|
|
171
357
|
// Stated before the count, because it is the one state with an instruction
|
|
172
358
|
// attached: a blob older than this CLI is not replayed at all (carrick#1012).
|
|
173
359
|
if (status.services.some((service) => service.hosted_state === "version_mismatch")) {
|
|
174
|
-
return { kind: "version_mismatch", services };
|
|
360
|
+
return { kind: "version_mismatch", services, reread };
|
|
175
361
|
}
|
|
176
362
|
const enriched = status.services.filter((service) => service.hosted_state === "enriched");
|
|
177
363
|
if (enriched.length === 0) {
|
|
178
364
|
const state = status.services.find((service) => service.hosted_state)?.hosted_state ?? "unknown";
|
|
179
|
-
return { kind: "local_only", services, state };
|
|
365
|
+
return { kind: "local_only", services, state, reread };
|
|
180
366
|
}
|
|
181
|
-
return { kind: "downloaded", services: enriched.length };
|
|
367
|
+
return { kind: "downloaded", services: enriched.length, reread };
|
|
182
368
|
}
|
|
183
369
|
/**
|
|
184
370
|
* Why a hosted index this machine asked for is not in the answer.
|
|
@@ -221,6 +407,11 @@ function stateClause(state) {
|
|
|
221
407
|
*
|
|
222
408
|
* This is the step's report, so it is also the line the spinner stops on: one
|
|
223
409
|
* line for the hosted read, in a terminal as everywhere else (carrick#1032).
|
|
410
|
+
*
|
|
411
|
+
* Whether the pass ran is on every line that has two versions. A run that
|
|
412
|
+
* skipped it took a second and a run that did not took minutes, and a reader
|
|
413
|
+
* who cannot tell them apart cannot tell whether their next `carrick init` is
|
|
414
|
+
* a wait (carrick#1373).
|
|
224
415
|
*/
|
|
225
416
|
export function hostedReport(outcome, seconds = null) {
|
|
226
417
|
const plural = (count) => `${count} service${count === 1 ? "" : "s"}`;
|
|
@@ -230,7 +421,12 @@ export function hostedReport(outcome, seconds = null) {
|
|
|
230
421
|
const took = seconds === null ? "" : ` in ${elapsed(seconds)}`;
|
|
231
422
|
switch (outcome.kind) {
|
|
232
423
|
case "downloaded":
|
|
233
|
-
return {
|
|
424
|
+
return {
|
|
425
|
+
kind: "done",
|
|
426
|
+
text: outcome.reread
|
|
427
|
+
? `Hosted index for ${plural(outcome.services)} read into .carrick/${took}`
|
|
428
|
+
: `.carrick/ already holds the hosted index for ${plural(outcome.services)}: nothing was re-read`,
|
|
429
|
+
};
|
|
234
430
|
case "version_mismatch":
|
|
235
431
|
return {
|
|
236
432
|
kind: "warn",
|
|
@@ -239,7 +435,12 @@ export function hostedReport(outcome, seconds = null) {
|
|
|
239
435
|
case "local_only":
|
|
240
436
|
return {
|
|
241
437
|
kind: "warn",
|
|
242
|
-
text: `.carrick/ holds ${plural(outcome.services)} as this machine read them; ${stateClause(outcome.state)}`,
|
|
438
|
+
text: `.carrick/ ${outcome.reread ? "holds" : "already holds"} ${plural(outcome.services)} as this machine read them; ${stateClause(outcome.state)}`,
|
|
439
|
+
};
|
|
440
|
+
case "scanning":
|
|
441
|
+
return {
|
|
442
|
+
kind: "warn",
|
|
443
|
+
text: "A scan is building this index here, so nothing was re-read. Run `carrick status` to see how far it has got",
|
|
243
444
|
};
|
|
244
445
|
case "failed":
|
|
245
446
|
return { kind: "refuse", text: `Hosted index could not be read into .carrick/: ${outcome.problem}` };
|
package/dist/init/hosted.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosted.js","sourceRoot":"","sources":["../../src/init/hosted.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,6EAA6E;AAC7E,kEAAkE;AAClE,kBAAkB;AAClB,EAAE;AACF,y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AAK,kBAAkB;YACrB,OAAO;gBACL,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,kFAAkF;aACzF,CAAC;QACJ,KAAK,YAAY;YACf,OAAO;gBACL,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,aAAa,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,IAC3D,MAAM,CAAC,OAAO,CAAC,QAAQ,CACzB,+BAA+B,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;aAC5D,CAAC;QACJ,KAAK,UAAU;YACb,OAAO;gBACL,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,4GAA4G;aACnH,CAAC;QACJ,KAAK,QAAQ;YACX,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,kDAAkD,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;IACzG,CAAC;AACH,CAAC"}
|
package/dist/init/output.d.ts
CHANGED
|
@@ -63,9 +63,11 @@ export type StepReport = {
|
|
|
63
63
|
*
|
|
64
64
|
* Handed to the step's work rather than exposed on its own, because only the
|
|
65
65
|
* step that owns the terminal may write to it: a spinner rewrites one line, so
|
|
66
|
-
* anything else printing underneath corrupts it.
|
|
67
|
-
*
|
|
68
|
-
*
|
|
66
|
+
* anything else printing underneath corrupts it. The interactive rendering
|
|
67
|
+
* draws it on that one line; the plain rendering writes it as its own line,
|
|
68
|
+
* because a reader on a pipe has nothing else to tell a long read from a hang
|
|
69
|
+
* (carrick#1373). Keeping that bounded is the WORK's job — it states the
|
|
70
|
+
* cadence, and both renderings say what it says.
|
|
69
71
|
*/
|
|
70
72
|
export type StepProgress = (text: string) => void;
|
|
71
73
|
/** Everything `init` prints or asks. */
|