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

Missing aws-lambda feature flag definition in Cargo.toml #3643

Closed
drganjoo opened this issue May 14, 2024 · 0 comments · Fixed by #3648
Closed

Missing aws-lambda feature flag definition in Cargo.toml #3643

drganjoo opened this issue May 14, 2024 · 0 comments · Fixed by #3648
Labels
server Rust server SDK

Comments

@drganjoo
Copy link
Contributor

The generated SDK conditionally re-exports routing::LambdaHandler under the feature flag aws-lambda, but the Cargo.toml does not define such a feature.

server.rs in the generated SDK has:

pub mod routing {
    pub use ::aws_smithy_http_server::routing::IntoMakeService;
    pub use ::aws_smithy_http_server::routing::IntoMakeServiceWithConnectInfo;
    pub use ::aws_smithy_http_server::routing::Router;

    #[cfg(feature = "aws-lambda")]
    pub use ::aws_smithy_http_server::routing::LambdaHandler;
}

However, Cargo.toml in the generated SDK is currently set to:

[features]
rt-tokio = ["aws-smithy-types/rt-tokio"]
default = ["rt-tokio"]

It should be updated to include:

[features]
rt-tokio = ["aws-smithy-types/rt-tokio"]
default = ["rt-tokio"]
aws-lambda = ["aws-smithy-http-server/aws-lambda"]
@drganjoo drganjoo added the server Rust server SDK label May 14, 2024
github-merge-queue bot pushed a commit that referenced this issue Jun 20, 2024
## Motivation and Context
The generated SDK conditionally re-exports `routing::LambdaHandler`
under the feature flag aws-lambda, but the `Cargo.toml` does not define
such a feature.

## Description
Closes: #3643

## Checklist
- [x] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates

---------

Co-authored-by: Fahad Zubair <[email protected]>
Co-authored-by: david-perez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server Rust server SDK
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant