Brendonovich / prisma-client-rust

Type-safe database access for Rust
https://prisma.brendonovich.dev
Apache License 2.0
1.83k stars 108 forks source link

[Build from Git + prisma_client_rust_cli] Error compiling rust-postgres (tokio-postgres) #419

Closed onlycs closed 9 months ago

onlycs commented 9 months ago
error[E0599]: no method named `with_interval` found for struct `TcpKeepalive` in the current scope
  --> /home/onlycs/.cargo/git/checkouts/rust-postgres-a0ce567e7550f063/00d4815/tokio-postgres/src/keepalive.rs:17:43
   |
17 |             tcp_keepalive = tcp_keepalive.with_interval(interval);
   |                                           ^^^^^^^^^^^^^ method not found in `TcpKeepalive`

error[E0599]: no method named `with_retries` found for struct `TcpKeepalive` in the current scope
  --> /home/onlycs/.cargo/git/checkouts/rust-postgres-a0ce567e7550f063/00d4815/tokio-postgres/src/keepalive.rs:22:43
   |
22 |             tcp_keepalive = tcp_keepalive.with_retries(retries);
   |                                           ^^^^^^^^^^^^ help: there is a method with a similar name: `with_time`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `tokio-postgres` (lib) due to 2 previous errors

Fixed when I went into the checkout folder and added the all feature to socket2 in the Cargo.toml Built on latest nightly

VintageWander commented 9 months ago

This fix helped solved my issue, thank you. It seems like this error coming from https://github.com/prisma/rust-postgres. I hope they put up a fix soon

Brendonovich commented 9 months ago

cargo update should fix this