Repository navigation
base red: release-config test builds compile UiLayerPreviewTests - #30055
Conversation
`swift build --build-tests -c release` of Packages/macOS/CmuxNext failed with "UiLayerPreviewTests.swift:6:20: cannot find 'UiLayerPreviewData' in scope" since fe5fcb8 (#24978). The CmuxNextUiLayerPreview library defines CMUX_UI_LAYER_PREVIEW only in Debug and its whole source is inside that guard, so in Release the library is empty, while its test target had no define and no guard. Every Release-config Swift suite step on the fleet (package-test-lane.sh suite with CMUX_SWIFT_SUITE_CONFIGURATION=release) stopped at this build error, e.g. jobs a836ea817d9250a196502b2b and 9d819957423526c18421578e. Why the guard and not moving UiLayerPreviewData out of it: #24978 makes the preview leaf Debug-only on purpose (docs/cmux-next/native-ui-host.md: "is compiled only in the Debug configuration ... not included in release app builds"; architecture-layers.json notes it as Debug-only). Its only consumer is the Debug Prototypes/UiLayerHost. Shipping its data type in Release would undo that for no user. So the test target now takes the same define with the same condition (one shared uiLayerPreviewDefine, so the two cannot drift), and the test file sits inside #if CMUX_UI_LAYER_PREVIEW: in Release the test target builds with no tests; in Debug the test runs as before. Red: the existing Release suite builds above fail at base 2a822f8. Green: fleet Release-config suite build at this head (job IDs in the PR).
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
red: cmux-next checks (god files, concurrency, crash safety, l10n); NEW: Shipped in:
|
|
Review (independent review subagent): SHIP at 264ca3b VerdictSHIP. The change fixes the root cause of the Release-config test build red. I found no correctness defect. Correctness
Findings (non-blocking)
Evidence read
|
|
Found 7 test failures on Blacksmith runners: Failures
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
swift build --build-tests -c releaseofPackages/macOS/CmuxNexthas failed since fe5fcb8 (#24978):CmuxNextUiLayerPreviewdefinesCMUX_UI_LAYER_PREVIEWonly.when(configuration: .debug), and all of its source is inside#if CMUX_UI_LAYER_PREVIEW. In Release the library is empty, but its test target had no define and no guard. This stops every Release-config Swift suite step on the fleet (package-test-lane.sh suitewithCMUX_SWIFT_SUITE_CONFIGURATION=release), for example jobsa836ea817d9250a196502b2band9d819957423526c18421578e.Fix: the test target gets the same define with the same condition (one shared
uiLayerPreviewDefine, so the two cannot drift), and the test file is inside#if CMUX_UI_LAYER_PREVIEW. In Release the test target builds with no tests. In Debug the test runs as before.Why not move
UiLayerPreviewDataout of the guard: #24978 makes the preview leaf Debug-only on purpose.docs/cmux-next/native-ui-host.mdsays it "is compiled only in the Debug configuration ... not included in release app builds", andarchitecture-layers.jsonlists it as Debug-only. Its only consumer is the DebugPrototypes/UiLayerHost.Changelog
none
Evidence
2a822f8157d4:7441c6241e1956e7e3c69ef2(release-config suite build,KeepAwakePolicyTests,CMUX_SWIFT_SUITE_CONFIGURATION=release).f430149443470620d2a286e6(same step).--app --package CmuxNext --recipe-version 2):ec318721bca96a6782e73a9d.Observed / Not run
Observed: the base error in job
a836ea817d9250a196502b2b's full log (line 3939, the error above);prepush-gate.pypassed (no new violations).lint-ios-package-conventions.sh --namespace-fixreports one base error in a file this PR does not touch (CmuxNextAgentPane/AgentPaneHandoffPrompt.swift:11, namespace-type).Not run: the Debug-config
UiLayerPreviewTestsrun. It compiled at the head in jobec318721bca96a6782e73a9d; the test body did not change, only the guard was added around it.No capture: build configuration and test guard only, no UI change.