reload: skip the app's separate Swift module emission
Summary
scripts/reload.shbuilds the app target with the standalone Swift driver and-no-emit-module-separately, so no separate emit-module job type-checks every app declaration on each edit. Packages, the CLI, and extensions keep their settings (the overrides are keyed on$(TARGET_NAME)).- The app's Debug configuration generates no Objective-C interface header. Nothing includes it: the app has no Objective-C that imports Swift.
- Nothing imports the app's Swift module except
cmuxTests(@testable import), which reload never builds. Test builds go throughtest-unit.shand CI scripts, which are unchanged. CMUX_RELOAD_APP_EMIT_MODULE=1restores the old behavior.
This is the change #14364 made for cmuxTests (test edit 31 s to 4 s), applied to the app for dev reloads.
Numbers
Edit-loop benchmark (scripts/ci/app-edit-loop-benchmark.py on perf/app-edit-loop), Blacksmith 12-vCPU, Xcode 26.6, reload.sh incremental:
| edit | emit module (today) | this PR |
|---|---|---|
| comment in an app view | 37.9 s | 25.1 s |
| string literal in a function body | 39.9 s | 26.9 s |
| new fileprivate / internal top-level decl | 40.1 / 40.5 s | 29.1 / 29.6 s |
| new method on a hot type (508 files) | 65.9 s | 65.5 s |
| package body edit | 20.5 s | 20.5 s |
The first reload after this lands rebuilds once because the Swift flags changed (about 4 min on that runner).
Testing
reload-buildon this branch: https://github.com/manaflow-ai/cmux/actions/runs/36125041235scripts/check-pbxproj.shpasses.
๐ค Generated with Claude Code
Summary by cubic
Makes scripts/reload.sh skip the app's separate Swift module emission during dev reloads, so incremental app edits rebuild faster. The app target now uses the standalone Swift driver with -no-emit-module-separately; packages, the CLI, and extensions keep their existing settings. Nothing imports the app's Swift module except cmuxTests (via @testable import), which reload never builds, and the app's Debug configuration now generates no Objective-C interface header since nothing includes it. Set CMUX_RELOAD_APP_EMIT_MODULE=1 to restore the previous behavior.
Benchmarks (12-vCPU runner, Xcode 26.6, incremental reload):
- Comment in an app view: 37.9 s โ 25.1 s; string literal in function body: 39.9 s โ 26.9 s; new top-level decl: 40.1/40.5 s โ 29.1/29.6 s.
- New method on a hot type (508 files) and package body edits are unchanged.
- The first reload after landing triggers one rebuild (~4 min) because the Swift flags changed.
- lldb's
po/exprin app frames need the module; setCMUX_RELOAD_APP_EMIT_MODULE=1to get expression evaluation back.