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

Cargo build failed due to unresolved import http_body::combinators #305

Closed
neara opened this issue Nov 22, 2021 · 6 comments
Closed

Cargo build failed due to unresolved import http_body::combinators #305

neara opened this issue Nov 22, 2021 · 6 comments
Labels
bug This issue is a bug.

Comments

@neara
Copy link

neara commented Nov 22, 2021

Bug Report

Version

In Cargo.toml:

aws-config = "0.0.25-alpha"
aws-sdk-cloudfront = "0.0.25-alpha"

Cargo tree:

❯ cargo tree | grep aws-sdk-
│   ├── aws-sdk-sts v0.0.25-alpha
├── aws-sdk-cloudfront v0.0.25-alpha

Platform

Darwin 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64

Description

In an existing project, I added aws-config and aws-sdk-cloudfront.
Run cargo build -> project is not building anymore with error:

❯ cargo build
   Compiling aws-smithy-http v0.28.0-alpha
error[E0432]: unresolved import `http_body::combinators`
  --> /Users/janedoe/.cargo/registry/src/github.com-1ecc6299db9ec823/aws-smithy-http-0.28.0-alpha/src/byte_stream.rs:98:16
   |
98 | use http_body::combinators::BoxBody;
   |                ^^^^^^^^^^^ could not find `combinators` in `http_body`

error[E0433]: failed to resolve: could not find `combinators` in `http_body`
  --> /Users/janedoe/.cargo/registry/src/github.com-1ecc6299db9ec823/aws-smithy-http-0.28.0-alpha/src/body.rs:46:27
   |
46 | type BoxBody = http_body::combinators::BoxBody<Bytes, Error>;
   |                           ^^^^^^^^^^^ could not find `combinators` in `http_body`

Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `aws-smithy-http` due to 2 previous errors
@neara neara added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 22, 2021
@rcoh
Copy link
Contributor

rcoh commented Nov 22, 2021

can you please include http-body (or ideally a full) cargo tree output?

@rcoh
Copy link
Contributor

rcoh commented Nov 22, 2021

seems like our http-body version is too low (combinators was added in a minor version. smithy-rs#883 fixes)

@rcoh rcoh removed the needs-triage This issue or PR still needs to be triaged. label Nov 22, 2021
@rcoh rcoh added this to Coming Soon (slated for inclusion in next release) in SDK for Rust Public Roadmap Nov 22, 2021
@neara
Copy link
Author

neara commented Nov 22, 2021

can you please include http-body (or ideally a full) cargo tree output?

❯ cargo tree | grep http-body
│   ├── http-body v0.4.0
│   │   ├── http-body v0.4.0 (*)

@rcoh
Copy link
Contributor

rcoh commented Nov 22, 2021

In the meantime, you can fix this by adding an explicit dependency on http-body = 0.4.4 or by running cargo update

@neara
Copy link
Author

neara commented Nov 22, 2021

Excellent, thanks 🙏🏻 Cargo build is work now.

@neara neara changed the title Cargo build faild due to unresolved import http_body::combinators Cargo build failed due to unresolved import http_body::combinators Nov 23, 2021
@rcoh rcoh closed this as completed Nov 24, 2021
SDK for Rust Public Roadmap automation moved this from Coming Soon (slated for inclusion in next release) to Just Shipped Nov 24, 2021
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

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.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
No open projects
Development

No branches or pull requests

2 participants