Proposal: Simplify Example Dependencies Management
Problem
Currently, examples in swift-aws-lambda-runtime use remote GitHub dependencies by default, requiring complex environment variable manipulation to switch to
local development versions. This creates friction for:
- Local feature development
- CI/CD workflows
- Contributors testing changes
See issue #536 for details.
Proposed Solution
Reverse the default behavior:
- Examples depend on local runtime (../..) by default
- Include commented GitHub dependency line for standalone usage
Example Package.swift
dependencies: [
// For local development (default)
.package(name: "swift-aws-lambda-runtime", path: "../.."),
// For standalone usage, comment the line above and uncomment below:
// .package(url: "https://github.com/awslabs/swift-aws-lambda-runtime.git", from: "1.0.0"),
]
Benefits
- No environment variables needed for local development
- Simpler CI configuration
- Better contributor experience
- Clear documentation in code
- One-line change for standalone testing
Trade-offs
- Users testing examples standalone must uncomment one line
- Assumes developers can handle this simple modification
Feedback Requested
- Does this change align with your development workflow?
- Are there use cases where the current approach is preferable?
- Should we add tooling to automate the dependency swap, or is manual uncommenting sufficient?
-Any concerns about discoverability for users who want standalone examples?
Please share your thoughts and any concerns. If there are no major objections, I'll proceed with implementing this change.