Skip to content

Conversation

@sebsto
Copy link
Collaborator

@sebsto sebsto commented Jan 1, 2026

This PR refactors the project's directories.
As the number of source files grows, I created subdirectories to separate the runtime itself, from its HTTP Client (RuntimeClient) and local HTTP Server (Lambda+LocalServer).

The new layout looks like this:

Sources
├── AWSLambdaRuntime
│   ├── FoundationSupport
│   │   ├── Context+Foundation.swift
│   │   ├── Lambda+JSON.swift
│   │   └── Vendored
│   │       ├── ByteBuffer-foundation.swift
│   │       └── JSON+ByteBuffer.swift
│   ├── HTTPClient
│   │   ├── ControlPlaneRequest.swift
│   │   ├── ControlPlaneRequestEncoder.swift
│   │   ├── LambdaRuntimeClient+ChannelHandler.swift
│   │   ├── LambdaRuntimeClient.swift
│   │   └── LambdaRuntimeClientProtocol.swift
│   ├── HTTPServer
│   │   ├── Lambda+LocalServer+Pool.swift
│   │   └── Lambda+LocalServer.swift
│   ├── Lambda.swift
│   ├── LambdaClock.swift
│   ├── LambdaContext.swift
│   ├── LambdaRequestID.swift
│   ├── LambdaResponseStreamWriter+Headers.swift
│   ├── LambdaRuntimeError.swift
│   ├── Runtime
│   │   ├── LambdaHandlers.swift
│   │   ├── LambdaRuntime+Codable.swift
│   │   ├── LambdaRuntime+Handler.swift
│   │   ├── LambdaRuntime+ServiceLifecycle.swift
│   │   └── LambdaRuntime.swift
│   ├── SendableMetatype.swift
│   ├── Utils.swift
│   └── Version.swift
└── MockServer
    └── MockHTTPServer.swift

@sebsto sebsto self-assigned this Jan 1, 2026
@sebsto sebsto added the semver/none No version bump required. label Jan 1, 2026
@sebsto sebsto requested a review from Copilot January 1, 2026 15:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reorganizes the project structure by moving source files into subdirectories as the codebase grows, improving maintainability and logical separation of concerns.

  • Runtime core files moved to Runtime/ subdirectory
  • HTTP client implementation moved to HTTPClient/ subdirectory
  • Local server support moved to HTTPServer/ subdirectory

Reviewed changes

Copilot reviewed 2 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Sources/AWSLambdaRuntime/Runtime/LambdaRuntime.swift Core runtime implementation moved to Runtime subdirectory
Sources/AWSLambdaRuntime/Runtime/LambdaRuntime+ServiceLifecycle.swift ServiceLifecycle integration moved to Runtime subdirectory
Sources/AWSLambdaRuntime/Runtime/LambdaRuntime+Handler.swift Handler initialization extensions extracted from LambdaHandlers.swift and moved to Runtime subdirectory
Sources/AWSLambdaRuntime/Runtime/LambdaRuntime+Codable.swift Codable adapter implementations moved to Runtime subdirectory
Sources/AWSLambdaRuntime/Runtime/LambdaHandlers.swift Handler protocol definitions remain, with LambdaRuntime extensions moved out; added Sendable conformance to StreamingClosureHandler
Sources/AWSLambdaRuntime/HTTPServer/Lambda+LocalServer.swift Local server implementation for testing moved to HTTPServer subdirectory
Sources/AWSLambdaRuntime/HTTPServer/Lambda+LocalServer+Pool.swift Pool data structure for local server moved to HTTPServer subdirectory
Sources/AWSLambdaRuntime/HTTPClient/LambdaRuntimeClientProtocol.swift Runtime client protocol definitions moved to HTTPClient subdirectory
Sources/AWSLambdaRuntime/HTTPClient/LambdaRuntimeClient.swift Runtime client implementation moved to HTTPClient subdirectory
Sources/AWSLambdaRuntime/HTTPClient/LambdaRuntimeClient+ChannelHandler.swift Channel handler for runtime client moved to HTTPClient subdirectory
Sources/AWSLambdaRuntime/HTTPClient/ControlPlaneRequestEncoder.swift Control plane request encoder moved to HTTPClient subdirectory
Sources/AWSLambdaRuntime/HTTPClient/ControlPlaneRequest.swift Control plane request types and metadata moved to HTTPClient subdirectory

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sebsto sebsto merged commit e0f064a into main Jan 1, 2026
43 checks passed
@sebsto sebsto deleted the sebsto/refactor_dir_layout branch January 1, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver/none No version bump required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant