Repository navigation
fix(release): build release via xcodebuild so the .app launches - #70
Merged
Merged
Conversation
The native `swift build` accessor resolves Bundle.module from the .app
ROOT, which crashed v0.1.5 at launch ("could not load resource bundle");
`swift build --build-system swiftbuild` generates the correct
resourceURL-based accessor but fails to compile SwiftTerm's Metal shader
on CI. Build with xcodebuild instead: Xcode's toolchain compiles Metal
AND emits the Contents/Resources accessor.
- release-build.yml: replace the metal-shim + swiftbuild build with
`xcodebuild -scheme Simpleton -configuration Release`, with diagnostics
(scheme list, product listing, accessor type, sign_update location)
since xcodebuild can't be run on the CLT-only dev machine.
- make-app-bundle.sh: honor SIMPLETON_BINDIR so the bundler can consume
xcodebuild's DerivedData/Build/Products/Release output.
- Assemble step passes SIMPLETON_BINDIR; Sparkle sign_update lookup now
searches DerivedData/SourcePackages (where xcodebuild extracts the
pinned Sparkle SPM artifact) ahead of .build/artifacts.
- CoreChecks runs with the default build system (no Metal needed).
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.
Why
v0.1.5 crashed at launch with a Swift
fatalErrorfromBundle.module:could not load resource bundle. Root cause: CI'sswift build(nativebuild system) generates a
resource_bundle_accessor.swiftthat resolvesBundle.modulefrom the .app bundle root, but our.applayout keepsthe SPM resource bundle under
Contents/Resources/(the only valid place —codesignrejects resource bundles at the root).swift build --build-system swiftbuildgenerates the correctBundle.main.resourceURL-based accessor, but fails to compile SwiftTerm'sMetal shader on the runner (
CompileMetalFile/ClangStatCacheerrors).Fix
Build the release with xcodebuild instead. Xcode's toolchain compiles
the Metal shader and emits the
Contents/Resourcesresource accessor.release-build.yml: replace the metal-shim +swiftbuildbuild withxcodebuild -scheme Simpleton -configuration Release. Includesdiagnostics (scheme list, product listing, accessor type,
sign_updatelocation) because xcodebuild can't be run on the CLT-only dev machine —
one CI run must reveal the layout.
make-app-bundle.sh: honorSIMPLETON_BINDIRso the bundler consumesxcodebuild's
DerivedData/Build/Products/Releaseoutput.SIMPLETON_BINDIR; the Sparklesign_updatelookup now searches
DerivedData/SourcePackages(where xcodebuildextracts the checksum-pinned Sparkle SPM artifact) ahead of
.build/artifacts.Verification
actionlint+shellcheckclean locally.open-launchto confirm the crash is gone.