-
Notifications
You must be signed in to change notification settings - Fork 361
unresolved import lambda_attributes
when compiling with default-features = false
#259
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
Comments
Thanks for reporting this, and you're right that this is an issue. More broadly, I'm unhappy with
What do you think? |
I feel like it's still useful. It's just a matter of documentation https://awslabs.github.io/aws-lambda-rust-runtime/lambda_http/#hello-world-without-macros |
I wouldn't be opposed to that. There's a lot of work involved in building the actual function for the I actually did try using it at first, but as soon as I saw the error message issue, I got rid of it. The reason I wanted to disable it with One suggestion: you could always move it out to a separate crate, and have someone else maintain it, at least for now until the error message issue is resolved. |
The other negative of having 2 pathways is the initial confusion. It takes some time to understand the difference. Should I use main or macro? What are the pro's and con's? It would be less code to maintain too if we got rid of it. |
See the docs linked above it specifically calls out when not to use it and the tradeoff of when you are using it |
I think that the primary upside of the The |
That’s absolute spot on, @davidbarsky. Having less lines gives the idea that it is so simple it might cover all the side effects. |
#282 removed the lambda attributes crate, so this issue can be closed. |
If I use this crate without any defualt features enabled, it fails to compile because something from the
lambda_attributes
crate is imported, even though it isn't a dependency in Cargo.toml. It should be a simple fix - just add a#[cfg(feature = "lambda-attributes")]
above the import, and maybe in a few other places.In order to avoid regressions in the future, we could update the hello-no-macro example to use the
lambda
crate without any default features, so that it fails to compile if this breaks again (and hopefully causes CI to fail).To reproduce, use this in your Cargo.toml file:
The text was updated successfully, but these errors were encountered: