diff --git a/references/benchmark-artifacts.md b/references/benchmark-artifacts.md index 2c35a79..15abe5a 100644 --- a/references/benchmark-artifacts.md +++ b/references/benchmark-artifacts.md @@ -22,7 +22,7 @@ Recommended outputs: - `.build-benchmark/--clean-1.log` - `.build-benchmark/--clean-2.log` - `.build-benchmark/--clean-3.log` -- `.build-benchmark/--cached-clean-1.log` (when COMPILATION_CACHING is enabled) +- `.build-benchmark/--cached-clean-1.log` (when COMPILATION_CACHE_ENABLE_CACHING is enabled) - `.build-benchmark/--cached-clean-2.log` - `.build-benchmark/--cached-clean-3.log` - `.build-benchmark/--incremental-1.log` @@ -50,7 +50,7 @@ Each JSON artifact should include: Do not merge different build type measurements into a single list. They answer different questions: - **Clean builds** show full build-system, package, and module setup cost with a cold compilation cache. -- **Cached clean builds** show clean build cost when the compilation cache is warm. This is the realistic scenario for branch switching, pulling changes, or Clean Build Folder. Only present when `COMPILATION_CACHING = YES` is detected. +- **Cached clean builds** show clean build cost when the compilation cache is warm. This is the realistic scenario for branch switching, pulling changes, or Clean Build Folder. Only present when `COMPILATION_CACHE_ENABLE_CACHING = YES` is detected. - **Incremental builds** show edit-loop productivity and script or cache invalidation problems. ## Raw Logs @@ -64,17 +64,17 @@ Store raw `xcodebuild` output beside the JSON artifact whenever possible. That a ## Measurement Caveats -### COMPILATION_CACHING +### COMPILATION_CACHE_ENABLE_CACHING -`COMPILATION_CACHING = YES` stores compiled artifacts in a system-managed cache outside DerivedData so that repeated compilations of identical inputs are served from cache. The standard clean-build benchmark (`xcodebuild clean` between runs) may add overhead from cache population without showing the corresponding cache-hit benefit. +`COMPILATION_CACHE_ENABLE_CACHING = YES` stores compiled artifacts in a system-managed cache outside DerivedData so that repeated compilations of identical inputs are served from cache. The standard clean-build benchmark (`xcodebuild clean` between runs) may add overhead from cache population without showing the corresponding cache-hit benefit. -The benchmark script automatically detects `COMPILATION_CACHING = YES` and runs a **cached clean** benchmark phase. This phase: +The benchmark script automatically detects `COMPILATION_CACHE_ENABLE_CACHING = YES` and runs a **cached clean** benchmark phase. This phase: 1. Builds once to warm the compilation cache. 2. Deletes DerivedData (but not the compilation cache) before each measured run. 3. Rebuilds, measuring the cache-hit clean build time. -The cached clean metric captures the realistic developer experience: branch switching, pulling changes, and Clean Build Folder. Use the cached clean median as the primary comparison metric when evaluating `COMPILATION_CACHING` impact. +The cached clean metric captures the realistic developer experience: branch switching, pulling changes, and Clean Build Folder. Use the cached clean median as the primary comparison metric when evaluating `COMPILATION_CACHE_ENABLE_CACHING` impact. To skip this phase, pass `--no-cached-clean`. diff --git a/references/build-optimization-sources.md b/references/build-optimization-sources.md index e7bed3a..236c43e 100644 --- a/references/build-optimization-sources.md +++ b/references/build-optimization-sources.md @@ -117,7 +117,7 @@ Source: Key takeaways: -- Granular caching is controlled by `SWIFT_ENABLE_COMPILE_CACHE` and `CLANG_ENABLE_COMPILE_CACHE`, under the umbrella `COMPILATION_CACHING` setting. +- Granular caching is controlled by `SWIFT_ENABLE_COMPILE_CACHE` and `CLANG_ENABLE_COMPILE_CACHE`, under the umbrella `COMPILATION_CACHE_ENABLE_CACHING` setting. - Non-cacheable tasks include `CompileStoryboard`, `CompileXIB`, `CompileAssetCatalogVariant`, `PhaseScriptExecution`, `DataModelCompile`, `CopyPNGFile`, `GenerateDSYMFile`, and `Ld`. - SPM dependencies are not yet cacheable as of Xcode 26 beta. diff --git a/references/build-settings-best-practices.md b/references/build-settings-best-practices.md index 9dee131..8345167 100644 --- a/references/build-settings-best-practices.md +++ b/references/build-settings-best-practices.md @@ -128,7 +128,7 @@ These settings optimize for production builds. ### Compilation Caching -- **Key:** `COMPILATION_CACHING` +- **Key:** `COMPILATION_CACHE_ENABLE_CACHING` - **Recommended:** `YES` - **Why:** Caches compilation results for Swift and C-family sources so repeated compilations of the same inputs are served from cache. The biggest wins come from branch switching and clean builds where source files are recompiled unchanged. This is an opt-in feature. The umbrella setting controls both `SWIFT_ENABLE_COMPILE_CACHE` and `CLANG_ENABLE_COMPILE_CACHE` under the hood; those can be toggled independently if needed. - **Measurement:** Measured 5-14% faster clean builds across tested projects (87 to 1,991 Swift files). The benefit compounds in real developer workflows where the cache persists between builds -- branch switching, pulling changes, and CI with persistent DerivedData -- though the exact savings depend on how many files change between builds. @@ -206,7 +206,7 @@ When reporting results, use this structure: ... ### General (All Configurations) -- [ ] `COMPILATION_CACHING`: `NO` (recommended: `YES`) +- [ ] `COMPILATION_CACHE_ENABLE_CACHING`: `NO` (recommended: `YES`) ... ### Cross-Target Consistency diff --git a/scripts/benchmark_builds.py b/scripts/benchmark_builds.py index 3e27788..784a749 100755 --- a/scripts/benchmark_builds.py +++ b/scripts/benchmark_builds.py @@ -36,7 +36,7 @@ def parse_args() -> argparse.Namespace: parser.add_argument( "--no-cached-clean", action="store_true", - help="Skip cached clean builds even when COMPILATION_CACHING is detected.", + help="Skip cached clean builds even when COMPILATION_CACHE_ENABLE_CACHING is detected.", ) parser.add_argument( "--extra-arg", @@ -142,13 +142,13 @@ def xcode_version() -> str: def detect_compilation_caching(base_command: List[str]) -> bool: - """Check whether COMPILATION_CACHING is enabled in the resolved build settings.""" + """Check whether COMPILATION_CACHE_ENABLE_CACHING is enabled in the resolved build settings.""" result = run_command([*base_command, "-showBuildSettings"]) if result.returncode != 0: return False for line in result.stdout.splitlines(): stripped = line.strip() - if stripped.startswith("COMPILATION_CACHING") and "=" in stripped: + if stripped.startswith("COMPILATION_CACHE_ENABLE_CACHING") and "=" in stripped: value = stripped.split("=", 1)[1].strip() return value == "YES" return False @@ -214,7 +214,7 @@ def main() -> int: runs["clean"].append(measure_build(base_command, artifact_stem, output_dir, "clean", index)) # --- Cached clean builds --------------------------------------------------- - # When COMPILATION_CACHING is enabled, the compilation cache lives outside + # When COMPILATION_CACHE_ENABLE_CACHING is enabled, the compilation cache lives outside # DerivedData and survives product deletion. We measure "cached clean" # builds by pointing DerivedData at a temp directory, warming the cache with # one build, then deleting the DerivedData directory (but not the cache) diff --git a/scripts/generate_optimization_report.py b/scripts/generate_optimization_report.py index 086ec22..fc97cec 100644 --- a/scripts/generate_optimization_report.py +++ b/scripts/generate_optimization_report.py @@ -89,7 +89,7 @@ def _parse_target_configs(pbxproj: str) -> Dict[str, Dict[str, Dict[str, str]]]: # --------------------------------------------------------------------------- _DEBUG_EXPECTATIONS: List[Tuple[str, str, str]] = [ - ("SWIFT_COMPILATION_MODE", "incremental", "Incremental recompiles only changed files"), + ("SWIFT_COMPILATION_MODE", "singlefile", "Single-file mode recompiles only changed files (Xcode UI: Incremental)"), ("SWIFT_OPTIMIZATION_LEVEL", "-Onone", "Optimization passes add compile time without debug benefit"), ("GCC_OPTIMIZATION_LEVEL", "0", "C/ObjC optimization adds compile time without debug benefit"), ("ONLY_ACTIVE_ARCH", "YES", "Building all architectures multiplies compile and link time"), @@ -99,7 +99,7 @@ def _parse_target_configs(pbxproj: str) -> Dict[str, Dict[str, Dict[str, str]]]: ] _GENERAL_EXPECTATIONS: List[Tuple[str, str, str]] = [ - ("COMPILATION_CACHING", "YES", "Caches compilation results so repeat builds of unchanged inputs are served from cache. Measured 5-14% faster clean builds across tested projects; benefit compounds during branch switching and pulling changes"), + ("COMPILATION_CACHE_ENABLE_CACHING", "YES", "Caches compilation results so repeat builds of unchanged inputs are served from cache. Measured 5-14% faster clean builds across tested projects; benefit compounds during branch switching and pulling changes"), ] _RELEASE_EXPECTATIONS: List[Tuple[str, str, str]] = [ @@ -127,7 +127,7 @@ def _effective_value( def _check(actual: Optional[str], expected: str) -> bool: if actual is None: - if expected in ("incremental",): + if expected in ("singlefile",): return True return False if expected == "-O" and actual in ("-O", '"-O"', '"-Osize"', "-Osize"): diff --git a/skills/spm-build-analysis/references/build-optimization-sources.md b/skills/spm-build-analysis/references/build-optimization-sources.md index aa2868f..30d9fa8 100644 --- a/skills/spm-build-analysis/references/build-optimization-sources.md +++ b/skills/spm-build-analysis/references/build-optimization-sources.md @@ -117,7 +117,7 @@ Source: Key takeaways: -- Granular caching is controlled by `SWIFT_ENABLE_COMPILE_CACHE` and `CLANG_ENABLE_COMPILE_CACHE`, under the umbrella `COMPILATION_CACHING` setting. +- Granular caching is controlled by `SWIFT_ENABLE_COMPILE_CACHE` and `CLANG_ENABLE_COMPILE_CACHE`, under the umbrella `COMPILATION_CACHE_ENABLE_CACHING` setting. - Non-cacheable tasks include `CompileStoryboard`, `CompileXIB`, `CompileAssetCatalogVariant`, `PhaseScriptExecution`, `DataModelCompile`, `CopyPNGFile`, `GenerateDSYMFile`, and `Ld`. - SPM dependencies are not yet cacheable as of Xcode 26 beta. diff --git a/skills/xcode-build-benchmark/SKILL.md b/skills/xcode-build-benchmark/SKILL.md index 09b50bf..32ff2f3 100644 --- a/skills/xcode-build-benchmark/SKILL.md +++ b/skills/xcode-build-benchmark/SKILL.md @@ -37,7 +37,7 @@ When benchmarking inside a git worktree, SPM packages with `exclude:` paths that 1. Normalize the build command and note every flag that affects caching or module reuse. 2. Run one warm-up build if needed to validate that the command succeeds. 3. Run 3 clean builds. -4. If `COMPILATION_CACHING = YES` is detected, run 3 cached clean builds. These measure clean build time with a warm compilation cache -- the realistic scenario for branch switching, pulling changes, or Clean Build Folder. The script handles this automatically by building once to warm the cache, then deleting DerivedData (but not the compilation cache) before each measured run. Pass `--no-cached-clean` to skip. +4. If `COMPILATION_CACHE_ENABLE_CACHING = YES` is detected, run 3 cached clean builds. These measure clean build time with a warm compilation cache -- the realistic scenario for branch switching, pulling changes, or Clean Build Folder. The script handles this automatically by building once to warm the cache, then deleting DerivedData (but not the compilation cache) before each measured run. Pass `--no-cached-clean` to skip. 5. Run 3 zero-change builds (build immediately after a successful build with no edits). This measures the fixed overhead floor: dependency computation, project description transfer, build description creation, script phases, codesigning, and validation. A zero-change build that takes more than a few seconds indicates avoidable per-build overhead. Use the default `benchmark_builds.py` invocation (no `--touch-file` flag). 6. Optionally run 3 incremental builds with a file touch to measure a real edit-rebuild loop. Use `--touch-file path/to/SomeFile.swift` to touch a representative source file before each build. 7. Save the raw results and summary into `.build-benchmark/`. @@ -63,7 +63,7 @@ If you cannot use the helper script, run equivalent `xcodebuild` commands with ` Return: - clean build median, min, max -- cached clean build median, min, max (when COMPILATION_CACHING is enabled) +- cached clean build median, min, max (when COMPILATION_CACHE_ENABLE_CACHING is enabled) - zero-change build median, min, max (fixed overhead floor) - incremental build median, min, max (if `--touch-file` was used) - biggest timing-summary categories diff --git a/skills/xcode-build-benchmark/references/benchmark-artifacts.md b/skills/xcode-build-benchmark/references/benchmark-artifacts.md index 2c35a79..15abe5a 100644 --- a/skills/xcode-build-benchmark/references/benchmark-artifacts.md +++ b/skills/xcode-build-benchmark/references/benchmark-artifacts.md @@ -22,7 +22,7 @@ Recommended outputs: - `.build-benchmark/--clean-1.log` - `.build-benchmark/--clean-2.log` - `.build-benchmark/--clean-3.log` -- `.build-benchmark/--cached-clean-1.log` (when COMPILATION_CACHING is enabled) +- `.build-benchmark/--cached-clean-1.log` (when COMPILATION_CACHE_ENABLE_CACHING is enabled) - `.build-benchmark/--cached-clean-2.log` - `.build-benchmark/--cached-clean-3.log` - `.build-benchmark/--incremental-1.log` @@ -50,7 +50,7 @@ Each JSON artifact should include: Do not merge different build type measurements into a single list. They answer different questions: - **Clean builds** show full build-system, package, and module setup cost with a cold compilation cache. -- **Cached clean builds** show clean build cost when the compilation cache is warm. This is the realistic scenario for branch switching, pulling changes, or Clean Build Folder. Only present when `COMPILATION_CACHING = YES` is detected. +- **Cached clean builds** show clean build cost when the compilation cache is warm. This is the realistic scenario for branch switching, pulling changes, or Clean Build Folder. Only present when `COMPILATION_CACHE_ENABLE_CACHING = YES` is detected. - **Incremental builds** show edit-loop productivity and script or cache invalidation problems. ## Raw Logs @@ -64,17 +64,17 @@ Store raw `xcodebuild` output beside the JSON artifact whenever possible. That a ## Measurement Caveats -### COMPILATION_CACHING +### COMPILATION_CACHE_ENABLE_CACHING -`COMPILATION_CACHING = YES` stores compiled artifacts in a system-managed cache outside DerivedData so that repeated compilations of identical inputs are served from cache. The standard clean-build benchmark (`xcodebuild clean` between runs) may add overhead from cache population without showing the corresponding cache-hit benefit. +`COMPILATION_CACHE_ENABLE_CACHING = YES` stores compiled artifacts in a system-managed cache outside DerivedData so that repeated compilations of identical inputs are served from cache. The standard clean-build benchmark (`xcodebuild clean` between runs) may add overhead from cache population without showing the corresponding cache-hit benefit. -The benchmark script automatically detects `COMPILATION_CACHING = YES` and runs a **cached clean** benchmark phase. This phase: +The benchmark script automatically detects `COMPILATION_CACHE_ENABLE_CACHING = YES` and runs a **cached clean** benchmark phase. This phase: 1. Builds once to warm the compilation cache. 2. Deletes DerivedData (but not the compilation cache) before each measured run. 3. Rebuilds, measuring the cache-hit clean build time. -The cached clean metric captures the realistic developer experience: branch switching, pulling changes, and Clean Build Folder. Use the cached clean median as the primary comparison metric when evaluating `COMPILATION_CACHING` impact. +The cached clean metric captures the realistic developer experience: branch switching, pulling changes, and Clean Build Folder. Use the cached clean median as the primary comparison metric when evaluating `COMPILATION_CACHE_ENABLE_CACHING` impact. To skip this phase, pass `--no-cached-clean`. diff --git a/skills/xcode-build-benchmark/scripts/benchmark_builds.py b/skills/xcode-build-benchmark/scripts/benchmark_builds.py index 3e27788..784a749 100755 --- a/skills/xcode-build-benchmark/scripts/benchmark_builds.py +++ b/skills/xcode-build-benchmark/scripts/benchmark_builds.py @@ -36,7 +36,7 @@ def parse_args() -> argparse.Namespace: parser.add_argument( "--no-cached-clean", action="store_true", - help="Skip cached clean builds even when COMPILATION_CACHING is detected.", + help="Skip cached clean builds even when COMPILATION_CACHE_ENABLE_CACHING is detected.", ) parser.add_argument( "--extra-arg", @@ -142,13 +142,13 @@ def xcode_version() -> str: def detect_compilation_caching(base_command: List[str]) -> bool: - """Check whether COMPILATION_CACHING is enabled in the resolved build settings.""" + """Check whether COMPILATION_CACHE_ENABLE_CACHING is enabled in the resolved build settings.""" result = run_command([*base_command, "-showBuildSettings"]) if result.returncode != 0: return False for line in result.stdout.splitlines(): stripped = line.strip() - if stripped.startswith("COMPILATION_CACHING") and "=" in stripped: + if stripped.startswith("COMPILATION_CACHE_ENABLE_CACHING") and "=" in stripped: value = stripped.split("=", 1)[1].strip() return value == "YES" return False @@ -214,7 +214,7 @@ def main() -> int: runs["clean"].append(measure_build(base_command, artifact_stem, output_dir, "clean", index)) # --- Cached clean builds --------------------------------------------------- - # When COMPILATION_CACHING is enabled, the compilation cache lives outside + # When COMPILATION_CACHE_ENABLE_CACHING is enabled, the compilation cache lives outside # DerivedData and survives product deletion. We measure "cached clean" # builds by pointing DerivedData at a temp directory, warming the cache with # one build, then deleting the DerivedData directory (but not the cache) diff --git a/skills/xcode-build-fixer/SKILL.md b/skills/xcode-build-fixer/SKILL.md index 1ae341e..3478161 100644 --- a/skills/xcode-build-fixer/SKILL.md +++ b/skills/xcode-build-fixer/SKILL.md @@ -34,7 +34,7 @@ Typical fixes: - Set `DEBUG_INFORMATION_FORMAT = dwarf` for Debug - Set `SWIFT_COMPILATION_MODE = singlefile` for Debug -- Enable `COMPILATION_CACHING = YES` +- Enable `COMPILATION_CACHE_ENABLE_CACHING = YES` - Enable `EAGER_LINKING = YES` for Debug - Align cross-target settings to eliminate module variants @@ -106,7 +106,7 @@ Not every slower number is a true regression. The fixer must evaluate the full p ### Compilation caching trade-off -A change like `COMPILATION_CACHING = YES` may make a standard clean build slightly slower (cache population overhead) while making cached clean builds significantly faster. Since cached clean builds reflect the realistic developer workflow (branch switching, pulling changes, Clean Build Folder with a warm cache), a slower standard clean build paired with a faster cached clean build is a net improvement, not a regression. The same logic applies to any change where the first-time cost is higher but subsequent builds benefit. +A change like `COMPILATION_CACHE_ENABLE_CACHING = YES` may make a standard clean build slightly slower (cache population overhead) while making cached clean builds significantly faster. Since cached clean builds reflect the realistic developer workflow (branch switching, pulling changes, Clean Build Folder with a warm cache), a slower standard clean build paired with a faster cached clean build is a net improvement, not a regression. The same logic applies to any change where the first-time cost is higher but subsequent builds benefit. ### Compare all build types @@ -122,7 +122,7 @@ Some build settings are Apple's recommended modern defaults. These should be app Best-practice settings that should always be kept once applied: -- `COMPILATION_CACHING = YES` -- Apple is actively investing in this; the cache improves with each Xcode release and compounds across real workflows +- `COMPILATION_CACHE_ENABLE_CACHING = YES` -- Apple is actively investing in this; the cache improves with each Xcode release and compounds across real workflows - `EAGER_LINKING = YES` (Debug) -- allows the linker to overlap with compilation - `SWIFT_USE_INTEGRATED_DRIVER = YES` -- eliminates inter-process scheduling overhead - `DEBUG_INFORMATION_FORMAT = dwarf` (Debug) -- avoids unnecessary dSYM generation @@ -162,7 +162,7 @@ If a fix produced no measurable wall-time improvement, note `No measurable wall- For changes valuable for non-benchmark reasons (deterministic package resolution, branch-switch caching), label them: "No wait-time improvement expected from this change. The benefit is [deterministic builds / faster branch switching / reduced CI cost]." -Note: `COMPILATION_CACHING` has been measured at 5-14% faster clean builds across tested projects (87 to 1,991 Swift files). The benefit compounds in real developer workflows where the cache persists between builds -- branch switching, pulling changes, and CI with persistent DerivedData. The benchmark script auto-detects this setting and runs a cached clean phase for validation. +Note: `COMPILATION_CACHE_ENABLE_CACHING` has been measured at 5-14% faster clean builds across tested projects (87 to 1,991 Swift files). The benefit compounds in real developer workflows where the cache persists between builds -- branch switching, pulling changes, and CI with persistent DerivedData. The benchmark script auto-detects this setting and runs a cached clean phase for validation. ## Execution Report diff --git a/skills/xcode-build-fixer/references/build-settings-best-practices.md b/skills/xcode-build-fixer/references/build-settings-best-practices.md index 9dee131..8345167 100644 --- a/skills/xcode-build-fixer/references/build-settings-best-practices.md +++ b/skills/xcode-build-fixer/references/build-settings-best-practices.md @@ -128,7 +128,7 @@ These settings optimize for production builds. ### Compilation Caching -- **Key:** `COMPILATION_CACHING` +- **Key:** `COMPILATION_CACHE_ENABLE_CACHING` - **Recommended:** `YES` - **Why:** Caches compilation results for Swift and C-family sources so repeated compilations of the same inputs are served from cache. The biggest wins come from branch switching and clean builds where source files are recompiled unchanged. This is an opt-in feature. The umbrella setting controls both `SWIFT_ENABLE_COMPILE_CACHE` and `CLANG_ENABLE_COMPILE_CACHE` under the hood; those can be toggled independently if needed. - **Measurement:** Measured 5-14% faster clean builds across tested projects (87 to 1,991 Swift files). The benefit compounds in real developer workflows where the cache persists between builds -- branch switching, pulling changes, and CI with persistent DerivedData -- though the exact savings depend on how many files change between builds. @@ -206,7 +206,7 @@ When reporting results, use this structure: ... ### General (All Configurations) -- [ ] `COMPILATION_CACHING`: `NO` (recommended: `YES`) +- [ ] `COMPILATION_CACHE_ENABLE_CACHING`: `NO` (recommended: `YES`) ... ### Cross-Target Consistency diff --git a/skills/xcode-build-fixer/references/fix-patterns.md b/skills/xcode-build-fixer/references/fix-patterns.md index 78f255d..adf3cd3 100644 --- a/skills/xcode-build-fixer/references/fix-patterns.md +++ b/skills/xcode-build-fixer/references/fix-patterns.md @@ -32,12 +32,12 @@ SWIFT_COMPILATION_MODE = singlefile; Before (setting absent or): ``` -COMPILATION_CACHING = NO; +COMPILATION_CACHE_ENABLE_CACHING = NO; ``` After: ``` -COMPILATION_CACHING = YES; +COMPILATION_CACHE_ENABLE_CACHING = YES; ``` ### Enable Eager Linking (Debug) diff --git a/skills/xcode-build-fixer/scripts/benchmark_builds.py b/skills/xcode-build-fixer/scripts/benchmark_builds.py index 3e27788..784a749 100755 --- a/skills/xcode-build-fixer/scripts/benchmark_builds.py +++ b/skills/xcode-build-fixer/scripts/benchmark_builds.py @@ -36,7 +36,7 @@ def parse_args() -> argparse.Namespace: parser.add_argument( "--no-cached-clean", action="store_true", - help="Skip cached clean builds even when COMPILATION_CACHING is detected.", + help="Skip cached clean builds even when COMPILATION_CACHE_ENABLE_CACHING is detected.", ) parser.add_argument( "--extra-arg", @@ -142,13 +142,13 @@ def xcode_version() -> str: def detect_compilation_caching(base_command: List[str]) -> bool: - """Check whether COMPILATION_CACHING is enabled in the resolved build settings.""" + """Check whether COMPILATION_CACHE_ENABLE_CACHING is enabled in the resolved build settings.""" result = run_command([*base_command, "-showBuildSettings"]) if result.returncode != 0: return False for line in result.stdout.splitlines(): stripped = line.strip() - if stripped.startswith("COMPILATION_CACHING") and "=" in stripped: + if stripped.startswith("COMPILATION_CACHE_ENABLE_CACHING") and "=" in stripped: value = stripped.split("=", 1)[1].strip() return value == "YES" return False @@ -214,7 +214,7 @@ def main() -> int: runs["clean"].append(measure_build(base_command, artifact_stem, output_dir, "clean", index)) # --- Cached clean builds --------------------------------------------------- - # When COMPILATION_CACHING is enabled, the compilation cache lives outside + # When COMPILATION_CACHE_ENABLE_CACHING is enabled, the compilation cache lives outside # DerivedData and survives product deletion. We measure "cached clean" # builds by pointing DerivedData at a temp directory, warming the cache with # one build, then deleting the DerivedData directory (but not the cache) diff --git a/skills/xcode-build-orchestrator/SKILL.md b/skills/xcode-build-orchestrator/SKILL.md index f099017..98eb94c 100644 --- a/skills/xcode-build-orchestrator/SKILL.md +++ b/skills/xcode-build-orchestrator/SKILL.md @@ -25,8 +25,8 @@ The orchestration is designed as two distinct phases separated by developer revi Run this phase in agent mode because the agent needs to execute builds, run benchmark scripts, write benchmark artifacts, and generate the optimization report. However, treat Phase 1 as **recommend-only**: do not modify any project files, source files, packages, or build settings. The only files the agent creates during this phase are benchmark artifacts and the optimization plan inside `.build-benchmark/`. 1. Collect the build target context: workspace or project, scheme, configuration, destination, and current pain point. When both `.xcworkspace` and `.xcodeproj` exist, prefer `.xcodeproj` unless the workspace contains sub-projects required for the build. Workspaces that reference external projects may fail if those projects are not checked out. -2. Run `xcode-build-benchmark` to establish a baseline if no fresh benchmark exists. The benchmark script auto-detects `COMPILATION_CACHING = YES` and includes cached clean builds that measure the realistic developer experience (warm cache). If the build fails to compile, check `git log` for a recent buildable commit. When working in a worktree, cherry-picking a targeted build fix from a feature branch is acceptable to reach a buildable state. If SPM packages reference gitignored directories in their `exclude:` paths (e.g., `__Snapshots__`), create those directories before building -- worktrees do not contain gitignored content and `xcodebuild -resolvePackageDependencies` will crash otherwise. -3. Verify the benchmark artifact has non-empty `timing_summary_categories`. If empty, the timing summary parser may have failed -- re-parse the raw logs or inspect them manually. If `COMPILATION_CACHING` is enabled, also verify the artifact includes `cached_clean` runs. +2. Run `xcode-build-benchmark` to establish a baseline if no fresh benchmark exists. The benchmark script auto-detects `COMPILATION_CACHE_ENABLE_CACHING = YES` and includes cached clean builds that measure the realistic developer experience (warm cache). If the build fails to compile, check `git log` for a recent buildable commit. When working in a worktree, cherry-picking a targeted build fix from a feature branch is acceptable to reach a buildable state. If SPM packages reference gitignored directories in their `exclude:` paths (e.g., `__Snapshots__`), create those directories before building -- worktrees do not contain gitignored content and `xcodebuild -resolvePackageDependencies` will crash otherwise. +3. Verify the benchmark artifact has non-empty `timing_summary_categories`. If empty, the timing summary parser may have failed -- re-parse the raw logs or inspect them manually. If `COMPILATION_CACHE_ENABLE_CACHING` is enabled, also verify the artifact includes `cached_clean` runs. - **Benchmark confidence check**: For each build type (clean, cached clean, incremental), compare the min and max values. If the spread (max - min) exceeds 20% of the median, flag the benchmark as having high variance and recommend running additional repetitions (5+ runs) before drawing conclusions. High variance makes it difficult to distinguish real improvements from noise. After applying changes, only claim an improvement if the post-change median falls outside the baseline's min-max range. 4. If incremental builds are the primary pain point and Xcode 16.4+ is available, recommend the developer enable **Task Backtraces** (Scheme Editor > Build tab > Build Debugging > "Task Backtraces"). This reveals why each task re-ran, which is critical for diagnosing unexpected replanning or input invalidation. Include any Task Backtrace evidence in the analysis. 5. Determine whether compile tasks are likely blocking wall-clock progress or just consuming parallel CPU time. Compare the sum of all timing-summary category seconds against the wall-clock median: if the sum is 2x+ the median, most work is parallelized and compile hotspot fixes are unlikely to reduce wait time. If `SwiftCompile`, `CompileC`, `SwiftEmitModule`, or `Planning Swift module` dominate the timing summary **and** appear likely to be on the critical path, run `diagnose_compilation.py` to capture type-checking hotspots. If they are parallelized, still run diagnostics but label findings as "parallel efficiency improvements" rather than "build time improvements." @@ -71,7 +71,7 @@ Every recommendation presented to the developer must include one of these impact - "Reduces parallel compile work but is unlikely to reduce your build wait time because other tasks take equally long." - "Impact on wait time is uncertain -- re-benchmark after applying to confirm." - "No wait-time improvement expected. The benefit is [deterministic builds / faster branch switching / reduced CI cost]." -- For COMPILATION_CACHING specifically: "Measured 5-14% faster clean builds across tested projects. The benefit compounds in real workflows where the cache persists between builds -- branch switching, pulling changes, and CI with persistent DerivedData." +- For COMPILATION_CACHE_ENABLE_CACHING specifically: "Measured 5-14% faster clean builds across tested projects. The benefit compounds in real workflows where the cache persists between builds -- branch switching, pulling changes, and CI with persistent DerivedData." Never quote cumulative task-time savings as the headline impact. If a change reduces 5 seconds of parallel compile work but another equally long task still runs, the developer's wait time does not change. diff --git a/skills/xcode-build-orchestrator/references/benchmark-artifacts.md b/skills/xcode-build-orchestrator/references/benchmark-artifacts.md index fbd5ebf..e630b03 100644 --- a/skills/xcode-build-orchestrator/references/benchmark-artifacts.md +++ b/skills/xcode-build-orchestrator/references/benchmark-artifacts.md @@ -22,7 +22,7 @@ Recommended outputs: - `.build-benchmark/--clean-1.log` - `.build-benchmark/--clean-2.log` - `.build-benchmark/--clean-3.log` -- `.build-benchmark/--cached-clean-1.log` (when COMPILATION_CACHING is enabled) +- `.build-benchmark/--cached-clean-1.log` (when COMPILATION_CACHE_ENABLE_CACHING is enabled) - `.build-benchmark/--cached-clean-2.log` - `.build-benchmark/--cached-clean-3.log` - `.build-benchmark/--incremental-1.log` @@ -50,7 +50,7 @@ Each JSON artifact should include: Do not merge different build type measurements into a single list. They answer different questions: - **Clean builds** show full build-system, package, and module setup cost with a cold compilation cache. -- **Cached clean builds** show clean build cost when the compilation cache is warm. This is the realistic scenario for branch switching, pulling changes, or Clean Build Folder. Only present when `COMPILATION_CACHING = YES` is detected. +- **Cached clean builds** show clean build cost when the compilation cache is warm. This is the realistic scenario for branch switching, pulling changes, or Clean Build Folder. Only present when `COMPILATION_CACHE_ENABLE_CACHING = YES` is detected. - **Incremental builds** show edit-loop productivity and script or cache invalidation problems. ## Raw Logs @@ -64,17 +64,17 @@ Store raw `xcodebuild` output beside the JSON artifact whenever possible. That a ## Measurement Caveats -### COMPILATION_CACHING +### COMPILATION_CACHE_ENABLE_CACHING -`COMPILATION_CACHING = YES` stores compiled artifacts in a system-managed cache outside DerivedData so that repeated compilations of identical inputs are served from cache. The standard clean-build benchmark (`xcodebuild clean` between runs) may add overhead from cache population without showing the corresponding cache-hit benefit. +`COMPILATION_CACHE_ENABLE_CACHING = YES` stores compiled artifacts in a system-managed cache outside DerivedData so that repeated compilations of identical inputs are served from cache. The standard clean-build benchmark (`xcodebuild clean` between runs) may add overhead from cache population without showing the corresponding cache-hit benefit. -The benchmark script automatically detects `COMPILATION_CACHING = YES` and runs a **cached clean** benchmark phase. This phase: +The benchmark script automatically detects `COMPILATION_CACHE_ENABLE_CACHING = YES` and runs a **cached clean** benchmark phase. This phase: 1. Builds once to warm the compilation cache. 2. Deletes DerivedData (but not the compilation cache) before each measured run. 3. Rebuilds, measuring the cache-hit clean build time. -The cached clean metric captures the realistic developer experience: branch switching, pulling changes, and Clean Build Folder. Use the cached clean median as the primary comparison metric when evaluating `COMPILATION_CACHING` impact. +The cached clean metric captures the realistic developer experience: branch switching, pulling changes, and Clean Build Folder. Use the cached clean median as the primary comparison metric when evaluating `COMPILATION_CACHE_ENABLE_CACHING` impact. To skip this phase, pass `--no-cached-clean`. diff --git a/skills/xcode-build-orchestrator/references/build-settings-best-practices.md b/skills/xcode-build-orchestrator/references/build-settings-best-practices.md index 9dee131..8345167 100644 --- a/skills/xcode-build-orchestrator/references/build-settings-best-practices.md +++ b/skills/xcode-build-orchestrator/references/build-settings-best-practices.md @@ -128,7 +128,7 @@ These settings optimize for production builds. ### Compilation Caching -- **Key:** `COMPILATION_CACHING` +- **Key:** `COMPILATION_CACHE_ENABLE_CACHING` - **Recommended:** `YES` - **Why:** Caches compilation results for Swift and C-family sources so repeated compilations of the same inputs are served from cache. The biggest wins come from branch switching and clean builds where source files are recompiled unchanged. This is an opt-in feature. The umbrella setting controls both `SWIFT_ENABLE_COMPILE_CACHE` and `CLANG_ENABLE_COMPILE_CACHE` under the hood; those can be toggled independently if needed. - **Measurement:** Measured 5-14% faster clean builds across tested projects (87 to 1,991 Swift files). The benefit compounds in real developer workflows where the cache persists between builds -- branch switching, pulling changes, and CI with persistent DerivedData -- though the exact savings depend on how many files change between builds. @@ -206,7 +206,7 @@ When reporting results, use this structure: ... ### General (All Configurations) -- [ ] `COMPILATION_CACHING`: `NO` (recommended: `YES`) +- [ ] `COMPILATION_CACHE_ENABLE_CACHING`: `NO` (recommended: `YES`) ... ### Cross-Target Consistency diff --git a/skills/xcode-build-orchestrator/references/orchestration-report-template.md b/skills/xcode-build-orchestrator/references/orchestration-report-template.md index e1de113..f598b45 100644 --- a/skills/xcode-build-orchestrator/references/orchestration-report-template.md +++ b/skills/xcode-build-orchestrator/references/orchestration-report-template.md @@ -23,7 +23,7 @@ Use this structure when the orchestrator consolidates benchmark evidence and spe | Max | 0.000s | 0.000s | 0.000s | | Runs | 3 | 3 | 3 | -> **Cached Clean** = clean build with a warm compilation cache. This is the realistic scenario for branch switching, pulling changes, or Clean Build Folder. Only present when `COMPILATION_CACHING = YES` is detected. "Zero-Change" = rebuild with no edits (measures fixed overhead). Use `--touch-file` in the benchmark script to measure true incremental builds where a source file is modified. +> **Cached Clean** = clean build with a warm compilation cache. This is the realistic scenario for branch switching, pulling changes, or Clean Build Folder. Only present when `COMPILATION_CACHE_ENABLE_CACHING = YES` is detected. "Zero-Change" = rebuild with no edits (measures fixed overhead). Use `--touch-file` in the benchmark script to measure true incremental builds where a source file is modified. ### Clean Build Timing Summary @@ -38,7 +38,7 @@ Use this structure when the orchestrator consolidates benchmark evidence and spe ## Build Settings Audit ### Debug Configuration -- [x] `SWIFT_COMPILATION_MODE`: `(unset)` (recommended: `incremental`) +- [x] `SWIFT_COMPILATION_MODE`: `(unset)` (recommended: `singlefile`) - [x] `SWIFT_OPTIMIZATION_LEVEL`: `-Onone` (recommended: `-Onone`) - [x] `GCC_OPTIMIZATION_LEVEL`: `0` (recommended: `0`) - [x] `ONLY_ACTIVE_ARCH`: `YES` (recommended: `YES`) @@ -47,7 +47,7 @@ Use this structure when the orchestrator consolidates benchmark evidence and spe - [x] `EAGER_LINKING`: `YES` (recommended: `YES`) ### General (All Configurations) -- [x] `COMPILATION_CACHING`: `YES` (recommended: `YES`) +- [x] `COMPILATION_CACHE_ENABLE_CACHING`: `YES` (recommended: `YES`) - [x] `SWIFT_USE_INTEGRATED_DRIVER`: `YES` (recommended: `YES`) - [x] `CLANG_ENABLE_MODULES`: `YES` (recommended: `YES`) @@ -108,7 +108,7 @@ Status values: `Kept`, `Kept (best practice)`, `Reverted`, `Blocked`, `No improv ### Final Cumulative Result - Post-change clean build: X.Xs (was Y.Ys) -- Z.Zs faster/slower -- Post-change cached clean build: X.Xs (was Y.Ys) -- Z.Zs faster/slower (when COMPILATION_CACHING enabled) +- Post-change cached clean build: X.Xs (was Y.Ys) -- Z.Zs faster/slower (when COMPILATION_CACHE_ENABLE_CACHING enabled) - Post-change incremental build: X.Xs (was Y.Ys) -- Z.Zs faster/slower - **Net result:** Faster / Slower / Unchanged - If cumulative task metrics improved but wall-clock did not: "Compiler workload decreased but build wait time did not improve. This is expected when Xcode runs these tasks in parallel with other equally long work." @@ -138,6 +138,6 @@ Open a PR: https://github.com/AvdLee/Xcode-Build-Optimization-Agent-Skill/edit/m - If results are noisy, say that the verification is inconclusive instead of overstating success. - The Build Settings Audit scope is strictly build performance. Do not flag language-migration settings like `SWIFT_STRICT_CONCURRENCY` or `SWIFT_UPCOMING_FEATURE_*`. - The Compilation Diagnostics section is populated by `diagnose_compilation.py`. If not run, note that it was skipped. -- `COMPILATION_CACHING` has been measured at 5-14% faster clean builds across tested projects. The benefit compounds in real developer workflows (branch switching, pulling changes, CI with persistent DerivedData). The benchmark script auto-detects this setting and runs a cached clean phase for validation. +- `COMPILATION_CACHE_ENABLE_CACHING` has been measured at 5-14% faster clean builds across tested projects. The benefit compounds in real developer workflows (branch switching, pulling changes, CI with persistent DerivedData). The benchmark script auto-detects this setting and runs a cached clean phase for validation. - When recommending SPM version pins, verify that tagged versions exist (`git ls-remote --tags`) before suggesting a pin-to-tag change. If no tags exist, recommend pinning to a commit revision hash. - Before including a local package in a build-time recommendation, verify it is referenced in `project.pbxproj` via `XCLocalSwiftPackageReference`. Packages that exist on disk but are not linked do not affect build time. diff --git a/skills/xcode-build-orchestrator/scripts/benchmark_builds.py b/skills/xcode-build-orchestrator/scripts/benchmark_builds.py index 3e27788..784a749 100755 --- a/skills/xcode-build-orchestrator/scripts/benchmark_builds.py +++ b/skills/xcode-build-orchestrator/scripts/benchmark_builds.py @@ -36,7 +36,7 @@ def parse_args() -> argparse.Namespace: parser.add_argument( "--no-cached-clean", action="store_true", - help="Skip cached clean builds even when COMPILATION_CACHING is detected.", + help="Skip cached clean builds even when COMPILATION_CACHE_ENABLE_CACHING is detected.", ) parser.add_argument( "--extra-arg", @@ -142,13 +142,13 @@ def xcode_version() -> str: def detect_compilation_caching(base_command: List[str]) -> bool: - """Check whether COMPILATION_CACHING is enabled in the resolved build settings.""" + """Check whether COMPILATION_CACHE_ENABLE_CACHING is enabled in the resolved build settings.""" result = run_command([*base_command, "-showBuildSettings"]) if result.returncode != 0: return False for line in result.stdout.splitlines(): stripped = line.strip() - if stripped.startswith("COMPILATION_CACHING") and "=" in stripped: + if stripped.startswith("COMPILATION_CACHE_ENABLE_CACHING") and "=" in stripped: value = stripped.split("=", 1)[1].strip() return value == "YES" return False @@ -214,7 +214,7 @@ def main() -> int: runs["clean"].append(measure_build(base_command, artifact_stem, output_dir, "clean", index)) # --- Cached clean builds --------------------------------------------------- - # When COMPILATION_CACHING is enabled, the compilation cache lives outside + # When COMPILATION_CACHE_ENABLE_CACHING is enabled, the compilation cache lives outside # DerivedData and survives product deletion. We measure "cached clean" # builds by pointing DerivedData at a temp directory, warming the cache with # one build, then deleting the DerivedData directory (but not the cache) diff --git a/skills/xcode-build-orchestrator/scripts/generate_optimization_report.py b/skills/xcode-build-orchestrator/scripts/generate_optimization_report.py index 086ec22..fc97cec 100644 --- a/skills/xcode-build-orchestrator/scripts/generate_optimization_report.py +++ b/skills/xcode-build-orchestrator/scripts/generate_optimization_report.py @@ -89,7 +89,7 @@ def _parse_target_configs(pbxproj: str) -> Dict[str, Dict[str, Dict[str, str]]]: # --------------------------------------------------------------------------- _DEBUG_EXPECTATIONS: List[Tuple[str, str, str]] = [ - ("SWIFT_COMPILATION_MODE", "incremental", "Incremental recompiles only changed files"), + ("SWIFT_COMPILATION_MODE", "singlefile", "Single-file mode recompiles only changed files (Xcode UI: Incremental)"), ("SWIFT_OPTIMIZATION_LEVEL", "-Onone", "Optimization passes add compile time without debug benefit"), ("GCC_OPTIMIZATION_LEVEL", "0", "C/ObjC optimization adds compile time without debug benefit"), ("ONLY_ACTIVE_ARCH", "YES", "Building all architectures multiplies compile and link time"), @@ -99,7 +99,7 @@ def _parse_target_configs(pbxproj: str) -> Dict[str, Dict[str, Dict[str, str]]]: ] _GENERAL_EXPECTATIONS: List[Tuple[str, str, str]] = [ - ("COMPILATION_CACHING", "YES", "Caches compilation results so repeat builds of unchanged inputs are served from cache. Measured 5-14% faster clean builds across tested projects; benefit compounds during branch switching and pulling changes"), + ("COMPILATION_CACHE_ENABLE_CACHING", "YES", "Caches compilation results so repeat builds of unchanged inputs are served from cache. Measured 5-14% faster clean builds across tested projects; benefit compounds during branch switching and pulling changes"), ] _RELEASE_EXPECTATIONS: List[Tuple[str, str, str]] = [ @@ -127,7 +127,7 @@ def _effective_value( def _check(actual: Optional[str], expected: str) -> bool: if actual is None: - if expected in ("incremental",): + if expected in ("singlefile",): return True return False if expected == "-O" and actual in ("-O", '"-O"', '"-Osize"', "-Osize"): diff --git a/skills/xcode-compilation-analyzer/references/build-optimization-sources.md b/skills/xcode-compilation-analyzer/references/build-optimization-sources.md index aa2868f..30d9fa8 100644 --- a/skills/xcode-compilation-analyzer/references/build-optimization-sources.md +++ b/skills/xcode-compilation-analyzer/references/build-optimization-sources.md @@ -117,7 +117,7 @@ Source: Key takeaways: -- Granular caching is controlled by `SWIFT_ENABLE_COMPILE_CACHE` and `CLANG_ENABLE_COMPILE_CACHE`, under the umbrella `COMPILATION_CACHING` setting. +- Granular caching is controlled by `SWIFT_ENABLE_COMPILE_CACHE` and `CLANG_ENABLE_COMPILE_CACHE`, under the umbrella `COMPILATION_CACHE_ENABLE_CACHING` setting. - Non-cacheable tasks include `CompileStoryboard`, `CompileXIB`, `CompileAssetCatalogVariant`, `PhaseScriptExecution`, `DataModelCompile`, `CopyPNGFile`, `GenerateDSYMFile`, and `Ld`. - SPM dependencies are not yet cacheable as of Xcode 26 beta. diff --git a/skills/xcode-project-analyzer/references/build-optimization-sources.md b/skills/xcode-project-analyzer/references/build-optimization-sources.md index aa2868f..30d9fa8 100644 --- a/skills/xcode-project-analyzer/references/build-optimization-sources.md +++ b/skills/xcode-project-analyzer/references/build-optimization-sources.md @@ -117,7 +117,7 @@ Source: Key takeaways: -- Granular caching is controlled by `SWIFT_ENABLE_COMPILE_CACHE` and `CLANG_ENABLE_COMPILE_CACHE`, under the umbrella `COMPILATION_CACHING` setting. +- Granular caching is controlled by `SWIFT_ENABLE_COMPILE_CACHE` and `CLANG_ENABLE_COMPILE_CACHE`, under the umbrella `COMPILATION_CACHE_ENABLE_CACHING` setting. - Non-cacheable tasks include `CompileStoryboard`, `CompileXIB`, `CompileAssetCatalogVariant`, `PhaseScriptExecution`, `DataModelCompile`, `CopyPNGFile`, `GenerateDSYMFile`, and `Ld`. - SPM dependencies are not yet cacheable as of Xcode 26 beta. diff --git a/skills/xcode-project-analyzer/references/build-settings-best-practices.md b/skills/xcode-project-analyzer/references/build-settings-best-practices.md index 9dee131..8345167 100644 --- a/skills/xcode-project-analyzer/references/build-settings-best-practices.md +++ b/skills/xcode-project-analyzer/references/build-settings-best-practices.md @@ -128,7 +128,7 @@ These settings optimize for production builds. ### Compilation Caching -- **Key:** `COMPILATION_CACHING` +- **Key:** `COMPILATION_CACHE_ENABLE_CACHING` - **Recommended:** `YES` - **Why:** Caches compilation results for Swift and C-family sources so repeated compilations of the same inputs are served from cache. The biggest wins come from branch switching and clean builds where source files are recompiled unchanged. This is an opt-in feature. The umbrella setting controls both `SWIFT_ENABLE_COMPILE_CACHE` and `CLANG_ENABLE_COMPILE_CACHE` under the hood; those can be toggled independently if needed. - **Measurement:** Measured 5-14% faster clean builds across tested projects (87 to 1,991 Swift files). The benefit compounds in real developer workflows where the cache persists between builds -- branch switching, pulling changes, and CI with persistent DerivedData -- though the exact savings depend on how many files change between builds. @@ -206,7 +206,7 @@ When reporting results, use this structure: ... ### General (All Configurations) -- [ ] `COMPILATION_CACHING`: `NO` (recommended: `YES`) +- [ ] `COMPILATION_CACHE_ENABLE_CACHING`: `NO` (recommended: `YES`) ... ### Cross-Target Consistency diff --git a/skills/xcode-project-analyzer/references/project-audit-checks.md b/skills/xcode-project-analyzer/references/project-audit-checks.md index 0d32fca..cf42305 100644 --- a/skills/xcode-project-analyzer/references/project-audit-checks.md +++ b/skills/xcode-project-analyzer/references/project-audit-checks.md @@ -59,7 +59,7 @@ Key settings to verify: - `DEBUG_INFORMATION_FORMAT` -- `dwarf` for Debug, `dwarf-with-dsym` for Release - `GCC_OPTIMIZATION_LEVEL` -- `0` for Debug, `s` for Release - `ENABLE_TESTABILITY` -- `YES` for Debug, `NO` for Release -- `COMPILATION_CACHING` -- recommended `YES` for all configurations; caches repeated compilations during branch switching and clean builds +- `COMPILATION_CACHE_ENABLE_CACHING` -- recommended `YES` for all configurations; caches repeated compilations during branch switching and clean builds - `EAGER_LINKING` -- recommended `YES` for Debug; starts linking before all compilation finishes - `SWIFT_USE_INTEGRATED_DRIVER` -- recommended `YES`; uses the integrated driver for better scheduling - `CLANG_ENABLE_MODULES` -- recommended `YES`; caches module maps on disk for C/ObjC @@ -85,7 +85,7 @@ CocoaPods is deprecated. Do not attempt CocoaPods-specific build optimizations s When a project uses CocoaPods (presence of `Podfile`, `Pods/`, or a `Pods.xcodeproj`), recommend migrating to Swift Package Manager as the highest-impact long-term improvement. SPM advantages for build time: -- **Compilation caching**: `COMPILATION_CACHING` works with SPM targets out of the box, delivering cumulative benefits across branch switching, pulling changes, and CI. +- **Compilation caching**: `COMPILATION_CACHE_ENABLE_CACHING` works with SPM targets out of the box, delivering cumulative benefits across branch switching, pulling changes, and CI. - **Better build parallelism**: SPM targets build in parallel based on the dependency graph without the overhead of a separate Pods project. - **No xcconfig regeneration**: CocoaPods regenerates xcconfigs and its own project file on every `pod install`. SPM resolution is lighter and its outputs integrate natively. - **Native Xcode integration**: No separate `Pods.xcodeproj`, no workspace stitching, and full support for modern Xcode features like explicit modules.