lim 0.16.2 → 0.16.4

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.
Files changed (40) hide show
  1. package/dist/commands/ios/create.js +2 -2
  2. package/dist/commands/ios/create.js.map +1 -1
  3. package/dist/commands/ios/keychain/generate-key.d.ts.map +1 -1
  4. package/dist/commands/ios/keychain/generate-key.js +1 -1
  5. package/dist/commands/ios/keychain/generate-key.js.map +1 -1
  6. package/dist/commands/ios/keychain/{import.d.ts → restore.d.ts} +2 -2
  7. package/dist/commands/ios/keychain/restore.d.ts.map +1 -0
  8. package/dist/commands/ios/keychain/{import.js → restore.js} +20 -20
  9. package/dist/commands/ios/keychain/restore.js.map +1 -0
  10. package/dist/commands/ios/keychain/{export.d.ts → save.d.ts} +2 -2
  11. package/dist/commands/ios/keychain/save.d.ts.map +1 -0
  12. package/dist/commands/ios/keychain/{export.js → save.js} +21 -21
  13. package/dist/commands/ios/keychain/save.js.map +1 -0
  14. package/dist/commands/xcode/{rbe.d.ts → rbe/index.d.ts} +7 -3
  15. package/dist/commands/xcode/rbe/index.d.ts.map +1 -0
  16. package/dist/commands/xcode/{rbe.js → rbe/index.js} +79 -23
  17. package/dist/commands/xcode/rbe/index.js.map +1 -0
  18. package/dist/commands/xcode/rbe/upload.d.ts +19 -0
  19. package/dist/commands/xcode/rbe/upload.d.ts.map +1 -0
  20. package/dist/commands/xcode/rbe/upload.js +77 -0
  21. package/dist/commands/xcode/rbe/upload.js.map +1 -0
  22. package/dist/lib/rbe-auto-upload.d.ts +24 -0
  23. package/dist/lib/rbe-auto-upload.d.ts.map +1 -0
  24. package/dist/lib/rbe-auto-upload.js +131 -0
  25. package/dist/lib/rbe-auto-upload.js.map +1 -0
  26. package/dist/lib/rbe-session.d.ts +8 -26
  27. package/dist/lib/rbe-session.d.ts.map +1 -1
  28. package/dist/lib/rbe-session.js +9 -65
  29. package/dist/lib/rbe-session.js.map +1 -1
  30. package/package.json +2 -2
  31. package/dist/commands/ios/keychain/export.d.ts.map +0 -1
  32. package/dist/commands/ios/keychain/export.js.map +0 -1
  33. package/dist/commands/ios/keychain/import.d.ts.map +0 -1
  34. package/dist/commands/ios/keychain/import.js.map +0 -1
  35. package/dist/commands/xcode/rbe.d.ts.map +0 -1
  36. package/dist/commands/xcode/rbe.js.map +0 -1
  37. package/dist/lib/rbe-workspace.d.ts +0 -163
  38. package/dist/lib/rbe-workspace.d.ts.map +0 -1
  39. package/dist/lib/rbe-workspace.js +0 -396
  40. package/dist/lib/rbe-workspace.js.map +0 -1
@@ -1,163 +0,0 @@
1
- /**
2
- * Generates the .limrun/ workspace companion for Limrun remote execution: a Bazel
3
- * package pinning the remote fleet's Xcode version and an rc fragment with the
4
- * remote-execution flags under the `limrun` config. The caller learns the
5
- * fleet's version key from the instance's RBE status, so the generated config
6
- * always matches the fleet without any user action; regenerating the files
7
- * after a fleet Xcode upgrade refreshes the pin.
8
- */
9
- export declare const LIMRUN_DIR = ".limrun";
10
- export declare const TRY_IMPORT_LINE = "try-import %workspace%/.limrun/bazelrc";
11
- /**
12
- * Finds the Bazel workspace root by walking up from `startDir` to the first
13
- * ancestor containing a MODULE.bazel / WORKSPACE / WORKSPACE.bazel, mirroring
14
- * how Bazel itself locates the workspace when run from a subdirectory. Returns
15
- * null when no workspace is found up to the filesystem root. The generated
16
- * `.limrun/` and the `try-import` must live at this root, since `%workspace%`
17
- * in bazelrc resolves here regardless of the directory the build is run from.
18
- */
19
- export declare function findBazelWorkspaceRoot(startDir: string): string | null;
20
- /**
21
- * Best-effort guess of a single buildable app target to show in the printed
22
- * build command, so it reads `//App` instead of a `//your:target` placeholder.
23
- * Scans the workspace's BUILD files (buildifier-formatted) for apple
24
- * `*_application` rules (no bazel invocation) and returns the label in short
25
- * form (`//pkg` when the target name matches the package's last segment).
26
- * Returns null when there are zero or multiple candidates (ambiguous → caller
27
- * keeps the placeholder).
28
- */
29
- export declare function inferBuildTarget(workspaceRoot: string): string | null;
30
- /**
31
- * Reads the workspace's pinned Bazel major version from `.bazelversion`, or
32
- * null when the file is absent or its first line has no leading integer.
33
- *
34
- * Used to decide whether the generated BUILD must `load` the Xcode rules from
35
- * apple_support: in Bazel 9 they are no longer native globals and must be
36
- * loaded, while in Bazel 8 they ARE native globals and the apple_support rule
37
- * impls `fail()` on the unmigrated Bazel, so loading them there breaks
38
- * analysis. The generator runs in the workspace on the client, so the file is
39
- * the authoritative signal for the Bazel that bazelisk will launch.
40
- */
41
- export declare function detectBazelMajorVersion(workspaceDir: string): number | null;
42
- /**
43
- * Whether to treat the workspace as Bazel 9+ for RBE config: true when the
44
- * detected major version is >= 9, OR unknown (no `.bazelversion` means bazelisk
45
- * runs the latest release, which is 9+). This single predicate decides both
46
- * emitting the apple_support Xcode-rule loads and surfacing the SHA256 digest
47
- * hint, so the two stay in lockstep.
48
- */
49
- export declare function isBazel9OrLater(bazelMajor: number | null): boolean;
50
- /**
51
- * Renders the generated Bazel package pinning the Xcode version to the fleet's.
52
- *
53
- * remoteVersionKey is the fleet's `xcodebuild -version` in major.minor.patch.build
54
- * form (e.g. 26.4.0.17E192).
55
- *
56
- * Uses Bazel's remote/local `xcode_config` split with BOTH sets pointing at the
57
- * SAME fleet pin (rather than a single `default=/versions=` bucket, which
58
- * resolves with availability UNKNOWN and leaves Apple/Swift actions eligible for
59
- * local execution). With local == remote, `--xcode_version` resolves as
60
- * "mutually available" (BOTH), which declares up front that this build uses only
61
- * the fleet's Xcode AND keeps apple_support from emitting its remote-only
62
- * "...specified, but it is not available locally..." DEBUG notice (that notice
63
- * fires only when the pinned version is in `remote_versions` but not
64
- * `local_versions`).
65
- *
66
- * We intentionally do NOT name the client's own local Xcode: under
67
- * `--config=limrun` every action runs remotely (`--spawn_strategy=remote` +
68
- * `--noremote_local_fallback`), so a local DEVELOPER_DIR is never resolved.
69
- * Declaring a distinct local version would only reintroduce that DEBUG notice on
70
- * a client whose Xcode differs from the fleet's. (The fleet pin is used, not
71
- * Bazel's `@local_config_xcode//:host_available_xcodes`: that repo is not
72
- * visible from the main module under bzlmod and is never generated off-darwin.)
73
- *
74
- * When `emitLoads` is true (Bazel 9+), the Xcode rules are loaded from
75
- * apple_support; on Bazel 8 they are native globals and MUST NOT be loaded
76
- * (the apple_support rule impls fail on the unmigrated Bazel).
77
- */
78
- export declare function renderXcodeConfigBuild(remoteVersionKey: string, emitLoads: boolean): string;
79
- /**
80
- * Renders the rc fragment with the remote-execution flags under
81
- * --config=limrun.
82
- *
83
- * - `--remote_cache=` (empty) clears any workspace-level `--remote_cache`. The
84
- * limrun executor carries its own CAS, so a separate cache backend (e.g. a
85
- * repo pointing `--remote_cache` at BuildBuddy/EngFlow) splits inputs and
86
- * outputs across two stores the executor cannot reconcile, surfacing as "Lost
87
- * inputs no longer available remotely". Emptying it under --config=limrun
88
- * routes caching back to the executor's CAS while leaving the repo's non-limrun
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.
99
- * - `--xcode_version` pins the fleet's version: without it, a mac client
100
- * lacking that exact version has no mutual version and silently falls back
101
- * to its LOCAL default, shipping the wrong version to the remote worker via
102
- * XCODE_VERSION_OVERRIDE (the worker then rejects it).
103
- * - `--strategy=SwiftCompile=remote` / `--strategy=Genrule=remote` override
104
- * mnemonic-specific strategies a workspace may pin (rules_swift defaults
105
- * SwiftCompile to a local persistent `worker`; repos often pin Genrule to
106
- * `standalone`). Those run locally and break RBE: a local Swift worker can't
107
- * run on a Linux client at all, and on a mac it would demand the fleet's
108
- * Xcode locally. --spawn_strategy=remote does not override per-mnemonic
109
- * pins, so these explicit overrides are required.
110
- * - `--ios_multi_cpus=sim_arm64` pins the app to the **arm64 iOS simulator**.
111
- * Limrun's Mac fleet (workers and the attached simulators) is Apple Silicon,
112
- * so the build product must be arm64. Without this, the simulator cpu follows
113
- * the CLIENT's Bazel default (`sim_arm64` on an Apple Silicon Mac, but
114
- * `x86_64` on an Intel Mac or a Linux client), and an x86_64 app installed on
115
- * the arm64 fleet simulator fails to launch with "needs to be updated by the
116
- * developer to work on this version of iOS". The pin makes the artifact match
117
- * the fleet regardless of where bazel runs (the whole point of RBE).
118
- * - PATH includes /usr/sbin:/sbin so genrules that probe `sysctl` (e.g.
119
- * `hw.logicalcpu` for `make -j`) resolve it on the worker.
120
- * - `--remote_download_outputs=minimal` keeps the built .ipa in the instance's
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).
126
- * - `--extra_execution_platforms` is emitted ONLY for non-mac clients: a Linux
127
- * host has no auto-detected darwin execution platform, so the Apple/Swift
128
- * toolchain (exec_compatible_with macos) needs one registered to route
129
- * actions to the mac RBE pool. On a mac it is HARMFUL: it makes bazel run
130
- * exec-config actions on the local host instead of the remote worker, which
131
- * then demand a local Xcode.
132
- * - `--modify_execution_info=.*=-no-remote,.*=-no-remote-exec` strips the
133
- * `no-remote`/`no-remote-exec` execution-info tags rules_apple sets on
134
- * bundling/linking/signing actions (in-code on device builds, and via its
135
- * recommended `+no-remote` bazelrc that real iOS repos carry). Under
136
- * --config=limrun every action runs remotely, so any such tag leaves the
137
- * action with no usable strategy ("cannot be executed with any of the
138
- * available strategies: [remote]") and the build fails. That is the exact
139
- * breakage a Linux client (no local Xcode) hits. This is the execution-info
140
- * analog of the --strategy=...=remote overrides above; stripping globally is
141
- * safe because removing a tag an action never had is a no-op.
142
- * - A `user.limrun.bazelrc` at the workspace root is try-imported last as a user
143
- * override hook, so callers can extend or override the generated config
144
- * without editing this file or passing flags on the command line.
145
- */
146
- export declare function renderLimrunBazelrc(port: number, versionKey: string, isMacClient: boolean): string;
147
- /**
148
- * Idempotently ensures the workspace .bazelrc try-imports the generated
149
- * fragment. Creates .bazelrc when missing. Returns true when the file changed.
150
- */
151
- export declare function ensureTryImport(workspaceDir: string): boolean;
152
- export type RbeWorkspaceFiles = {
153
- buildFile: string;
154
- bazelrcFragment: string;
155
- bazelrcUpdated: boolean;
156
- };
157
- /**
158
- * Writes .limrun/{BUILD,bazelrc,.gitignore} into the workspace and wires the
159
- * try-import. The .gitignore containing "*" makes the directory self-ignoring
160
- * so nothing else in the user's repo needs to change.
161
- */
162
- export declare function writeRbeWorkspaceFiles(workspaceDir: string, xcodeVersionKey: string, port: number, isMacClient?: boolean, bazelMajor?: number | null): RbeWorkspaceFiles;
163
- //# sourceMappingURL=rbe-workspace.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rbe-workspace.d.ts","sourceRoot":"","sources":["../../src/lib/rbe-workspace.ts"],"names":[],"mappings":"AAMA;;;;;;;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"}
@@ -1,396 +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.TRY_IMPORT_LINE = exports.LIMRUN_DIR = void 0;
7
- exports.findBazelWorkspaceRoot = findBazelWorkspaceRoot;
8
- exports.inferBuildTarget = inferBuildTarget;
9
- exports.detectBazelMajorVersion = detectBazelMajorVersion;
10
- exports.isBazel9OrLater = isBazel9OrLater;
11
- exports.renderXcodeConfigBuild = renderXcodeConfigBuild;
12
- exports.renderLimrunBazelrc = renderLimrunBazelrc;
13
- exports.ensureTryImport = ensureTryImport;
14
- exports.writeRbeWorkspaceFiles = writeRbeWorkspaceFiles;
15
- // Mirrored between src/rbe-workspace.ts (canonical) and packages/cli/src/lib/rbe-workspace.ts
16
- // until the CLI imports it from a published @limrun/api; tests/rbe-copy-sync.test.ts keeps the
17
- // two copies byte-identical. Apply any edit to both.
18
- const fs_1 = __importDefault(require("fs"));
19
- const path_1 = __importDefault(require("path"));
20
- /**
21
- * Generates the .limrun/ workspace companion for Limrun remote execution: a Bazel
22
- * package pinning the remote fleet's Xcode version and an rc fragment with the
23
- * remote-execution flags under the `limrun` config. The caller learns the
24
- * fleet's version key from the instance's RBE status, so the generated config
25
- * always matches the fleet without any user action; regenerating the files
26
- * after a fleet Xcode upgrade refreshes the pin.
27
- */
28
- exports.LIMRUN_DIR = '.limrun';
29
- exports.TRY_IMPORT_LINE = 'try-import %workspace%/.limrun/bazelrc';
30
- const TRY_IMPORT_COMMENT = '# Added by Limrun remote-execution setup: loads the generated config.';
31
- const WORKSPACE_MARKERS = ['MODULE.bazel', 'WORKSPACE', 'WORKSPACE.bazel'];
32
- /**
33
- * Finds the Bazel workspace root by walking up from `startDir` to the first
34
- * ancestor containing a MODULE.bazel / WORKSPACE / WORKSPACE.bazel, mirroring
35
- * how Bazel itself locates the workspace when run from a subdirectory. Returns
36
- * null when no workspace is found up to the filesystem root. The generated
37
- * `.limrun/` and the `try-import` must live at this root, since `%workspace%`
38
- * in bazelrc resolves here regardless of the directory the build is run from.
39
- */
40
- function findBazelWorkspaceRoot(startDir) {
41
- let dir = path_1.default.resolve(startDir);
42
- for (;;) {
43
- if (WORKSPACE_MARKERS.some((m) => fs_1.default.existsSync(path_1.default.join(dir, m)))) {
44
- return dir;
45
- }
46
- const parent = path_1.default.dirname(dir);
47
- if (parent === dir) {
48
- return null;
49
- }
50
- dir = parent;
51
- }
52
- }
53
- const APP_RULE_RE = /\b(?:ios|macos|tvos|watchos)_application\s*\(/;
54
- const TARGET_NAME_RE = /^\s*name\s*=\s*"([^"]+)"/;
55
- const TARGET_SCAN_SKIP_DIRS = new Set(['.git', 'node_modules', '.limrun']);
56
- /**
57
- * Best-effort guess of a single buildable app target to show in the printed
58
- * build command, so it reads `//App` instead of a `//your:target` placeholder.
59
- * Scans the workspace's BUILD files (buildifier-formatted) for apple
60
- * `*_application` rules (no bazel invocation) and returns the label in short
61
- * form (`//pkg` when the target name matches the package's last segment).
62
- * Returns null when there are zero or multiple candidates (ambiguous → caller
63
- * keeps the placeholder).
64
- */
65
- function inferBuildTarget(workspaceRoot) {
66
- const found = [];
67
- const walk = (dir) => {
68
- if (found.length > 1)
69
- return; // already ambiguous; stop early
70
- let entries;
71
- try {
72
- entries = fs_1.default.readdirSync(dir, { withFileTypes: true });
73
- }
74
- catch {
75
- return;
76
- }
77
- for (const entry of entries) {
78
- if (entry.isDirectory()) {
79
- if (TARGET_SCAN_SKIP_DIRS.has(entry.name) || entry.name.startsWith('bazel-'))
80
- continue;
81
- walk(path_1.default.join(dir, entry.name));
82
- }
83
- else if (entry.name === 'BUILD' || entry.name === 'BUILD.bazel') {
84
- collectAppTargets(path_1.default.join(dir, entry.name), workspaceRoot, found);
85
- }
86
- }
87
- };
88
- walk(workspaceRoot);
89
- return found.length === 1 ? found[0] : null;
90
- }
91
- /** Appends `//pkg[:name]` labels of apple application rules in one BUILD file. */
92
- function collectAppTargets(buildFile, workspaceRoot, out) {
93
- let content;
94
- try {
95
- content = fs_1.default.readFileSync(buildFile, 'utf8');
96
- }
97
- catch {
98
- return;
99
- }
100
- const pkg = path_1.default.relative(workspaceRoot, path_1.default.dirname(buildFile)).split(path_1.default.sep).join('/');
101
- let inAppRule = false;
102
- for (const line of content.split('\n')) {
103
- // Skip comment lines so a commented-out `# ios_application(` can't start a
104
- // phantom rule (and a commented `# name = ...` can't be captured), which
105
- // would otherwise leave inAppRule set and mislabel a later rule's name.
106
- if (line.trimStart().startsWith('#'))
107
- continue;
108
- if (!inAppRule) {
109
- if (APP_RULE_RE.test(line))
110
- inAppRule = true;
111
- continue;
112
- }
113
- const match = line.match(TARGET_NAME_RE);
114
- if (match) {
115
- const name = match[1];
116
- const last = pkg.split('/').pop();
117
- out.push(pkg === '' || pkg === '.' ? `//:${name}`
118
- : last === name ? `//${pkg}`
119
- : `//${pkg}:${name}`);
120
- inAppRule = false;
121
- }
122
- else if (/^\)/.test(line)) {
123
- inAppRule = false; // rule closed before a name line we could read
124
- }
125
- }
126
- }
127
- /**
128
- * Reads the workspace's pinned Bazel major version from `.bazelversion`, or
129
- * null when the file is absent or its first line has no leading integer.
130
- *
131
- * Used to decide whether the generated BUILD must `load` the Xcode rules from
132
- * apple_support: in Bazel 9 they are no longer native globals and must be
133
- * loaded, while in Bazel 8 they ARE native globals and the apple_support rule
134
- * impls `fail()` on the unmigrated Bazel, so loading them there breaks
135
- * analysis. The generator runs in the workspace on the client, so the file is
136
- * the authoritative signal for the Bazel that bazelisk will launch.
137
- */
138
- function detectBazelMajorVersion(workspaceDir) {
139
- try {
140
- const raw = fs_1.default.readFileSync(path_1.default.join(workspaceDir, '.bazelversion'), 'utf8');
141
- const firstLine = (raw.split('\n', 1)[0] ?? '').trim();
142
- const match = firstLine.match(/^(\d+)/);
143
- return match ? Number(match[1]) : null;
144
- }
145
- catch {
146
- return null;
147
- }
148
- }
149
- /**
150
- * Whether to treat the workspace as Bazel 9+ for RBE config: true when the
151
- * detected major version is >= 9, OR unknown (no `.bazelversion` means bazelisk
152
- * runs the latest release, which is 9+). This single predicate decides both
153
- * emitting the apple_support Xcode-rule loads and surfacing the SHA256 digest
154
- * hint, so the two stay in lockstep.
155
- */
156
- function isBazel9OrLater(bazelMajor) {
157
- return bazelMajor === null || bazelMajor >= 9;
158
- }
159
- /** Major.minor short alias (e.g. "26.4") used for the SDK default and --xcode_version. */
160
- function shortVersion(versionKey) {
161
- const parts = versionKey.split('.');
162
- if (parts.length < 3) {
163
- throw new Error(`unexpected Xcode version key from the instance: ${versionKey}`);
164
- }
165
- return `${parts[0]}.${parts[1]}`;
166
- }
167
- /** Renders one xcode_version rule from a major.minor.patch.build version key. */
168
- function renderXcodeVersionRule(name, versionKey) {
169
- // shortVersion validates the key shape (major.minor.patch[.build]) and yields
170
- // the major.minor used for both the SDK defaults and the short alias.
171
- const sdk = shortVersion(versionKey);
172
- const parts = versionKey.split('.');
173
- const fullAlias = `${parts[0]}.${parts[1]}.${parts[2]}`;
174
- return `xcode_version(
175
- name = "${name}",
176
- aliases = [
177
- "${sdk}",
178
- "${fullAlias}",
179
- ],
180
- default_ios_sdk_version = "${sdk}",
181
- default_macos_sdk_version = "${sdk}",
182
- default_tvos_sdk_version = "${sdk}",
183
- default_watchos_sdk_version = "${sdk}",
184
- version = "${versionKey}",
185
- )`;
186
- }
187
- /**
188
- * Renders an `available_xcodes` set with a single member that is also its
189
- * mandatory default. Both sets the BUILD file emits (remote, local) are
190
- * single-version sets of this shape, pointing at the same fleet pin.
191
- */
192
- function renderAvailableXcodes(name, target) {
193
- return `available_xcodes(
194
- name = "${name}",
195
- default = "${target}",
196
- versions = ["${target}"],
197
- )`;
198
- }
199
- /**
200
- * Renders the generated Bazel package pinning the Xcode version to the fleet's.
201
- *
202
- * remoteVersionKey is the fleet's `xcodebuild -version` in major.minor.patch.build
203
- * form (e.g. 26.4.0.17E192).
204
- *
205
- * Uses Bazel's remote/local `xcode_config` split with BOTH sets pointing at the
206
- * SAME fleet pin (rather than a single `default=/versions=` bucket, which
207
- * resolves with availability UNKNOWN and leaves Apple/Swift actions eligible for
208
- * local execution). With local == remote, `--xcode_version` resolves as
209
- * "mutually available" (BOTH), which declares up front that this build uses only
210
- * the fleet's Xcode AND keeps apple_support from emitting its remote-only
211
- * "...specified, but it is not available locally..." DEBUG notice (that notice
212
- * fires only when the pinned version is in `remote_versions` but not
213
- * `local_versions`).
214
- *
215
- * We intentionally do NOT name the client's own local Xcode: under
216
- * `--config=limrun` every action runs remotely (`--spawn_strategy=remote` +
217
- * `--noremote_local_fallback`), so a local DEVELOPER_DIR is never resolved.
218
- * Declaring a distinct local version would only reintroduce that DEBUG notice on
219
- * a client whose Xcode differs from the fleet's. (The fleet pin is used, not
220
- * Bazel's `@local_config_xcode//:host_available_xcodes`: that repo is not
221
- * visible from the main module under bzlmod and is never generated off-darwin.)
222
- *
223
- * When `emitLoads` is true (Bazel 9+), the Xcode rules are loaded from
224
- * apple_support; on Bazel 8 they are native globals and MUST NOT be loaded
225
- * (the apple_support rule impls fail on the unmigrated Bazel).
226
- */
227
- function renderXcodeConfigBuild(remoteVersionKey, emitLoads) {
228
- // Bazel 9 migrated xcode_version/available_xcodes/xcode_config out of native
229
- // globals into apple_support; they must be loaded there. The repo_name
230
- // @build_bazel_apple_support is the apple_support module convention.
231
- const loads = emitLoads ?
232
- `load("@build_bazel_apple_support//xcode:xcode_version.bzl", "xcode_version")
233
- load("@build_bazel_apple_support//xcode:available_xcodes.bzl", "available_xcodes")
234
- load("@build_bazel_apple_support//xcode:xcode_config.bzl", "xcode_config")
235
-
236
- `
237
- : '';
238
- const remoteRule = renderXcodeVersionRule('remote_xcode', remoteVersionKey);
239
- return `# Generated by lim xcode rbe. Do not edit; rerun the command to refresh.
240
- #
241
- # Pins the Xcode version Bazel uses to the limrun fleet's Xcode, independent of
242
- # any Xcode installed on this machine. Both the remote and local sets point at
243
- # the SAME pin so --xcode_version resolves as mutually available (no
244
- # apple_support remote-only DEBUG notice); under --config=limrun all actions run
245
- # remotely, so a local DEVELOPER_DIR is never resolved. Selected via
246
- # .limrun/bazelrc (--config=limrun).
247
- ${loads}${remoteRule}
248
-
249
- # Both sets point at the single fleet pin.
250
- ${renderAvailableXcodes('remote_xcodes', ':remote_xcode')}
251
-
252
- ${renderAvailableXcodes('local_xcodes', ':remote_xcode')}
253
-
254
- xcode_config(
255
- name = "remote_xcode_config",
256
- remote_versions = ":remote_xcodes",
257
- local_versions = ":local_xcodes",
258
- )
259
- `;
260
- }
261
- /**
262
- * Renders the rc fragment with the remote-execution flags under
263
- * --config=limrun.
264
- *
265
- * - `--remote_cache=` (empty) clears any workspace-level `--remote_cache`. The
266
- * limrun executor carries its own CAS, so a separate cache backend (e.g. a
267
- * repo pointing `--remote_cache` at BuildBuddy/EngFlow) splits inputs and
268
- * outputs across two stores the executor cannot reconcile, surfacing as "Lost
269
- * inputs no longer available remotely". Emptying it under --config=limrun
270
- * routes caching back to the executor's CAS while leaving the repo's non-limrun
271
- * builds (where that cache is valid) untouched.
272
- * - The `--bes_*` flags stream the Build Event Protocol to the daemon's BES
273
- * service, co-hosted on the same RBE frontend as the executor (hence the same
274
- * `127.0.0.1:${port}`), powering the live + persisted console.
275
- * `--bes_upload_mode=nowait_for_upload_complete` keeps the current build from
276
- * blocking at exit on the BES upload (the wait moves to the start of the next
277
- * invocation, bounded by `--bes_timeout`), while streams stay complete/acked
278
- * for the persisted record. An older daemon without the BES service registered
279
- * answers PublishBuildEvent with a non-fatal warning, so the flags are safe
280
- * ahead of the image rollout.
281
- * - `--xcode_version` pins the fleet's version: without it, a mac client
282
- * lacking that exact version has no mutual version and silently falls back
283
- * to its LOCAL default, shipping the wrong version to the remote worker via
284
- * XCODE_VERSION_OVERRIDE (the worker then rejects it).
285
- * - `--strategy=SwiftCompile=remote` / `--strategy=Genrule=remote` override
286
- * mnemonic-specific strategies a workspace may pin (rules_swift defaults
287
- * SwiftCompile to a local persistent `worker`; repos often pin Genrule to
288
- * `standalone`). Those run locally and break RBE: a local Swift worker can't
289
- * run on a Linux client at all, and on a mac it would demand the fleet's
290
- * Xcode locally. --spawn_strategy=remote does not override per-mnemonic
291
- * pins, so these explicit overrides are required.
292
- * - `--ios_multi_cpus=sim_arm64` pins the app to the **arm64 iOS simulator**.
293
- * Limrun's Mac fleet (workers and the attached simulators) is Apple Silicon,
294
- * so the build product must be arm64. Without this, the simulator cpu follows
295
- * the CLIENT's Bazel default (`sim_arm64` on an Apple Silicon Mac, but
296
- * `x86_64` on an Intel Mac or a Linux client), and an x86_64 app installed on
297
- * the arm64 fleet simulator fails to launch with "needs to be updated by the
298
- * developer to work on this version of iOS". The pin makes the artifact match
299
- * the fleet regardless of where bazel runs (the whole point of RBE).
300
- * - PATH includes /usr/sbin:/sbin so genrules that probe `sysctl` (e.g.
301
- * `hw.logicalcpu` for `make -j`) resolve it on the worker.
302
- * - `--remote_download_outputs=minimal` keeps the built .ipa in the instance's
303
- * CAS instead of downloading it; the daemon auto-installs it server-side from
304
- * there (driven by the BES stream), so the bytes never round-trip. The printed
305
- * `lim xcode rbe` output tells users to add `--remote_download_outputs=toplevel`
306
- * on the command line when they want the .ipa materialized locally (a
307
- * command-line flag overrides this rc setting).
308
- * - `--extra_execution_platforms` is emitted ONLY for non-mac clients: a Linux
309
- * host has no auto-detected darwin execution platform, so the Apple/Swift
310
- * toolchain (exec_compatible_with macos) needs one registered to route
311
- * actions to the mac RBE pool. On a mac it is HARMFUL: it makes bazel run
312
- * exec-config actions on the local host instead of the remote worker, which
313
- * then demand a local Xcode.
314
- * - `--modify_execution_info=.*=-no-remote,.*=-no-remote-exec` strips the
315
- * `no-remote`/`no-remote-exec` execution-info tags rules_apple sets on
316
- * bundling/linking/signing actions (in-code on device builds, and via its
317
- * recommended `+no-remote` bazelrc that real iOS repos carry). Under
318
- * --config=limrun every action runs remotely, so any such tag leaves the
319
- * action with no usable strategy ("cannot be executed with any of the
320
- * available strategies: [remote]") and the build fails. That is the exact
321
- * breakage a Linux client (no local Xcode) hits. This is the execution-info
322
- * analog of the --strategy=...=remote overrides above; stripping globally is
323
- * safe because removing a tag an action never had is a no-op.
324
- * - A `user.limrun.bazelrc` at the workspace root is try-imported last as a user
325
- * override hook, so callers can extend or override the generated config
326
- * without editing this file or passing flags on the command line.
327
- */
328
- function renderLimrunBazelrc(port, versionKey, isMacClient) {
329
- const execPlatform = isMacClient ? '' : ('build:limrun --extra_execution_platforms=@build_bazel_apple_support//platforms:darwin_arm64\n');
330
- return `# Generated by lim xcode rbe. Do not edit; rerun the command to refresh.
331
- build:limrun --remote_executor=grpc://127.0.0.1:${port}
332
- build:limrun --bes_backend=grpc://127.0.0.1:${port}
333
- build:limrun --bes_upload_mode=nowait_for_upload_complete
334
- build:limrun --bes_timeout=60s
335
- build:limrun --remote_cache=
336
- build:limrun --remote_default_exec_properties=OSFamily=Darwin
337
- build:limrun --spawn_strategy=remote
338
- build:limrun --noremote_local_fallback
339
- build:limrun --strategy=SwiftCompile=remote
340
- build:limrun --strategy=Genrule=remote
341
- build:limrun --modify_execution_info=.*=-no-remote,.*=-no-remote-exec
342
- build:limrun --xcode_version_config=//.limrun:remote_xcode_config
343
- build:limrun --xcode_version=${shortVersion(versionKey)}
344
- build:limrun --ios_multi_cpus=sim_arm64
345
- build:limrun --remote_download_outputs=minimal
346
- ${execPlatform}build:limrun --action_env=PATH=/usr/bin:/bin:/usr/sbin:/sbin
347
-
348
- # A user.limrun.bazelrc at the workspace root is try-imported last, so it can
349
- # extend or override anything above without editing this generated file or
350
- # passing flags on the command line. A missing file is silently skipped.
351
- try-import %workspace%/user.limrun.bazelrc
352
- `;
353
- }
354
- /**
355
- * Idempotently ensures the workspace .bazelrc try-imports the generated
356
- * fragment. Creates .bazelrc when missing. Returns true when the file changed.
357
- */
358
- function ensureTryImport(workspaceDir) {
359
- const bazelrcPath = path_1.default.join(workspaceDir, '.bazelrc');
360
- let current = '';
361
- if (fs_1.default.existsSync(bazelrcPath)) {
362
- current = fs_1.default.readFileSync(bazelrcPath, 'utf8');
363
- // Match the try-import on a line basis (exact, uncommented) rather than a
364
- // raw substring, so a commented-out occurrence (e.g. `# try-import ...`)
365
- // doesn't make us skip wiring the active import.
366
- const alreadyWired = current.split('\n').some((line) => line.trim() === exports.TRY_IMPORT_LINE);
367
- if (alreadyWired) {
368
- return false;
369
- }
370
- }
371
- const block = `${TRY_IMPORT_COMMENT}\n${exports.TRY_IMPORT_LINE}\n`;
372
- const next = current === '' ? block : `${current.replace(/\n*$/, '\n\n')}${block}`;
373
- fs_1.default.writeFileSync(bazelrcPath, next);
374
- return true;
375
- }
376
- /**
377
- * Writes .limrun/{BUILD,bazelrc,.gitignore} into the workspace and wires the
378
- * try-import. The .gitignore containing "*" makes the directory self-ignoring
379
- * so nothing else in the user's repo needs to change.
380
- */
381
- function writeRbeWorkspaceFiles(workspaceDir, xcodeVersionKey, port, isMacClient = process.platform === 'darwin', bazelMajor = detectBazelMajorVersion(workspaceDir)) {
382
- const dir = path_1.default.join(workspaceDir, exports.LIMRUN_DIR);
383
- fs_1.default.mkdirSync(dir, { recursive: true });
384
- const buildFile = path_1.default.join(dir, 'BUILD');
385
- const bazelrcFragment = path_1.default.join(dir, 'bazelrc');
386
- // Load the Xcode rules from apple_support on Bazel 9+, where they are no
387
- // longer native globals. On a known Bazel 8 workspace they ARE native (and
388
- // loading would fail), so omit the loads.
389
- const emitLoads = isBazel9OrLater(bazelMajor);
390
- fs_1.default.writeFileSync(buildFile, renderXcodeConfigBuild(xcodeVersionKey, emitLoads));
391
- fs_1.default.writeFileSync(bazelrcFragment, renderLimrunBazelrc(port, xcodeVersionKey, isMacClient));
392
- fs_1.default.writeFileSync(path_1.default.join(dir, '.gitignore'), '*\n');
393
- const bazelrcUpdated = ensureTryImport(workspaceDir);
394
- return { buildFile, bazelrcFragment, bazelrcUpdated };
395
- }
396
- //# sourceMappingURL=rbe-workspace.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rbe-workspace.js","sourceRoot":"","sources":["../../src/lib/rbe-workspace.ts"],"names":[],"mappings":";;;;;;AA6BA,wDAYC;AAeD,4CAqBC;AAgDD,0DASC;AASD,0CAEC;AAyED,wDAmCC;AAqED,kDA4BC;AAMD,0CAiBC;AAaD,wDAoBC;AAtZD,8FAA8F;AAC9F,+FAA+F;AAC/F,qDAAqD;AACrD,4CAAoB;AACpB,gDAAwB;AAExB;;;;;;;GAOG;AAEU,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,eAAe,GAAG,wCAAwC,CAAC;AACxE,MAAM,kBAAkB,GAAG,uEAAuE,CAAC;AAEnG,MAAM,iBAAiB,GAAG,CAAC,cAAc,EAAE,WAAW,EAAE,iBAAiB,CAAC,CAAC;AAE3E;;;;;;;GAOG;AACH,SAAgB,sBAAsB,CAAC,QAAgB;IACrD,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