v1.2.1: fix packaged-app crash for real (resource loading), add release smoke test - #12
Merged
Merged
Conversation
… Bundle.module v1.2.0's rename fix was necessary but not sufficient. SwiftPM's generated Bundle.module accessor for executable targets only checks two locations: the .app bundle ROOT (Bundle.main.bundleURL) and a baked-in absolute path into the build machine's .build directory. It never checks Contents/Resources, where create-dmg.sh places the bundle — so the packaged app still crashed at launch everywhere except the machine that built it, where the baked-in fallback path silently succeeded. That same fallback made every on-machine launch test pass, including the one that validated v1.2.0. - New AppResources.bundle resolves the bundle via Bundle.main.resourceURL (Contents/Resources in the .app; the binary's directory in dev builds) with Bundle.module only as a last-resort fallback; all app code now goes through it - release.yml gains a release-blocking smoke test: mount the built DMG and launch the app with .build hidden, so a crashing packaged app can never ship again - CLAUDE.md: document the accessor behavior, forbid direct Bundle.module use, and require hidden-build-dir launch tests - Bump version to 1.2.1 Verified: packaged app from the DMG launches with the build directory renamed away (the exact condition under which v1.0.0–v1.2.0 crash). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
v1.2.0's rename fix was necessary but not sufficient — the published v1.2.0 DMG still crashes on launch. SwiftPM's generated
Bundle.moduleaccessor for executable targets only checks the .app ROOT and a baked-in absolute build-machine path — neverContents/Resources. The baked-in fallback is also why every on-machine launch test passed, including the one that validated v1.2.0.AppResources.bundleresolves the resource bundle viaBundle.main.resourceURL(works in the packaged app AND dev builds); all app code now uses it.buildhidden — a crashing packaged app can never ship againVerified locally: the packaged v1.2.1 app launches with the build directory renamed away — the exact condition under which v1.0.0–v1.2.0 crash.
After this releases, v1.2.0 will be marked as a pre-release so
latest(curl installer, Releases page) points at v1.2.1.🤖 Generated with Claude Code