Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove lambda attributes #282

Merged
merged 4 commits into from
Jan 31, 2021
Merged

Remove lambda attributes #282

merged 4 commits into from
Jan 31, 2021

Conversation

coltonweaver
Copy link
Contributor

Issue #, if available:

N/A

Description of changes:

This PR removes the #[lambda] macro from this library. @davidbarsky provided the following valid reasons for why this should be done:

  • Compiler error reporting is not handled correctly using this macro, so the spans where an error occurs are undefined and point to incorrect locations.
  • Using this macro conflates warm and cold starts for Lambda functions, as this removes the ability to initialize global resources that might panic if initialized twice, such as a global logger.

Given that the alternative to using this macro is a single line addition to a main function, there is no real need to continue supporting this macro.

By submitting this pull request

  • [*] I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • [*] I confirm that I've made a best effort attempt to update all relevant documentation.

Copy link
Contributor

@bahildebrand bahildebrand left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants