Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Failed to build with only feature dynamodb #112

Closed
bryanburgers opened this issue Sep 21, 2022 · 0 comments · Fixed by #119
Closed

Failed to build with only feature dynamodb #112

bryanburgers opened this issue Sep 21, 2022 · 0 comments · Fixed by #119

Comments

@bryanburgers
Copy link
Contributor

In version 0.7.0 released recently, specifying only the dynamodb feature fails to build. This previously worked fine in 0.6.0.

This is reproducible with the following sequence of commands.

$ git clone https://github.com/LegNeato/aws-lambda-events
$ cd aws-lambda-events
$ git switch -d v0.7.0
$ cargo build --no-default-features --features dynamodb
error[E0432]: unresolved import `crate::event::streams`
 --> aws_lambda_events/src/dynamodb/mod.rs:2:19
  |
2 | use crate::event::streams::DynamoDbBatchItemFailure;
  |                   ^^^^^^^ could not find `streams` in `event`

Building with dynamodb and events seems to work fine.

$ cargo build --no-default-features --features dynamodb --features events

I ran into this because serde_dynamo only needs enough of aws-lambda-events to bring AttributeValue into scope.

For 0.6.0, the Cargo.toml invocation I used was

__aws_lambda_events_0_6 = { package = "aws_lambda_events", version = "0.6", default-features = false, features = ["dynamodb"], optional = true }

which fails for 0.7.0.

At this point I think I'll just use features = ["dynamodb", "events"] to support the already published 0.7.0, but I thought I'd bring it up as an issue in case you felt it needed to be addressed?

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

Successfully merging a pull request may close this issue.

1 participant