Updated aws_lambda_events dependency#541
Conversation
calavera
left a comment
There was a problem hiding this comment.
Unfortunately, this will cause compilation errors. It's due to the QueryMap dependency. Which is pretty much my fault 😭
You can test this by creating a new project with cargo lambda new --http test-deps, and changing the lambda_http dependency to point to this code. You'll get the following errors:
error[E0308]: mismatched types
--> /home/david/src/aws-lambda-rust-runtime/lambda-http/src/request.rs:160:19
|
160 | Some((&ag.multi_value_query_string_parameters, &ag.query_string_parameters)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `query_map::QueryMap`, found struct `aws_lambda_events::query_map::QueryMap`
|
= note: expected reference `&query_map::QueryMap`
found reference `&aws_lambda_events::query_map::QueryMap`
= note: perhaps two different versions of crate `query_map` are being used?
error[E0308]: mismatched types
--> /home/david/src/aws-lambda-rust-runtime/lambda-http/src/request.rs:160:60
|
160 | Some((&ag.multi_value_query_string_parameters, &ag.query_string_parameters)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `query_map::QueryMap`, found struct `aws_lambda_events::query_map::QueryMap`
|
= note: expected reference `&query_map::QueryMap`
found reference `&aws_lambda_events::query_map::QueryMap`
= note: perhaps two different versions of crate `query_map` are being used?
error[E0308]: mismatched types
--> /home/david/src/aws-lambda-rust-runtime/lambda-http/src/request.rs:168:17
|
168 | ag.query_string_parameters
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `query_map::QueryMap`, found struct `aws_lambda_events::query_map::QueryMap`
|
= note: perhaps two different versions of crate `query_map` are being used?
error[E0308]: mismatched types
--> /home/david/src/aws-lambda-rust-runtime/lambda-http/src/request.rs:170:17
|
170 | ag.multi_value_query_string_parameters
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `query_map::QueryMap`, found struct `aws_lambda_events::query_map::QueryMap`
|
= note: perhaps two different versions of crate `query_map` are being used?
For more information about this error, try `rustc --explain E0308`.
warning: `lambda_http` (lib) generated 1 warning
error: could not compile `lambda_http` due to 4 previous errors; 1 warning emitted
warning: build failed, waiting for other jobs to finish...
| #[cfg(feature = "alb")] | ||
| pub use aws_lambda_events::alb; | ||
| #[cfg(any(feature = "apigw_rest", feature = "apigw_http", feature = "apigw_websockets"))] | ||
| pub use aws_lambda_events::apigw; |
There was a problem hiding this comment.
These reexports were only committed a couple of days ago (#542), and haven't yet been released.
|
Huh. I could've sworn I ran the tests (which also fail) on my branch before I opened this PR. I apologize for not catching that. I thought I had an easy fix for this since my PR to have But (of course), this crate uses the I got it to work with a little more massaging. |
Let's add that feature there, so this codebase doesn't have to handle that. I'm going to have to approve both PRs anyways 🤣 |
|
@dcormier I've released a new version of the events crate with the feature flag, so we should be able to remove that extra code from here now: https://crates.io/crates/aws-lambda-events/0.7.2 |
|
mmm either GitHub Actions is having issues today, or they made any change that breaks our workflows 😞 |
|
Oh, it looks like aws_lambda_events doesn't support Rust 1.58. I'm going to open a PR to update the MSRV to 1.61 to follow the convention that we have in the Rust SDK. |
Updated
aws_lambda_eventsto latest minor version.By submitting this pull request