tonic
tonic copied to clipboard
Failed to compile the generated file
Bug Report
Failed to compile the generated file, as futures_core is missed:
#11 18.01 Compiling tonic v0.10.2
#11 18.83 error[E0433]: failed to resolve: use of undeclared crate or module `futures_core`
#11 18.83 --> /usr/src/flame/target/release/build/rpc-fca243659f3204a8/out/flame.rs:624:31
#11 18.83 |
#11 18.83 624 | type WatchTaskStream: futures_core::Stream<
#11 18.83 | ^^^^^^^^^^^^ use of undeclared crate or module `futures_core`
#11 18.83
#11 18.83 For more information about this error, try `rustc --explain E0433`.
#11 18.83 error: could not compile `rpc` (lib) due to previous error
#11 18.83 warning: build failed, waiting for other jobs to finish...
#11 20.73 error: failed to compile `flame-session-manager v0.3.0 (/usr/src/flame/session_manager)`, intermediate artifacts can be found at `/usr/src/flame/target`
#11 ERROR: process "/bin/sh -c cargo install --path ./session_manager" did not complete successfully: exit code: 101
------
> [builder 5/5] RUN cargo install --path ./session_manager:
18.83 error[E0433]: failed to resolve: use of undeclared crate or module `futures_core`
18.83 --> /usr/src/flame/target/release/build/rpc-fca243659f3204a8/out/flame.rs:624:31
18.83 |
18.83 624 | type WatchTaskStream: futures_core::Stream<
18.83 | ^^^^^^^^^^^^ use of undeclared crate or module `futures_core`
18.83
18.83 For more information about this error, try `rustc --explain E0433`.
18.83 error: could not compile `rpc` (lib) due to previous error
18.83 warning: build failed, waiting for other jobs to finish...
20.73 error: failed to compile `flame-session-manager v0.3.0 (/usr/src/flame/session_manager)`, intermediate artifacts can be found at `/usr/src/flame/target`
References:
- build.rs: https://github.com/xflops/flame/blob/main/rpc/build.rs
- protos: https://github.com/xflops/flame/tree/main/rpc/protos
Version
$ cargo tree | grep tonic
│ └── tonic v0.10.2
│ └── tonic-build v0.8.4
└── tonic v0.10.2 (*)
└── tonic v0.10.2 (*)
└── tonic-build v0.8.4 (*)
├── tonic v0.10.2 (*)
├── tonic v0.10.2 (*)
└── tonic v0.10.2 (*)
└── tonic v0.10.2 (*)
└── tonic v0.10.2 (*)
Platform
Linux swx-forge04 5.15.0-86-generic #96-Ubuntu SMP Wed Sep 20 08:23:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Crates
Description
I'm having the same issue :(
I resolved this issue by align the version of tonic and tonic-build.