Rearrange Examples/LocalDebugging package structure to work with archive plugin #277
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.
I propose to re-arrange the file and package structure in
Examples/LocalDebugging
to make it work with thearchive
plugin.Motivation:
The current directory and package structure in the
Examples/LocalDebugging
example does not work out of the box with thearchive
plugin.See #276
Modifications:
I re-arranged the package structure to share the same
Package.swift
for the targetsMyLambda
andShared
. This allows the plugin to build and archive MyLamba. I also made minimum changes to the Xcode workspace to continue to be able to build and debug from Xcode.Let me know if there is a better way to arrange package and file in this project to work with : Xcode builds, command line builds, and the
archive
plugin.Result:
Project now builds with
swift build
It runs with
export LOCAL_LAMBDA_SERVER_ENABLED=true && swift run MyLambda
.It packages with
swift package --disable-sandbox archive
It runs by selecting the
MyLambda
target in XcodeIt runs by selecting the
MyApp
target in Xcode