Repository navigation
Package *.bundle resource bundles produced by Swift 6.4 - #703
Merged
Merged
Conversation
Swift 6.4 builds with Swift Build by default, which names resource bundles `<Package>_<Target>.bundle` instead of `.resources` on Linux. The ZIP and OCI archive backends only copied `.resources` directories, so functions using `Bundle.module` crashed at runtime. Fixes #702 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lays out a fake build directory with a resource bundle and a decoy build artifact, and checks both the ZIP and OCI backends copy the bundle (for the native `.resources` and Swift Build `.bundle` names) but not the decoy. Co-Authored-By: Claude Opus 5.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.
Fixes #702
lambda-buildleft resource bundles out of the ZIP and OCI image when building with Swift 6.4, whichswift:amazonlinux2023now ships. Swift 6.4 builds with Swift Build by default, and Swift Build names the bundle<Package>_<Target>.bundleon Linux instead of.resources. Both archive backends only copied.resources, so functions usingBundle.modulecrashed at runtime. CI caught it on theResourcesPackagingexample.Changes
ZipArchiveBackendandOCIArchiveBackendnow copy both*.resourcesand*.bundledirectories found next to the built executable.Testing
lambda-build --cross-compile container --base-docker-image swift:amazonlinux2023(Swift 6.4.1) onExamples/ResourcesPackagingagainst the local checkout. The ZIP now containsResourcesPackaging_MyLambda.bundle/hello.txt.swift test --filter ArchiveBackendpasses.🤖 Generated with Claude Code