awslabs / aws-lambda-rust-runtime

A Rust runtime for AWS Lambda
Apache License 2.0
3.3k stars 335 forks source link

unable to compile with v0.10.0 #841

Closed sam-rusty closed 5 months ago

sam-rusty commented 6 months ago

Just updated the version and getting this error:

#[cfg(not(debug_assertions))]
{
    let app = tower::ServiceBuilder::new()
        .layer(axum_aws_lambda::LambdaLayer::default())
        .service(self.router);
    lambda_http::run(app).await.unwrap();
}
Screenshot 2024-03-12 at 7 51 38 AM

tower: 0.4.13 tower-http: 0.5.2 lambda_http = 0.10.0

calavera commented 6 months ago

Which version of axum_aws_lambda are you using? This looks similar to this other issue which was caused by Axum's updates for Hyper 1 compatibility: https://github.com/awslabs/aws-lambda-rust-runtime/issues/738

sam-rusty commented 6 months ago

its axum-aws-lambda = "0.6.0".

calavera commented 6 months ago

Read this comment, the problem seems to be chaining Axum's layers and routers: https://github.com/awslabs/aws-lambda-rust-runtime/issues/738#issuecomment-1854064038

I don't know how that works.

calavera commented 5 months ago

I'm closing this issue since it looks like it's related to how Axum chains layers and routes, as described in https://github.com/awslabs/aws-lambda-rust-runtime/issues/738#issuecomment-1854064038

github-actions[bot] commented 5 months ago

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one.