-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix server handler Sendability warnings (#156)
Fix server handler Sendability warnings ### Motivation Fixes a warning emitted for each operation method in generated server code, which looked like: ``` Converting non-sendable function value to '@sendable (APIHandler) -> ((Operations.listPets.Input) async throws -> Operations.listPets.Output)' may introduce data races ``` ### Modifications Instead of passing the function itself, we now invoke it in a closure. ### Result The warning has gone away. ### Test Plan Adapted integration tests. Reviewed by: simonjbeaumont Builds: ✔︎ pull request validation (5.8) - Build finished. ✔︎ pull request validation (5.9) - Build finished. ✔︎ pull request validation (docc test) - Build finished. ✔︎ pull request validation (integration test) - Build finished. ✔︎ pull request validation (nightly) - Build finished. ✔︎ pull request validation (soundness) - Build finished. #156
- Loading branch information
Showing
2 changed files
with
16 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters