swift-server / swift-aws-lambda-runtime

Swift implementation of AWS Lambda Runtime
Apache License 2.0
1.13k stars 102 forks source link

Make `run` return `Never` #150

Closed helje5 closed 4 years ago

helje5 commented 4 years ago

If an API method is designed to never return, it should be marked as returning Never. This way Swift will warn you if you add code after a call to such a method.

swift-server-bot commented 4 years ago

Can one of the admins verify this patch?

swift-server-bot commented 4 years ago

Can one of the admins verify this patch?

swift-server-bot commented 4 years ago

Can one of the admins verify this patch?

swift-server-bot commented 4 years ago

Can one of the admins verify this patch?

fabianfett commented 4 years ago

@swift-server-bot test this please

helje5 commented 4 years ago

Note: Other run style methods might need this treatment (if deemed appropriate).

helje5 commented 4 years ago

Note that this is API semver major. Which probably triggers the errors. I'll turn the PR into an Issue.

tomerd commented 4 years ago

thanks @helje5 we are not at 1.0 yet, so this should be fine imo

@fabianfett wdyt?

helje5 commented 4 years ago

I've created https://github.com/swift-server/swift-aws-lambda-runtime/issues/151 to track this.

fabianfett commented 4 years ago

@tomerd I think this would be a great addition and something we should get in before 1.0