Skip to content

Modernize the codebase for Swift 6.4 and beyond, groundwork for v3#690

Merged
sebsto merged 29 commits into
mainfrom
feat/v3
Jul 9, 2026
Merged

Modernize the codebase for Swift 6.4 and beyond, groundwork for v3#690
sebsto merged 29 commits into
mainfrom
feat/v3

Conversation

@sebsto

@sebsto sebsto commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Modernizes the codebase (still builds on 6.2, 6.3, and 6.4), remove deprecated functions, and lays the groundwork for v3.

Swift feature flags

Enables four feature flags in Package.swift:

  • NonisolatedNonsendingByDefault
  • ExistentialAny
  • MemberImportVisibility
  • InternalImportsByDefault

Task-local logger

The runtime binds the per-invocation Logger (carrying requestID / traceID) as the task-local Logger.current for the duration of the handler. Any code in the call tree can read it and inherit the request metadata, with no need to thread context.logger through every function:

import AWSLambdaRuntime
import Logging

func validate(_ event: Request) {
    Logger.current.debug("Validating request")  // carries this invocation's requestID / traceID
}

let runtime = LambdaRuntime { (event: Request, context: LambdaContext) in
    validate(event)
    context.logger.info("Processing request")   // context.logger and Logger.current are equivalent here
    // ...
}

See the new logging.md article for details.

@sebsto sebsto added the ⚠️ semver/major Breaks existing public API. label Jul 7, 2026
@sebsto sebsto self-assigned this Jul 7, 2026
@sebsto sebsto modified the milestone: 2.x Jul 7, 2026
@sebsto sebsto merged commit c824043 into main Jul 9, 2026
49 of 51 checks passed
@sebsto sebsto deleted the feat/v3 branch July 9, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚠️ semver/major Breaks existing public API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant