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

Bug: Generated sink connector cannot be builded due to missing Stream::next impl #4006

Closed
EstebanBorai opened this issue May 11, 2024 · 0 comments · Fixed by #4005
Closed
Assignees
Labels
bug Something isn't working

Comments

@EstebanBorai
Copy link
Contributor

What happened

When generating a sink connector using the cdk generate subcommand,
the generated project cannot be builded due to a missing Stream::next
implementation.

Expected behavior

Generated connector can be builded out of the box.

Describe the setup

Fluvio: 0.11.8

How to reproduce it (as minimally and precisely as possible)

Steps to reproduce the behavior:

  1. cdk generate
  2. Choose sink for Which type of Connector would you like [source/sink]? prompt
  3. Build with cdk deploy start --config ./sample-config.yaml

Log output

error[E0599]: no method named `next` found for type parameter `impl ConsumerStream` in the current scope
    --> src/main.rs:10:41
     |
8    | async fn start(config: CustomConfig, mut stream: impl ConsumerStream) -> Result<()> {
     |                                                  ------------------- method `next` not found for this type parameter
9    |     println!("Starting test-badconn sink connector with {config:?}");
10   |     while let Some(Ok(record)) = stream.next().await {
     |                                         ^^^^
     |
     = help: items from traits can only be used if the trait is in scope
help: there is a method `ne` with a similar name, but with different arguments
    --> /Users/esteban/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-std-1.12.0/src/stream/stream/mod.rs:2022:5
     |
2022 | /     fn ne<S>(
2023 | |        self,
2024 | |        other: S
2025 | |     ) -> NeFuture<Self, S>
...    |
2028 | |         S: Sized + Stream,
2029 | |         <Self as Stream>::Item: PartialEq<S::Item>,
     | |___________________________________________________^
help: the following traits which provide `next` are implemented but not in scope; perhaps you want to import one of them
     |
1    + use async_std::stream::stream::StreamExt;
     |
1    + use cranelift_codegen::isa::aarch64::lower::isle::generated_code::ContextIter;
     |
1    + use cranelift_codegen::opts::generated_code::ContextIter;
     |
1    + use futures_lite::stream::StreamExt;
     |
       and 5 other candidates

For more information about this error, try `rustc --explain E0599`.
error: could not compile `test-badconn` (bin "test-badconn") due to 1 previous error
   Compiling test-badconn v0.1.0 (/Users/esteban/Desktop/test-badconn)
error[E0599]: no method named `next` found for type parameter `impl ConsumerStream` in the current scope
    --> src/main.rs:10:41
     |
8    | async fn start(config: CustomConfig, mut stream: impl ConsumerStream) -> Result<()> {
     |                                                  ------------------- method `next` not found for this type parameter
9    |     println!("Starting test-badconn sink connector with {config:?}");
10   |     while let Some(Ok(record)) = stream.next().await {
     |                                         ^^^^
     |
     = help: items from traits can only be used if the trait is in scope
help: there is a method `ne` with a similar name, but with different arguments
    --> /Users/esteban/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-std-1.12.0/src/stream/stream/mod.rs:2022:5
     |
2022 | /     fn ne<S>(
2023 | |        self,
2024 | |        other: S
2025 | |     ) -> NeFuture<Self, S>
...    |
2028 | |         S: Sized + Stream,
2029 | |         <Self as Stream>::Item: PartialEq<S::Item>,
     | |___________________________________________________^
help: the following traits which provide `next` are implemented but not in scope; perhaps you want to import one of them
     |
1    + use async_std::stream::stream::StreamExt;
     |
1    + use cranelift_codegen::isa::aarch64::lower::isle::generated_code::ContextIter;
     |
1    + use cranelift_codegen::opts::generated_code::ContextIter;
     |
1    + use futures_lite::stream::StreamExt;
     |
       and 5 other candidates

For more information about this error, try `rustc --explain E0599`.
error: could not compile `test-badconn` (bin "test-badconn") due to 1 previous error
Error:

Environment (please complete the following information):

  • OS: macOS
  • Fluvio Version 0.11.8
  • Kubernetes version: N/A
  • Minikube or other k8 version (if used): N/A

Optional Debugging:

N/A

Additional context

N/A

@EstebanBorai EstebanBorai added the bug Something isn't working label May 11, 2024
@EstebanBorai EstebanBorai linked a pull request May 11, 2024 that will close this issue
@EstebanBorai EstebanBorai self-assigned this May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant