lim 0.15.4 → 0.16.0
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/base-command.d.ts +1 -1
- package/dist/base-command.d.ts.map +1 -1
- package/dist/base-command.js +4 -2
- package/dist/base-command.js.map +1 -1
- package/dist/commands/xcode/rbe.d.ts +3 -7
- package/dist/commands/xcode/rbe.d.ts.map +1 -1
- package/dist/commands/xcode/rbe.js +56 -108
- package/dist/commands/xcode/rbe.js.map +1 -1
- package/dist/lib/rbe-session.d.ts +0 -13
- package/dist/lib/rbe-session.d.ts.map +1 -1
- package/dist/lib/rbe-session.js +0 -15
- package/dist/lib/rbe-session.js.map +1 -1
- package/dist/lib/rbe-workspace.d.ts +16 -27
- package/dist/lib/rbe-workspace.d.ts.map +1 -1
- package/dist/lib/rbe-workspace.js +20 -40
- package/dist/lib/rbe-workspace.js.map +1 -1
- package/package.json +2 -2
- package/dist/commands/xcode/rbe/install.d.ts +0 -20
- package/dist/commands/xcode/rbe/install.d.ts.map +0 -1
- package/dist/commands/xcode/rbe/install.js +0 -128
- package/dist/commands/xcode/rbe/install.js.map +0 -1
- package/dist/lib/rbe-bep-watcher.d.ts +0 -41
- package/dist/lib/rbe-bep-watcher.d.ts.map +0 -1
- package/dist/lib/rbe-bep-watcher.js +0 -267
- package/dist/lib/rbe-bep-watcher.js.map +0 -1
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.startBepWatcher = startBepWatcher;
|
|
7
|
-
const fs_1 = __importDefault(require("fs"));
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const api_1 = require("@limrun/api");
|
|
10
|
-
function startBepWatcher(opts) {
|
|
11
|
-
const { bepPath, target, getClient, log, debounceMs = 400, pollIntervalMs = 1500, retryDelayMs = 5000, maxRetries = 3, } = opts;
|
|
12
|
-
const watchDir = path_1.default.dirname(bepPath);
|
|
13
|
-
const bepName = path_1.default.basename(bepPath);
|
|
14
|
-
// Act once per build. We dedupe on the Bazel invocation id (not the digest) so
|
|
15
|
-
// a rebuild that reproduces an earlier digest (git stash revert) still
|
|
16
|
-
// re-registers — the instance, keyed on the CAS digest, then reinstalls only
|
|
17
|
-
// if the on-sim digest actually differs. When a BEP carries no invocation id
|
|
18
|
-
// (older Bazel), we fall back to the digest hash so we still avoid re-acting on
|
|
19
|
-
// the same build's repeated change events.
|
|
20
|
-
let lastHandledInvocation;
|
|
21
|
-
let lastHandledHash;
|
|
22
|
-
let authExpired = false;
|
|
23
|
-
const loggedOnce = new Set();
|
|
24
|
-
let closed = false;
|
|
25
|
-
let dirty = false;
|
|
26
|
-
let currentTick = null;
|
|
27
|
-
// Bounded retry for transient install failures (the mtime/size poll only fires
|
|
28
|
-
// on a file change, so a settled build wouldn't otherwise be retried).
|
|
29
|
-
let retryTimer = null;
|
|
30
|
-
let retryInvocation;
|
|
31
|
-
let retryCount = 0;
|
|
32
|
-
let debounceTimer = null;
|
|
33
|
-
// Seed from the current file (if any) so the first poll doesn't spuriously fire,
|
|
34
|
-
// and so we notice a rewrite by size even when mtime granularity is coarse.
|
|
35
|
-
let lastMtimeMs = -1;
|
|
36
|
-
let lastSize = -1;
|
|
37
|
-
try {
|
|
38
|
-
const st = fs_1.default.statSync(bepPath);
|
|
39
|
-
lastMtimeMs = st.mtimeMs;
|
|
40
|
-
lastSize = st.size;
|
|
41
|
-
}
|
|
42
|
-
catch {
|
|
43
|
-
/* no BEP yet */
|
|
44
|
-
}
|
|
45
|
-
const logOnce = (key, msg) => {
|
|
46
|
-
if (loggedOnce.has(key))
|
|
47
|
-
return;
|
|
48
|
-
loggedOnce.add(key);
|
|
49
|
-
log(msg);
|
|
50
|
-
};
|
|
51
|
-
const trigger = () => {
|
|
52
|
-
if (closed)
|
|
53
|
-
return;
|
|
54
|
-
if (currentTick) {
|
|
55
|
-
// A tick is in flight; mark dirty so we re-run once it settles.
|
|
56
|
-
dirty = true;
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
currentTick = tick()
|
|
60
|
-
.catch((err) => log(`auto-install: unexpected error: ${errMsg(err)}`))
|
|
61
|
-
.finally(() => {
|
|
62
|
-
currentTick = null;
|
|
63
|
-
// A BEP change during the registration (e.g. a new build) set `dirty`;
|
|
64
|
-
// re-run so we converge on the latest on-disk build.
|
|
65
|
-
if (dirty && !closed) {
|
|
66
|
-
dirty = false;
|
|
67
|
-
trigger();
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
|
-
const onChange = () => {
|
|
72
|
-
if (closed)
|
|
73
|
-
return;
|
|
74
|
-
if (debounceTimer)
|
|
75
|
-
clearTimeout(debounceTimer);
|
|
76
|
-
debounceTimer = setTimeout(() => {
|
|
77
|
-
debounceTimer = null;
|
|
78
|
-
trigger();
|
|
79
|
-
}, debounceMs);
|
|
80
|
-
};
|
|
81
|
-
async function tick() {
|
|
82
|
-
if (authExpired)
|
|
83
|
-
return; // a detached daemon cannot relogin; stop trying.
|
|
84
|
-
if (closed)
|
|
85
|
-
return;
|
|
86
|
-
let bep;
|
|
87
|
-
try {
|
|
88
|
-
bep = await fs_1.default.promises.readFile(bepPath, 'utf8');
|
|
89
|
-
}
|
|
90
|
-
catch {
|
|
91
|
-
return; // file missing/unreadable; a later change re-triggers.
|
|
92
|
-
}
|
|
93
|
-
const completion = (0, api_1.inspectBuildCompletion)(bep);
|
|
94
|
-
if (!completion.complete || !completion.success) {
|
|
95
|
-
// Build still flushing, or it failed: leave prior state untouched. A
|
|
96
|
-
// failed build must not register anything.
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
if (completion.invocationId && completion.invocationId === lastHandledInvocation) {
|
|
100
|
-
return; // already handled this build.
|
|
101
|
-
}
|
|
102
|
-
// The BEP is fully flushed (gated on the terminal `lastMessage` event), so a
|
|
103
|
-
// parse failure here is definitive, not a not-yet-written race: this build
|
|
104
|
-
// either didn't produce our target or used wrong flags (BLAKE3 / local-only).
|
|
105
|
-
// Either way, mark the build handled so its remaining change events don't
|
|
106
|
-
// reprocess; log the wrong-flags case once.
|
|
107
|
-
let digest;
|
|
108
|
-
try {
|
|
109
|
-
digest = (0, api_1.parseTopLevelIpaDigest)(bep, target);
|
|
110
|
-
}
|
|
111
|
-
catch (err) {
|
|
112
|
-
if (err instanceof api_1.RbeBepError && err.terminal) {
|
|
113
|
-
logOnce(`terminal:${completion.invocationId ?? 'no-invocation'}`, `auto-install: ${errMsg(err)}`);
|
|
114
|
-
}
|
|
115
|
-
markHandled(completion.invocationId, undefined);
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
// Fall back to the digest for the rare BEP without an invocation id, so the
|
|
119
|
-
// same build's repeated change events don't re-register.
|
|
120
|
-
if (!completion.invocationId && digest.hash === lastHandledHash) {
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
await register(bep, digest, completion.invocationId);
|
|
124
|
-
}
|
|
125
|
-
function markHandled(invocationId, hash) {
|
|
126
|
-
// Update each dedupe key only when we actually have a value, so a terminal
|
|
127
|
-
// parse failure (which has an invocation id but no digest) doesn't wipe the
|
|
128
|
-
// hash-fallback key used for invocation-less BEP streams.
|
|
129
|
-
if (invocationId !== undefined)
|
|
130
|
-
lastHandledInvocation = invocationId;
|
|
131
|
-
if (hash !== undefined)
|
|
132
|
-
lastHandledHash = hash;
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Schedules a re-attempt after a transient install failure (the build is not
|
|
136
|
-
* marked handled, so the re-triggered tick re-reads and retries the same
|
|
137
|
-
* build). Bounded per build: after maxRetries we give up and mark it handled so
|
|
138
|
-
* a permanent failure can't loop forever — the user rebuilds to retry.
|
|
139
|
-
*/
|
|
140
|
-
function scheduleRetry(invocationId, digest) {
|
|
141
|
-
if (closed)
|
|
142
|
-
return;
|
|
143
|
-
if (invocationId !== retryInvocation) {
|
|
144
|
-
retryInvocation = invocationId;
|
|
145
|
-
retryCount = 0;
|
|
146
|
-
}
|
|
147
|
-
if (retryCount >= maxRetries) {
|
|
148
|
-
logOnce(`giveup:${invocationId ?? digest.hash}`, `auto-install: gave up installing ${digest.ipaName} after ${maxRetries} retries; rebuild to retry.`);
|
|
149
|
-
markHandled(invocationId, digest.hash);
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
retryCount++;
|
|
153
|
-
if (retryTimer)
|
|
154
|
-
clearTimeout(retryTimer);
|
|
155
|
-
retryTimer = setTimeout(() => {
|
|
156
|
-
retryTimer = null;
|
|
157
|
-
trigger();
|
|
158
|
-
}, retryDelayMs);
|
|
159
|
-
if (typeof retryTimer.unref === 'function')
|
|
160
|
-
retryTimer.unref();
|
|
161
|
-
}
|
|
162
|
-
async function register(bep, digest, invocationId) {
|
|
163
|
-
let result;
|
|
164
|
-
try {
|
|
165
|
-
result = await getClient().installRbeBuildFromBep({ bep, target });
|
|
166
|
-
}
|
|
167
|
-
catch (err) {
|
|
168
|
-
if (isAuthError(err)) {
|
|
169
|
-
authExpired = true;
|
|
170
|
-
logOnce('auth', 'auto-install: session expired; restart `lim xcode rbe` to resume auto-install.');
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
// Transient (network/instance blip). The mtime/size poll won't re-fire for
|
|
174
|
-
// a settled build, so schedule a bounded retry rather than dropping it until
|
|
175
|
-
// the next build.
|
|
176
|
-
log(`auto-install: failed to install ${digest.ipaName}: ${errMsg(err)}`);
|
|
177
|
-
scheduleRetry(invocationId, digest);
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
// The build is handled — don't retry it on the next change.
|
|
181
|
-
markHandled(invocationId, digest.hash);
|
|
182
|
-
if (result.installed) {
|
|
183
|
-
const timing = result.syncDurationMs !== undefined ?
|
|
184
|
-
` (synced ${result.syncDurationMs}ms, installed ${result.installDurationMs ?? 0}ms)`
|
|
185
|
-
: '';
|
|
186
|
-
log(`auto-install: installed ${result.appName ?? digest.ipaName}${timing}`);
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
log(`auto-install: recorded ${digest.ipaName}; will install when a simulator is attached.`);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
// fs.watch on the directory (Bazel truncates+rewrites bep.json, changing the
|
|
193
|
-
// inode, so watching the file path directly is unreliable). Filter to bep.json.
|
|
194
|
-
let watcher = null;
|
|
195
|
-
try {
|
|
196
|
-
watcher = fs_1.default.watch(watchDir, (_event, filename) => {
|
|
197
|
-
if (!filename || path_1.default.basename(filename.toString()) === bepName)
|
|
198
|
-
onChange();
|
|
199
|
-
});
|
|
200
|
-
watcher.on('error', (err) => log(`auto-install: watch error: ${errMsg(err)}`));
|
|
201
|
-
}
|
|
202
|
-
catch (err) {
|
|
203
|
-
log(`auto-install: could not watch ${watchDir}: ${errMsg(err)}`);
|
|
204
|
-
}
|
|
205
|
-
// mtime-poll backstop: macOS FSEvents can coalesce or drop the single
|
|
206
|
-
// completion event, so also poll the BEP's mtime and act on a change.
|
|
207
|
-
const poll = setInterval(() => {
|
|
208
|
-
fs_1.default.promises
|
|
209
|
-
.stat(bepPath)
|
|
210
|
-
.then((st) => {
|
|
211
|
-
// Compare size too: a fast cached rebuild's truncate+rewrite can land
|
|
212
|
-
// within one mtime tick on coarse-granularity filesystems.
|
|
213
|
-
if (st.mtimeMs !== lastMtimeMs || st.size !== lastSize) {
|
|
214
|
-
lastMtimeMs = st.mtimeMs;
|
|
215
|
-
lastSize = st.size;
|
|
216
|
-
onChange();
|
|
217
|
-
}
|
|
218
|
-
})
|
|
219
|
-
.catch(() => {
|
|
220
|
-
/* no BEP yet */
|
|
221
|
-
});
|
|
222
|
-
}, pollIntervalMs);
|
|
223
|
-
// Don't let the poll timer keep the event loop alive on its own.
|
|
224
|
-
if (typeof poll.unref === 'function')
|
|
225
|
-
poll.unref();
|
|
226
|
-
// Catch a build that completed before the watcher started (e.g. daemon restart).
|
|
227
|
-
trigger();
|
|
228
|
-
return {
|
|
229
|
-
async close() {
|
|
230
|
-
closed = true;
|
|
231
|
-
if (debounceTimer)
|
|
232
|
-
clearTimeout(debounceTimer);
|
|
233
|
-
if (retryTimer)
|
|
234
|
-
clearTimeout(retryTimer);
|
|
235
|
-
clearInterval(poll);
|
|
236
|
-
watcher?.close();
|
|
237
|
-
if (currentTick) {
|
|
238
|
-
try {
|
|
239
|
-
await currentTick;
|
|
240
|
-
}
|
|
241
|
-
catch {
|
|
242
|
-
/* already logged */
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
function errMsg(err) {
|
|
249
|
-
return err instanceof Error ? err.message : String(err);
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Detects an expired/invalid session (HTTP 401). The SDK throws a typed
|
|
253
|
-
* AuthenticationError (status 401) on some paths; the instance-direct path
|
|
254
|
-
* (installRbeBuildFromBep) instead throws a plain Error whose message is
|
|
255
|
-
* `"<op> failed: <status> <body>"`. Match the status POSITION (`failed: 401`),
|
|
256
|
-
* not a bare `401` anywhere — a transient 5xx whose body merely contains "401"
|
|
257
|
-
* (a trace id, a JSON offset) must not latch auto-install off.
|
|
258
|
-
*/
|
|
259
|
-
function isAuthError(err) {
|
|
260
|
-
if (err && typeof err === 'object') {
|
|
261
|
-
const e = err;
|
|
262
|
-
if (e.name === 'AuthenticationError' || e.status === 401)
|
|
263
|
-
return true;
|
|
264
|
-
}
|
|
265
|
-
return /\bfailed: 401\b/.test(errMsg(err));
|
|
266
|
-
}
|
|
267
|
-
//# sourceMappingURL=rbe-bep-watcher.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rbe-bep-watcher.js","sourceRoot":"","sources":["../../src/lib/rbe-bep-watcher.ts"],"names":[],"mappings":";;;;;AA8CA,0CAuPC;AArS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