Skip to content

Conversation

sebsto
Copy link
Contributor

@sebsto sebsto commented Sep 13, 2025

Make required changed to ensure the library compiles when no traits are enabled (fix: #562)

Add an example project that serves as test in the CI

Motivation:

Recent changes introduced compilation errors when no traits are enabled.

Modifications:

  • LambdaResponseStreamWriter.writeStatusAndHeaders() moved to the FoundationSupport directory where all classes and struct depending on Encodable and Decodable are located, protected by #if FoundationJSONSupport
  • LambdaRuntime.run() method when ServiceLifeCycle is disabled in now public (and therefore can not be @inlinable anymore)
  • Add an example that disables all traits.
  • Add this example to the CI

Result:

The Library now compiles when no default traits are enabled.
This is flagged semver/major because we change the public API LambdaRuntime.run()

@sebsto sebsto added this to the 2.0 milestone Sep 13, 2025
@sebsto sebsto self-assigned this Sep 13, 2025
@sebsto sebsto added kind/bug Feature doesn't work as expected. ⚠️ semver/major Breaks existing public API. labels Sep 13, 2025
@sebsto sebsto requested a review from adam-fowler September 13, 2025 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Feature doesn't work as expected. ⚠️ semver/major Breaks existing public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[core] Can't compile with default traits disabled.
1 participant