Package Swift stdlibs with macOS CLI#11159
Conversation
Co-Authored-By: Oz <oz-agent@warp.dev>
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR updates the macOS CLI packaging flow to add Swift runtime rpaths, collect Swift stdlib sidecars into the bundle, include the sidecar lib/ directory in release archives, and install that directory alongside the remote-server binary. It also adds a focused installer regression test for the new sidecar layout.
Concerns
- No blocking correctness, error-handling, or security concerns found in the changed lines.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Description
Adds Swift runtime sidecar packaging for the standalone macOS CLI/remote-server artifact:
/usr/lib/swiftand@executable_path/lib, preferring system Swift libraries on modern macOS while preserving a sidecar fallback layout.xcrun swift-stdlib-toolduringscript/macos/bundle --artifact clito collect requiredlibswift*.dylibfiles intobundle/osx/lib.libin the macOS CLI release tarball alongside the binary andresources.install_remote_server.shto safely install an extractedlib/sidecar to$install_dir/libwithout changing the installed binary path.lib/sidecar path.Note: the originally requested remote base branch
aloke/remote_code_errors_newwas not present onorigin, so this PR targetsmaster.Linked Issue
ready-to-specorready-to-implement.Testing
bash -n script/macos/bundle✅cargo fmt✅cargo test -p remote_server install_script✅install_script_installs_lib_sidecar_without_changing_binary_pathcargo clippy --workspace --all-targets --all-features --tests -- -D warnings✅Built native arm64 CLI:
script/macos/bundle --nosign --channel dev --arch aarch64 --artifact cli✅xcrun swift-stdlib-toolcopied 0 sidecar dylibs for arm64 on this toolchain.otool -L target/release-cli-debug_assertions/bundle/osx/dev | grep libswiftCoreshows/usr/lib/swift/libswiftCore.dylib.otool -l target/release-cli-debug_assertions/bundle/osx/devshows LC_RPATH entries for/usr/lib/swiftand@executable_path/lib.dev resources lib;/tmp/warp-cli-swift-validation-arm/dev --versionreturnedOz <unknown>.Built/validated x86_64 CLI under Rosetta:
script/macos/bundle --nosign --skip-build --channel dev --arch x86_64 --artifact cli✅lib/libswiftCore.dylibplus 14 otherlibswift*.dylibsidecars.otool -L target/release-cli-debug_assertions/bundle/osx/dev | grep libswiftCoreshows@rpath/libswiftCore.dylib./usr/lib/swiftfirst, then@executable_path/lib, so modern macOS uses the system Swift runtime while older systems can fall back to the sidecar.dev resources lib;arch -x86_64 /tmp/warp-cli-swift-validation-x86/dev --versionreturnedOz <unknown>.I have manually tested my changes locally with
./script/runScreenshots / Videos
Not applicable; packaging/install-script change only.
Agent Mode
CHANGELOG-NONE
Conversation: https://staging.warp.dev/conversation/4b3780e8-e12c-49d9-9f22-ad954f52070f
Co-Authored-By: Oz oz-agent@warp.dev