Repository navigation
fix(build): resolve SwiftPM bin path instead of hardcoding it - #379
Merged
Merged
Conversation
Newer SwiftPM (swift-build backend, Xcode 27) puts products in .build/out/Products/Release, so copying from .build/arm64-apple-macosx/release failed after a successful compile. Ask `swift build --show-bin-path` for the location and pick up the resource bundle from the same directory. Co-Authored-By: Claude Opus 5.5 <[email protected]>
wxtsky
added a commit
that referenced
this pull request
Oct 22, 2026
…fresh products Swift 6.4 (Xcode 27) made swiftbuild SwiftPM's default. Its products land in .build/out/Products/Release for every --arch, while build-dmg.sh kept copying from .build/<arch>-apple-macosx/release, where the v1.0.35 build was still sitting: the published v1.0.36, v1.0.37 and v1.0.38 DMGs carry v1.0.35's app and bridge (identical LC_UUIDs for both architectures) with only Info.plist bumped, and the resource bundle came from the same stale directory. Moving to swiftbuild is not an option yet: both architectures overwrite each other in its one Products directory, and LC_BUILD_VERSION records the 14.0 deployment target as the SDK, which runs AppKit in its old-SDK compatibility mode. scripts/swiftpm-release.sh, shared by build.sh and build-dmg.sh, pins --build-system native, asks SwiftPM for the bin path (as #379 did for build.sh), deletes the previous products before building, and rejects a binary that is missing, holds the wrong architecture, or records an SDK other than the one that built it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner
|
Thanks for this — merged as 3dcf36d, and it led straight to a bigger problem.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
With Xcode 27 (SwiftPM 6.4, swift-build backend)
./build.shcompiles successfully and then fails while assembling the app bundle:The new build system places products in
.build/out/Products/Releaserather than.build/arm64-apple-macosx/release. The resource-bundle glob (.build/*/release/*.bundle) misses that path for the same reason.Fix
Ask SwiftPM where it put the products (
swift build -c release --arch arm64 --show-bin-path) and copy the binaries and the resource bundle from that directory. This works with both the legacy and the new build system, so older toolchains are unaffected.Testing
./build.shproduces.build/release/CodeIsland.appcontaining the binary,codeisland-bridge, Sparkle.framework, andCodeIsland_CodeIsland.bundle;codesign --verify --deep --strictpasses.--show-bin-pathreturns.build/arm64-apple-macosx/releasethere, which is the previous hardcoded value.🤖 Generated with Claude Code