swift-server / swift-aws-lambda-runtime

Swift implementation of AWS Lambda Runtime
Apache License 2.0
1.12k stars 101 forks source link

Rearrange Examples/LocalDebugging package structure to work with archive plugin #277

Closed sebsto closed 5 months ago

sebsto commented 1 year ago

I propose to re-arrange the file and package structure in Examples/LocalDebugging to make it work with the archive plugin.

Motivation:

The current directory and package structure in the Examples/LocalDebugging example does not work out of the box with the archive plugin. See https://github.com/swift-server/swift-aws-lambda-runtime/issues/276

Modifications:

I re-arranged the package structure to share the same Package.swift for the targets MyLambda and Shared. 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 Xcode It runs by selecting the MyApp target in Xcode

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

swift-server-bot commented 1 year ago

Can one of the admins verify this patch?

tomerd commented 1 year ago

somewhat replaced by https://github.com/swift-server/swift-aws-lambda-runtime/pull/292

tomerd commented 5 months ago

closing in inactive PRs, feel free to re-open if still relevant