Skip to content

unresolved import lambda_attributes when compiling with default-features = false #259

@mikeyhew

Description

@mikeyhew

If I use this crate without any defualt features enabled, it fails to compile because something from the lambda_attributes crate is imported, even though it isn't a dependency in Cargo.toml. It should be a simple fix - just add a #[cfg(feature = "lambda-attributes")] above the import, and maybe in a few other places.

In order to avoid regressions in the future, we could update the hello-no-macro example to use the lambda crate without any default features, so that it fails to compile if this breaks again (and hopefully causes CI to fail).

To reproduce, use this in your Cargo.toml file:

lambda = { git = "https://github.com/awslabs/aws-lambda-rust-runtime", default-features = false}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions