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

[lambda-http-0.8.2] unresolved imports #722

Closed
aesterline opened this issue Nov 9, 2023 · 3 comments · Fixed by #723
Closed

[lambda-http-0.8.2] unresolved imports #722

aesterline opened this issue Nov 9, 2023 · 3 comments · Fixed by #723

Comments

@aesterline
Copy link
Contributor

When upgrading to lambda-http-0.8.2, I get the following error when trying to run cargo check. I do not have lambda_runtime in my Cargo.toml dependencies. I use the re-exported version of lambda_runtime in my code when it is required. (use lambda_http::lambda_runtime::{run as lambda_run, service_fn, LambdaEvent};)

error[E0432]: unresolved imports `lambda_runtime::FunctionResponse`, `lambda_runtime::MetadataPrelude`, `lambda_runtime::StreamResponse`
  --> /Users/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lambda_http-0.8.2/src/streaming.rs:10:56
   |
10 |     self, service_fn, tower, tower::ServiceExt, Error, FunctionResponse, LambdaEvent, MetadataPrelude, Service,
   |                                                        ^^^^^^^^^^^^^^^^               ^^^^^^^^^^^^^^^ no `MetadataPrelude` in the root
   |                                                        |
   |                                                        no `FunctionResponse` in the root
11 |     StreamResponse,
   |     ^^^^^^^^^^^^^^ no `StreamResponse` in the root
@calavera
Copy link
Contributor

calavera commented Nov 9, 2023

Ugh, I'm sorry about that. The latest version of lambda_http requires the latest version of lambda_runtime, but if it's not explicitly set, the code won't compile.

I have a fix for this in #723, but if you don't want to wait for it, your code should compile if you add lambda_runtime = "0.8.3" to your dependencies.

Copy link

github-actions bot commented Nov 9, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for the maintainers of this repository to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@calavera
Copy link
Contributor

calavera commented Nov 9, 2023

I've published a new version that fixes this problem: https://crates.io/crates/lambda_http/0.8.3
I've also yanked 0.8.2 to prevent future installs.

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 a pull request may close this issue.

2 participants