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
package/dist/lib/rbe-session.js
CHANGED
|
@@ -85,12 +85,6 @@ async function waitForRbeRunning(client, initial, opts = {}) {
|
|
|
85
85
|
* Builds the argv for the detached child that holds the tunnel: re-invokes this
|
|
86
86
|
* same CLI as `xcode rbe --serve --id <id> --port <port> [--api-key <key>]`.
|
|
87
87
|
* `scriptPath` is the CLI entry (process.argv[1]).
|
|
88
|
-
*
|
|
89
|
-
* When `workspaceRoot` and `target` are both present the child also starts the
|
|
90
|
-
* BEP auto-install watcher (watching `<workspaceRoot>/.limrun/bep.json` and
|
|
91
|
-
* registering the built `target`'s `.ipa` after each build). argv is the source
|
|
92
|
-
* of truth here because the child needs these at startup, before any pidfile is
|
|
93
|
-
* written.
|
|
94
88
|
*/
|
|
95
89
|
function buildServeChildArgs(opts) {
|
|
96
90
|
// --no-create: the child must never own instance creation. The parent already
|
|
@@ -108,15 +102,6 @@ function buildServeChildArgs(opts) {
|
|
|
108
102
|
'--port',
|
|
109
103
|
String(opts.port),
|
|
110
104
|
];
|
|
111
|
-
if (opts.workspaceRoot) {
|
|
112
|
-
args.push('--workspace-root', opts.workspaceRoot);
|
|
113
|
-
}
|
|
114
|
-
if (opts.target) {
|
|
115
|
-
args.push('--target', opts.target);
|
|
116
|
-
}
|
|
117
|
-
if (opts.bepFile) {
|
|
118
|
-
args.push('--bep-file', opts.bepFile);
|
|
119
|
-
}
|
|
120
105
|
if (opts.apiKey) {
|
|
121
106
|
args.push('--api-key', opts.apiKey);
|
|
122
107
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rbe-session.js","sourceRoot":"","sources":["../../src/lib/rbe-session.ts"],"names":[],"mappings":";;;;;;AAyBA,4CAGC;AAMD,wCAuBC;AASD,8CAgBC;
|
|
1
|
+
{"version":3,"file":"rbe-session.js","sourceRoot":"","sources":["../../src/lib/rbe-session.ts"],"names":[],"mappings":";;;;;;AAyBA,4CAGC;AAMD,wCAuBC;AASD,8CAgBC;AAOD,kDAyBC;AAgBD,wCAEC;AAED,0CAEC;AAED,wCAUC;AAED,0CAMC;AAGD,wCAOC;AAOD,kDAeC;AAQD,sCAaC;AAjND,4CAAoB;AACpB,8CAAsB;AACtB,gDAAwB;AASjB,MAAM,YAAY,GAAU,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAAhF,QAAA,YAAY,gBAAoE;AAE7F;;;;;;;;;GASG;AACH,MAAM,SAAS,GAAG,wFAAwF,CAAC;AAE3G,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CAAC,CAAC,CAAC;QACxC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -8,19 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const LIMRUN_DIR = ".limrun";
|
|
10
10
|
export declare const TRY_IMPORT_LINE = "try-import %workspace%/.limrun/bazelrc";
|
|
11
|
-
/**
|
|
12
|
-
* Where Bazel writes its build-event log by default — under the self-gitignored
|
|
13
|
-
* `.limrun/`, the directory this module owns and writes the generated config
|
|
14
|
-
* into. Single source of truth for the default path the watcher reads and the
|
|
15
|
-
* generated bazelrc points `--build_event_json_file` at.
|
|
16
|
-
*/
|
|
17
|
-
export declare function defaultBepPath(workspaceRoot: string): string;
|
|
18
|
-
/**
|
|
19
|
-
* Resolves the BEP path for a run: an explicit `--bep-file` (made absolute
|
|
20
|
-
* against the invocation cwd, so it resolves regardless of bazel's cwd) or the
|
|
21
|
-
* default under `.limrun/`.
|
|
22
|
-
*/
|
|
23
|
-
export declare function resolveBepPath(workspaceRoot: string, bepFileFlag?: string): string;
|
|
24
11
|
/**
|
|
25
12
|
* Finds the Bazel workspace root by walking up from `startDir` to the first
|
|
26
13
|
* ancestor containing a MODULE.bazel / WORKSPACE / WORKSPACE.bazel, mirroring
|
|
@@ -100,6 +87,15 @@ export declare function renderXcodeConfigBuild(remoteVersionKey: string, emitLoa
|
|
|
100
87
|
* inputs no longer available remotely". Emptying it under --config=limrun
|
|
101
88
|
* routes caching back to the executor's CAS while leaving the repo's non-limrun
|
|
102
89
|
* builds (where that cache is valid) untouched.
|
|
90
|
+
* - The `--bes_*` flags stream the Build Event Protocol to the daemon's BES
|
|
91
|
+
* service, co-hosted on the same RBE frontend as the executor (hence the same
|
|
92
|
+
* `127.0.0.1:${port}`), powering the live + persisted console.
|
|
93
|
+
* `--bes_upload_mode=nowait_for_upload_complete` keeps the current build from
|
|
94
|
+
* blocking at exit on the BES upload (the wait moves to the start of the next
|
|
95
|
+
* invocation, bounded by `--bes_timeout`), while streams stay complete/acked
|
|
96
|
+
* for the persisted record. An older daemon without the BES service registered
|
|
97
|
+
* answers PublishBuildEvent with a non-fatal warning, so the flags are safe
|
|
98
|
+
* ahead of the image rollout.
|
|
103
99
|
* - `--xcode_version` pins the fleet's version: without it, a mac client
|
|
104
100
|
* lacking that exact version has no mutual version and silently falls back
|
|
105
101
|
* to its LOCAL default, shipping the wrong version to the remote worker via
|
|
@@ -122,18 +118,11 @@ export declare function renderXcodeConfigBuild(remoteVersionKey: string, emitLoa
|
|
|
122
118
|
* - PATH includes /usr/sbin:/sbin so genrules that probe `sysctl` (e.g.
|
|
123
119
|
* `hw.logicalcpu` for `make -j`) resolve it on the worker.
|
|
124
120
|
* - `--remote_download_outputs=minimal` keeps the built .ipa in the instance's
|
|
125
|
-
* CAS instead of downloading it;
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
* the
|
|
129
|
-
*
|
|
130
|
-
* .ipa materialized locally (a command-line flag overrides this rc setting).
|
|
131
|
-
* - `--build_event_json_file` writes the Build Event Protocol to .limrun/bep.json;
|
|
132
|
-
* `lim xcode rbe install` reads the built target's .ipa CAS digest from it. The
|
|
133
|
-
* path is ABSOLUTE on purpose: Bazel expands `%workspace%` only in
|
|
134
|
-
* import/try-import, NOT in flag values (it would be taken literally and create
|
|
135
|
-
* a junk `%workspace%/` dir), and a relative path resolves against bazel's cwd
|
|
136
|
-
* rather than the workspace root.
|
|
121
|
+
* CAS instead of downloading it; the daemon auto-installs it server-side from
|
|
122
|
+
* there (driven by the BES stream), so the bytes never round-trip. The printed
|
|
123
|
+
* `lim xcode rbe` output tells users to add `--remote_download_outputs=toplevel`
|
|
124
|
+
* on the command line when they want the .ipa materialized locally (a
|
|
125
|
+
* command-line flag overrides this rc setting).
|
|
137
126
|
* - `--extra_execution_platforms` is emitted ONLY for non-mac clients: a Linux
|
|
138
127
|
* host has no auto-detected darwin execution platform, so the Apple/Swift
|
|
139
128
|
* toolchain (exec_compatible_with macos) needs one registered to route
|
|
@@ -154,7 +143,7 @@ export declare function renderXcodeConfigBuild(remoteVersionKey: string, emitLoa
|
|
|
154
143
|
* override hook, so callers can extend or override the generated config
|
|
155
144
|
* without editing this file or passing flags on the command line.
|
|
156
145
|
*/
|
|
157
|
-
export declare function renderLimrunBazelrc(port: number, versionKey: string, isMacClient: boolean
|
|
146
|
+
export declare function renderLimrunBazelrc(port: number, versionKey: string, isMacClient: boolean): string;
|
|
158
147
|
/**
|
|
159
148
|
* Idempotently ensures the workspace .bazelrc try-imports the generated
|
|
160
149
|
* fragment. Creates .bazelrc when missing. Returns true when the file changed.
|
|
@@ -170,5 +159,5 @@ export type RbeWorkspaceFiles = {
|
|
|
170
159
|
* try-import. The .gitignore containing "*" makes the directory self-ignoring
|
|
171
160
|
* so nothing else in the user's repo needs to change.
|
|
172
161
|
*/
|
|
173
|
-
export declare function writeRbeWorkspaceFiles(workspaceDir: string, xcodeVersionKey: string, port: number,
|
|
162
|
+
export declare function writeRbeWorkspaceFiles(workspaceDir: string, xcodeVersionKey: string, port: number, isMacClient?: boolean, bazelMajor?: number | null): RbeWorkspaceFiles;
|
|
174
163
|
//# sourceMappingURL=rbe-workspace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rbe-workspace.d.ts","sourceRoot":"","sources":["../../src/lib/rbe-workspace.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH,eAAO,MAAM,UAAU,YAAY,CAAC;AACpC,eAAO,MAAM,eAAe,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"rbe-workspace.d.ts","sourceRoot":"","sources":["../../src/lib/rbe-workspace.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH,eAAO,MAAM,UAAU,YAAY,CAAC;AACpC,eAAO,MAAM,eAAe,2CAA2C,CAAC;AAKxE;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAYtE;AAMD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAqBrE;AAqCD;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAS3E;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAElE;AA6CD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,sBAAsB,CAAC,gBAAgB,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,MAAM,CAmC3F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,MAAM,CA4BlG;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAiB7D;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,MAAM,EACpB,eAAe,EAAE,MAAM,EACvB,IAAI,EAAE,MAAM,EACZ,WAAW,GAAE,OAAuC,EACpD,UAAU,GAAE,MAAM,GAAG,IAA4C,GAChE,iBAAiB,CAcnB"}
|
|
@@ -4,8 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.TRY_IMPORT_LINE = exports.LIMRUN_DIR = void 0;
|
|
7
|
-
exports.defaultBepPath = defaultBepPath;
|
|
8
|
-
exports.resolveBepPath = resolveBepPath;
|
|
9
7
|
exports.findBazelWorkspaceRoot = findBazelWorkspaceRoot;
|
|
10
8
|
exports.inferBuildTarget = inferBuildTarget;
|
|
11
9
|
exports.detectBazelMajorVersion = detectBazelMajorVersion;
|
|
@@ -27,23 +25,6 @@ const path_1 = __importDefault(require("path"));
|
|
|
27
25
|
exports.LIMRUN_DIR = '.limrun';
|
|
28
26
|
exports.TRY_IMPORT_LINE = 'try-import %workspace%/.limrun/bazelrc';
|
|
29
27
|
const TRY_IMPORT_COMMENT = '# Added by lim xcode rbe: loads the generated remote-execution config.';
|
|
30
|
-
/**
|
|
31
|
-
* Where Bazel writes its build-event log by default — under the self-gitignored
|
|
32
|
-
* `.limrun/`, the directory this module owns and writes the generated config
|
|
33
|
-
* into. Single source of truth for the default path the watcher reads and the
|
|
34
|
-
* generated bazelrc points `--build_event_json_file` at.
|
|
35
|
-
*/
|
|
36
|
-
function defaultBepPath(workspaceRoot) {
|
|
37
|
-
return path_1.default.join(workspaceRoot, exports.LIMRUN_DIR, 'bep.json');
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Resolves the BEP path for a run: an explicit `--bep-file` (made absolute
|
|
41
|
-
* against the invocation cwd, so it resolves regardless of bazel's cwd) or the
|
|
42
|
-
* default under `.limrun/`.
|
|
43
|
-
*/
|
|
44
|
-
function resolveBepPath(workspaceRoot, bepFileFlag) {
|
|
45
|
-
return bepFileFlag ? path_1.default.resolve(bepFileFlag) : defaultBepPath(workspaceRoot);
|
|
46
|
-
}
|
|
47
28
|
const WORKSPACE_MARKERS = ['MODULE.bazel', 'WORKSPACE', 'WORKSPACE.bazel'];
|
|
48
29
|
/**
|
|
49
30
|
* Finds the Bazel workspace root by walking up from `startDir` to the first
|
|
@@ -285,6 +266,15 @@ xcode_config(
|
|
|
285
266
|
* inputs no longer available remotely". Emptying it under --config=limrun
|
|
286
267
|
* routes caching back to the executor's CAS while leaving the repo's non-limrun
|
|
287
268
|
* builds (where that cache is valid) untouched.
|
|
269
|
+
* - The `--bes_*` flags stream the Build Event Protocol to the daemon's BES
|
|
270
|
+
* service, co-hosted on the same RBE frontend as the executor (hence the same
|
|
271
|
+
* `127.0.0.1:${port}`), powering the live + persisted console.
|
|
272
|
+
* `--bes_upload_mode=nowait_for_upload_complete` keeps the current build from
|
|
273
|
+
* blocking at exit on the BES upload (the wait moves to the start of the next
|
|
274
|
+
* invocation, bounded by `--bes_timeout`), while streams stay complete/acked
|
|
275
|
+
* for the persisted record. An older daemon without the BES service registered
|
|
276
|
+
* answers PublishBuildEvent with a non-fatal warning, so the flags are safe
|
|
277
|
+
* ahead of the image rollout.
|
|
288
278
|
* - `--xcode_version` pins the fleet's version: without it, a mac client
|
|
289
279
|
* lacking that exact version has no mutual version and silently falls back
|
|
290
280
|
* to its LOCAL default, shipping the wrong version to the remote worker via
|
|
@@ -307,18 +297,11 @@ xcode_config(
|
|
|
307
297
|
* - PATH includes /usr/sbin:/sbin so genrules that probe `sysctl` (e.g.
|
|
308
298
|
* `hw.logicalcpu` for `make -j`) resolve it on the worker.
|
|
309
299
|
* - `--remote_download_outputs=minimal` keeps the built .ipa in the instance's
|
|
310
|
-
* CAS instead of downloading it;
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
* the
|
|
314
|
-
*
|
|
315
|
-
* .ipa materialized locally (a command-line flag overrides this rc setting).
|
|
316
|
-
* - `--build_event_json_file` writes the Build Event Protocol to .limrun/bep.json;
|
|
317
|
-
* `lim xcode rbe install` reads the built target's .ipa CAS digest from it. The
|
|
318
|
-
* path is ABSOLUTE on purpose: Bazel expands `%workspace%` only in
|
|
319
|
-
* import/try-import, NOT in flag values (it would be taken literally and create
|
|
320
|
-
* a junk `%workspace%/` dir), and a relative path resolves against bazel's cwd
|
|
321
|
-
* rather than the workspace root.
|
|
300
|
+
* CAS instead of downloading it; the daemon auto-installs it server-side from
|
|
301
|
+
* there (driven by the BES stream), so the bytes never round-trip. The printed
|
|
302
|
+
* `lim xcode rbe` output tells users to add `--remote_download_outputs=toplevel`
|
|
303
|
+
* on the command line when they want the .ipa materialized locally (a
|
|
304
|
+
* command-line flag overrides this rc setting).
|
|
322
305
|
* - `--extra_execution_platforms` is emitted ONLY for non-mac clients: a Linux
|
|
323
306
|
* host has no auto-detected darwin execution platform, so the Apple/Swift
|
|
324
307
|
* toolchain (exec_compatible_with macos) needs one registered to route
|
|
@@ -339,10 +322,13 @@ xcode_config(
|
|
|
339
322
|
* override hook, so callers can extend or override the generated config
|
|
340
323
|
* without editing this file or passing flags on the command line.
|
|
341
324
|
*/
|
|
342
|
-
function renderLimrunBazelrc(port, versionKey, isMacClient
|
|
325
|
+
function renderLimrunBazelrc(port, versionKey, isMacClient) {
|
|
343
326
|
const execPlatform = isMacClient ? '' : ('build:limrun --extra_execution_platforms=@build_bazel_apple_support//platforms:darwin_arm64\n');
|
|
344
327
|
return `# Generated by lim xcode rbe. Do not edit; rerun the command to refresh.
|
|
345
328
|
build:limrun --remote_executor=grpc://127.0.0.1:${port}
|
|
329
|
+
build:limrun --bes_backend=grpc://127.0.0.1:${port}
|
|
330
|
+
build:limrun --bes_upload_mode=nowait_for_upload_complete
|
|
331
|
+
build:limrun --bes_timeout=60s
|
|
346
332
|
build:limrun --remote_cache=
|
|
347
333
|
build:limrun --remote_default_exec_properties=OSFamily=Darwin
|
|
348
334
|
build:limrun --spawn_strategy=remote
|
|
@@ -354,7 +340,6 @@ build:limrun --xcode_version_config=//.limrun:remote_xcode_config
|
|
|
354
340
|
build:limrun --xcode_version=${shortVersion(versionKey)}
|
|
355
341
|
build:limrun --ios_multi_cpus=sim_arm64
|
|
356
342
|
build:limrun --remote_download_outputs=minimal
|
|
357
|
-
build:limrun --build_event_json_file=${bepPath}
|
|
358
343
|
${execPlatform}build:limrun --action_env=PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
|
359
344
|
|
|
360
345
|
# A user.limrun.bazelrc at the workspace root is try-imported last, so it can
|
|
@@ -390,7 +375,7 @@ function ensureTryImport(workspaceDir) {
|
|
|
390
375
|
* try-import. The .gitignore containing "*" makes the directory self-ignoring
|
|
391
376
|
* so nothing else in the user's repo needs to change.
|
|
392
377
|
*/
|
|
393
|
-
function writeRbeWorkspaceFiles(workspaceDir, xcodeVersionKey, port,
|
|
378
|
+
function writeRbeWorkspaceFiles(workspaceDir, xcodeVersionKey, port, isMacClient = process.platform === 'darwin', bazelMajor = detectBazelMajorVersion(workspaceDir)) {
|
|
394
379
|
const dir = path_1.default.join(workspaceDir, exports.LIMRUN_DIR);
|
|
395
380
|
fs_1.default.mkdirSync(dir, { recursive: true });
|
|
396
381
|
const buildFile = path_1.default.join(dir, 'BUILD');
|
|
@@ -399,13 +384,8 @@ function writeRbeWorkspaceFiles(workspaceDir, xcodeVersionKey, port, bepFile = d
|
|
|
399
384
|
// longer native globals. On a known Bazel 8 workspace they ARE native (and
|
|
400
385
|
// loading would fail), so omit the loads.
|
|
401
386
|
const emitLoads = isBazel9OrLater(bazelMajor);
|
|
402
|
-
// The BEP path is absolute so it resolves regardless of bazel's cwd; the
|
|
403
|
-
// watcher and `lim xcode rbe install` read the same path. Defaults under the
|
|
404
|
-
// self-gitignored .limrun/; a custom --bep-file may point elsewhere, so make
|
|
405
|
-
// sure its parent exists before bazel tries to write it.
|
|
406
|
-
fs_1.default.mkdirSync(path_1.default.dirname(bepFile), { recursive: true });
|
|
407
387
|
fs_1.default.writeFileSync(buildFile, renderXcodeConfigBuild(xcodeVersionKey, emitLoads));
|
|
408
|
-
fs_1.default.writeFileSync(bazelrcFragment, renderLimrunBazelrc(port, xcodeVersionKey, isMacClient
|
|
388
|
+
fs_1.default.writeFileSync(bazelrcFragment, renderLimrunBazelrc(port, xcodeVersionKey, isMacClient));
|
|
409
389
|
fs_1.default.writeFileSync(path_1.default.join(dir, '.gitignore'), '*\n');
|
|
410
390
|
const bazelrcUpdated = ensureTryImport(workspaceDir);
|
|
411
391
|
return { buildFile, bazelrcFragment, bazelrcUpdated };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rbe-workspace.js","sourceRoot":"","sources":["../../src/lib/rbe-workspace.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"rbe-workspace.js","sourceRoot":"","sources":["../../src/lib/rbe-workspace.ts"],"names":[],"mappings":";;;;;;AA0BA,wDAYC;AAeD,4CAqBC;AAgDD,0DASC;AASD,0CAEC;AAyED,wDAmCC;AAqED,kDA4BC;AAMD,0CAiBC;AAaD,wDAoBC;AAnZD,4CAAoB;AACpB,gDAAwB;AAExB;;;;;;;GAOG;AAEU,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,eAAe,GAAG,wCAAwC,CAAC;AACxE,MAAM,kBAAkB,GAAG,wEAAwE,CAAC;AAEpG,MAAM,iBAAiB,GAAG,CAAC,cAAc,EAAE,WAAW,EAAE,iBAAiB,CAAC,CAAC;AAE3E;;;;;;;GAOG;AACH,SAAgB,sBAAsB,CAAC,QAAgB;IACrD,IAAI,GAAG,GAAG,cAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjC,SAAS,CAAC;QACR,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,YAAE,CAAC,UAAU,CAAC,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACpE,OAAO,GAAG,CAAC;QACb,CAAC;QACD,MAAM,MAAM,GAAG,cAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;YACnB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,GAAG,GAAG,MAAM,CAAC;IACf,CAAC;AACH,CAAC;AAED,MAAM,WAAW,GAAG,+CAA+C,CAAC;AACpE,MAAM,cAAc,GAAG,0BAA0B,CAAC;AAClD,MAAM,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KAAK,QAAQ,EACpD,aAA4B,uBAAuB,CAAC,YAAY,CAAC;IAEjE,MAAM,GAAG,GAAG,cAAI,CAAC,IAAI,CAAC,YAAY,EAAE,kBAAU,CAAC,CAAC;IAChD,YAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACvC,MAAM,SAAS,GAAG,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAC1C,MAAM,eAAe,GAAG,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAClD,yEAAyE;IACzE,2EAA2E;IAC3E,0CAA0C;IAC1C,MAAM,SAAS,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;IAC9C,YAAE,CAAC,aAAa,CAAC,SAAS,EAAE,sBAAsB,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC,CAAC;IAChF,YAAE,CAAC,aAAa,CAAC,eAAe,EAAE,mBAAmB,CAAC,IAAI,EAAE,eAAe,EAAE,WAAW,CAAC,CAAC,CAAC;IAC3F,YAAE,CAAC,aAAa,CAAC,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,YAAY,CAAC,EAAE,KAAK,CAAC,CAAC;IACtD,MAAM,cAAc,GAAG,eAAe,CAAC,YAAY,CAAC,CAAC;IACrD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC;AACxD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lim",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "Use remote XCode, iOS Simulator, Android Emulator and more to build and test apps from Linux, Windows or macOS.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"lim": "./bin/run.js"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"test": "jest"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@limrun/api": "^0.33.
|
|
28
|
+
"@limrun/api": "^0.33.5",
|
|
29
29
|
"@oclif/core": "^4",
|
|
30
30
|
"cli-progress": "^3.12.0",
|
|
31
31
|
"cli-table3": "^0.6.5",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { BaseCommand } from '../../../base-command';
|
|
2
|
-
export default class XcodeRbeInstall extends BaseCommand {
|
|
3
|
-
static summary: string;
|
|
4
|
-
static description: string;
|
|
5
|
-
static examples: string[];
|
|
6
|
-
static args: {
|
|
7
|
-
target: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
8
|
-
};
|
|
9
|
-
static flags: {
|
|
10
|
-
id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
-
'bep-file': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
-
'api-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
-
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
-
quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
|
-
create: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
|
-
workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
-
};
|
|
18
|
-
run(): Promise<void>;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=install.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../../src/commands/xcode/rbe/install.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIpD,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,WAAW;IACtD,MAAM,CAAC,OAAO,SAA8E;IAC5F,MAAM,CAAC,WAAW,SAM8B;IAChD,MAAM,CAAC,QAAQ,WAA4F;IAE3G,MAAM,CAAC,IAAI;;MAMT;IAEF,MAAM,CAAC,KAAK;;;;;;;;MAYV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAwG3B"}
|
|
@@ -1,128 +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
|
-
const fs_1 = __importDefault(require("fs"));
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const core_1 = require("@oclif/core");
|
|
9
|
-
const base_command_1 = require("../../../base-command");
|
|
10
|
-
const rbe_workspace_1 = require("../../../lib/rbe-workspace");
|
|
11
|
-
const rbe_session_1 = require("../../../lib/rbe-session");
|
|
12
|
-
class XcodeRbeInstall extends base_command_1.BaseCommand {
|
|
13
|
-
async run() {
|
|
14
|
-
const { args, flags } = await this.parse(XcodeRbeInstall);
|
|
15
|
-
// Never auto-create: install must hit the existing instance whose cache holds
|
|
16
|
-
// the just-built artifact. Without this, a vanished pinned instance would trip
|
|
17
|
-
// withAuth's NotFound recovery and spawn a fresh, empty Xcode instance (whose
|
|
18
|
-
// CAS lacks the .ipa), failing confusingly after leaking an instance.
|
|
19
|
-
this.setParsedFlags({ ...flags, create: false });
|
|
20
|
-
const workspaceRoot = (0, rbe_workspace_1.findBazelWorkspaceRoot)(process.cwd());
|
|
21
|
-
if (!workspaceRoot) {
|
|
22
|
-
this.error('Not inside a Bazel workspace. Run `lim xcode rbe install` from within the workspace you built.');
|
|
23
|
-
}
|
|
24
|
-
// The target may be omitted when the workspace has exactly one app target;
|
|
25
|
-
// otherwise it must be given explicitly (we never guess between several).
|
|
26
|
-
const buildTarget = args.target ?? (0, rbe_workspace_1.inferBuildTarget)(workspaceRoot);
|
|
27
|
-
if (!buildTarget) {
|
|
28
|
-
this.error('Could not infer a single app target. Pass the target explicitly, e.g. ' +
|
|
29
|
-
'`lim xcode rbe install //App:App`.');
|
|
30
|
-
}
|
|
31
|
-
// The generated bazelrc writes the build event log on every --config=limrun
|
|
32
|
-
// build; read the just-built target's .ipa digest from it. Prefer an explicit
|
|
33
|
-
// --bep-file, then the path `lim xcode rbe` recorded in the pidfile (in case a
|
|
34
|
-
// custom --bep-file was used), then the default under .limrun/.
|
|
35
|
-
const pidInfo = (0, rbe_session_1.readRbePidFile)(workspaceRoot);
|
|
36
|
-
const bepPath = (flags['bep-file'] ? path_1.default.resolve(flags['bep-file']) : undefined) ??
|
|
37
|
-
pidInfo?.bepFile ??
|
|
38
|
-
(0, rbe_workspace_1.defaultBepPath)(workspaceRoot);
|
|
39
|
-
let bepJson;
|
|
40
|
-
try {
|
|
41
|
-
bepJson = fs_1.default.readFileSync(bepPath, 'utf8');
|
|
42
|
-
}
|
|
43
|
-
catch {
|
|
44
|
-
this.error(`No build event log at ${bepPath}. Build first with --config=limrun ` +
|
|
45
|
-
`(e.g. \`bazelisk --digest_function=sha256 build --config=limrun ${buildTarget}\`), then re-run.`);
|
|
46
|
-
}
|
|
47
|
-
// Target the instance the background tunnel is serving for this workspace
|
|
48
|
-
// (recorded in .limrun/rbe.pid by `lim xcode rbe`), since that's the one
|
|
49
|
-
// whose CAS holds the build. An explicit --id wins; otherwise fall back to
|
|
50
|
-
// the pidfile, then to the most recent Xcode target.
|
|
51
|
-
const instanceId = flags.id ?? pidInfo?.instanceId;
|
|
52
|
-
await this.withAuth(async () => {
|
|
53
|
-
// Target an existing instance (do not create): install needs the instance
|
|
54
|
-
// whose cache holds the just-built artifact.
|
|
55
|
-
const target = await this.resolveXcodeTarget(instanceId);
|
|
56
|
-
const client = await this.resolveXcodeClient(target);
|
|
57
|
-
this.info(`Installing ${buildTarget} on the attached simulator...`);
|
|
58
|
-
// The SDK parses the .ipa's CAS digest out of the BEP and installs it; a
|
|
59
|
-
// missing target/.ipa or a non-SHA256 (BLAKE3) digest surfaces clearly here.
|
|
60
|
-
let result;
|
|
61
|
-
try {
|
|
62
|
-
result = await client.installRbeBuildFromBep({ bep: bepJson, target: buildTarget });
|
|
63
|
-
}
|
|
64
|
-
catch (err) {
|
|
65
|
-
this.error(err instanceof Error ? err.message : String(err));
|
|
66
|
-
}
|
|
67
|
-
if (flags.json) {
|
|
68
|
-
this.outputJson({ ...result, target: buildTarget });
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
const appName = result.appName ?? result.ipaName;
|
|
72
|
-
if (!result.installed) {
|
|
73
|
-
// No simulator attached: nothing was installed. Attach one and re-run
|
|
74
|
-
// (e.g. `lim xcode rbe --ios`, then `lim xcode rbe install`).
|
|
75
|
-
this.output(`No simulator attached, so ${appName} was not installed. ` +
|
|
76
|
-
'Attach one (e.g. `lim xcode rbe --ios`) and re-run.');
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
const timing = result.syncDurationMs !== undefined ?
|
|
80
|
-
` (synced in ${result.syncDurationMs}ms, installed in ${result.installDurationMs ?? 0}ms)`
|
|
81
|
-
: '';
|
|
82
|
-
this.output(`Installed ${appName}${timing}`);
|
|
83
|
-
if (result.bundleId) {
|
|
84
|
-
this.output(`Bundle ID: ${result.bundleId}`);
|
|
85
|
-
}
|
|
86
|
-
// Point the stream at the attached simulator, not the Xcode host. For an
|
|
87
|
-
// iOS-backed target the target id is the simulator; otherwise resolve it
|
|
88
|
-
// from the attached simulator (install only reaches here with one attached).
|
|
89
|
-
// Best-effort: the install already succeeded, so never fail over the URL.
|
|
90
|
-
const simId = target.type === 'ios' ?
|
|
91
|
-
target.id
|
|
92
|
-
: await client
|
|
93
|
-
.getSimulator()
|
|
94
|
-
.then((s) => s.simulator?.iosInstanceId)
|
|
95
|
-
.catch(() => undefined);
|
|
96
|
-
if (simId) {
|
|
97
|
-
this.output(`iOS Simulator URL: ${this.consoleStreamUrl(simId)}`);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
XcodeRbeInstall.summary = 'Install a Bazel RBE build on the attached simulator (no client download)';
|
|
103
|
-
XcodeRbeInstall.description = 'After `bazelisk build --config=limrun <target>`, install the built app on the Xcode ' +
|
|
104
|
-
"instance's attached simulator. The .ipa stays in the instance cache (it is never downloaded " +
|
|
105
|
-
'to this machine); its CAS digest is read from the Bazel build event log (.limrun/bep.json) ' +
|
|
106
|
-
'and the instance fetches, unpacks, and diff-syncs the app to the simulator. Run it AFTER the ' +
|
|
107
|
-
'build, with a simulator attached (e.g. via `lim xcode rbe --ios`). The target is optional ' +
|
|
108
|
-
'when the workspace has a single app target.';
|
|
109
|
-
XcodeRbeInstall.examples = ['<%= config.bin %> xcode rbe install', '<%= config.bin %> xcode rbe install //App:App'];
|
|
110
|
-
XcodeRbeInstall.args = {
|
|
111
|
-
target: core_1.Args.string({
|
|
112
|
-
description: 'The Bazel target that was built (e.g. //App:App). Optional: inferred when the workspace has exactly one app target.',
|
|
113
|
-
required: false,
|
|
114
|
-
}),
|
|
115
|
-
};
|
|
116
|
-
XcodeRbeInstall.flags = {
|
|
117
|
-
...base_command_1.BaseCommand.baseFlags,
|
|
118
|
-
id: core_1.Flags.string({
|
|
119
|
-
description: 'Xcode instance ID to target. Defaults to the most recent standalone Xcode target (the one `lim xcode rbe` used).',
|
|
120
|
-
}),
|
|
121
|
-
'bep-file': core_1.Flags.string({
|
|
122
|
-
description: "Bazel build event log to read the built .ipa's CAS digest from. Defaults to the path " +
|
|
123
|
-
'`lim xcode rbe` recorded, then .limrun/bep.json; set it only for a standalone run (no running ' +
|
|
124
|
-
'`lim xcode rbe`) whose build wrote the log to a non-default path.',
|
|
125
|
-
}),
|
|
126
|
-
};
|
|
127
|
-
exports.default = XcodeRbeInstall;
|
|
128
|
-
//# sourceMappingURL=install.js.map
|
|
@@ -1 +0,0 @@
|
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;IAC7F,+FAA+F;IAC/F,4FAA4F;IAC5F,6CAA6C,CAAC;AACzC,wBAAQ,GAAG,CAAC,qCAAqC,EAAE,+CAA+C,CAAC,CAAC;AAEpG,oBAAI,GAAG;IACZ,MAAM,EAAE,WAAI,CAAC,MAAM,CAAC;QAClB,WAAW,EACT,qHAAqH;QACvH,QAAQ,EAAE,KAAK;KAChB,CAAC;CACH,CAAC;AAEK,qBAAK,GAAG;IACb,GAAG,0BAAW,CAAC,SAAS;IACxB,EAAE,EAAE,YAAK,CAAC,MAAM,CAAC;QACf,WAAW,EACT,kHAAkH;KACrH,CAAC;IACF,UAAU,EAAE,YAAK,CAAC,MAAM,CAAC;QACvB,WAAW,EACT,uFAAuF;YACvF,gGAAgG;YAChG,mEAAmE;KACtE,CAAC;CACH,CAAC;kBA/BiB,eAAe"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { XcodeClient } from '@limrun/api';
|
|
2
|
-
/**
|
|
3
|
-
* Watches a workspace's `.limrun/bep.json` and, after each completed build,
|
|
4
|
-
* registers the built target's `.ipa` with the instance so it is installed on
|
|
5
|
-
* the attached simulator now (and replayed on a later attach). This is the
|
|
6
|
-
* client-side trigger for `lim xcode rbe` auto-install: only Bazel (on the
|
|
7
|
-
* client) knows the build finished and which CAS digest is the top-level `.ipa`,
|
|
8
|
-
* so the daemon holding the tunnel watches the BEP and the instance does the
|
|
9
|
-
* install server-side.
|
|
10
|
-
*
|
|
11
|
-
* Robustness is the priority: this runs inside the detached daemon that holds
|
|
12
|
-
* the only RBE tunnel, so every read/parse/HTTP error is caught and logged, and
|
|
13
|
-
* the watcher never throws into the daemon (a crash here would drop the tunnel
|
|
14
|
-
* mid-build). It is also idempotent: it acts once per Bazel invocation, even
|
|
15
|
-
* when a build reproduces an earlier `.ipa` digest (e.g. a `git stash` revert),
|
|
16
|
-
* because the instance keys "already installed" on the CAS digest.
|
|
17
|
-
*/
|
|
18
|
-
export type BepWatcherOptions = {
|
|
19
|
-
/** Absolute path to Bazel's build-event JSON log (`--build_event_json_file`). */
|
|
20
|
-
bepPath: string;
|
|
21
|
-
/** The build target to select from the BEP and install (e.g. //App:App). */
|
|
22
|
-
target: string;
|
|
23
|
-
/** Returns the XcodeClient to use; called per install so a refreshed client is picked up. */
|
|
24
|
-
getClient: () => XcodeClient;
|
|
25
|
-
/** Sink for status/diagnostic lines (the daemon redirects stdout/stderr to .limrun/rbe.log). */
|
|
26
|
-
log: (msg: string) => void;
|
|
27
|
-
/** Debounce window after a BEP change before acting. */
|
|
28
|
-
debounceMs?: number;
|
|
29
|
-
/** mtime-poll backstop interval (covers FSEvents coalescing/drops on macOS). */
|
|
30
|
-
pollIntervalMs?: number;
|
|
31
|
-
/** Delay before retrying a build after a transient install failure. */
|
|
32
|
-
retryDelayMs?: number;
|
|
33
|
-
/** Max transient-failure retries for one build before giving up (rebuild to retry). */
|
|
34
|
-
maxRetries?: number;
|
|
35
|
-
};
|
|
36
|
-
export type BepWatcher = {
|
|
37
|
-
/** Stops watching and awaits any in-flight registration. Idempotent. */
|
|
38
|
-
close: () => Promise<void>;
|
|
39
|
-
};
|
|
40
|
-
export declare function startBepWatcher(opts: BepWatcherOptions): BepWatcher;
|
|
41
|
-
//# sourceMappingURL=rbe-bep-watcher.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rbe-bep-watcher.d.ts","sourceRoot":"","sources":["../../src/lib/rbe-bep-watcher.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgB,WAAW,EAAE,MAAM,aAAa,CAAC;AAE7D;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,iFAAiF;IACjF,OAAO,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,6FAA6F;IAC7F,SAAS,EAAE,MAAM,WAAW,CAAC;IAC7B,gGAAgG;IAChG,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3B,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gFAAgF;IAChF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uFAAuF;IACvF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,wEAAwE;IACxE,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B,CAAC;AAEF,wBAAgB,eAAe,CAAC,IAAI,EAAE,iBAAiB,GAAG,UAAU,CAuPnE"}
|