Skip to content

direct build errorΒ #3114

Description

@JL710

Description

When I add the newest version rc 41 to my project I get an direct compile time error.

Steps to Reproduce

Add the dependency to the project

sea-orm = { version = "2.0.0-rc.41", features = [
    "sqlx-sqlite",
    "runtime-tokio-rustls",
    "entity-registry",
    "schema-sync",
] }

Run cargo build.

Expected Behavior

I would expect a working compilation.

Actual Behavior

I get this error:

$ cargo build                                                                                                                                                                                                                       101 ↡
   Compiling sea-orm v2.0.0-rc.41
error[E0053]: method `query_all` has an incompatible type for trait
  --> /home/jan/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sea-orm-2.0.0-rc.41/src/database/sea_schema_shim.rs:10:1
   |
10 | #[async_trait::async_trait(?Send)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait `futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>> + std::marker::Send`, found trait `futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>>`
   |
   = note: expected signature `fn(&'life0 db_connection::DatabaseConnection, sea_query::SelectStatement) -> Pin<Box<(dyn futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>> + std::marker::Send + 'async_trait)>>`
              found signature `fn(&'life0 db_connection::DatabaseConnection, sea_query::SelectStatement) -> Pin<Box<(dyn futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>> + 'async_trait)>>`

error[E0053]: method `query_all_raw` has an incompatible type for trait
  --> /home/jan/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sea-orm-2.0.0-rc.41/src/database/sea_schema_shim.rs:10:1
   |
10 | #[async_trait::async_trait(?Send)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait `futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>> + std::marker::Send`, found trait `futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>>`
   |
   = note: expected signature `fn(&'life0 db_connection::DatabaseConnection, std::string::String) -> Pin<Box<(dyn futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>> + std::marker::Send + 'async_trait)>>`
              found signature `fn(&'life0 db_connection::DatabaseConnection, std::string::String) -> Pin<Box<(dyn futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>> + 'async_trait)>>`

error[E0053]: method `query_all` has an incompatible type for trait
  --> /home/jan/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sea-orm-2.0.0-rc.41/src/database/sea_schema_shim.rs:27:1
   |
27 | #[async_trait::async_trait(?Send)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait `futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>> + std::marker::Send`, found trait `futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>>`
   |
   = note: expected signature `fn(&'life0 database::transaction::DatabaseTransaction, sea_query::SelectStatement) -> Pin<Box<(dyn futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>> + std::marker::Send + 'async_trait)>>`
              found signature `fn(&'life0 database::transaction::DatabaseTransaction, sea_query::SelectStatement) -> Pin<Box<(dyn futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>> + 'async_trait)>>`

error[E0053]: method `query_all_raw` has an incompatible type for trait
  --> /home/jan/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sea-orm-2.0.0-rc.41/src/database/sea_schema_shim.rs:27:1
   |
27 | #[async_trait::async_trait(?Send)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait `futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>> + std::marker::Send`, found trait `futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>>`
   |
   = note: expected signature `fn(&'life0 database::transaction::DatabaseTransaction, std::string::String) -> Pin<Box<(dyn futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>> + std::marker::Send + 'async_trait)>>`
              found signature `fn(&'life0 database::transaction::DatabaseTransaction, std::string::String) -> Pin<Box<(dyn futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>> + 'async_trait)>>`

error[E0053]: method `query_all` has an incompatible type for trait
  --> /home/jan/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sea-orm-2.0.0-rc.41/src/database/sea_schema_shim.rs:44:1
   |
44 | #[async_trait::async_trait(?Send)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait `futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>> + std::marker::Send`, found trait `futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>>`
   |
   = note: expected signature `fn(&'life0 database::executor::DatabaseExecutor<'_>, sea_query::SelectStatement) -> Pin<Box<(dyn futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>> + std::marker::Send + 'async_trait)>>`
              found signature `fn(&'life0 database::executor::DatabaseExecutor<'_>, sea_query::SelectStatement) -> Pin<Box<(dyn futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>> + 'async_trait)>>`

error[E0053]: method `query_all_raw` has an incompatible type for trait
  --> /home/jan/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sea-orm-2.0.0-rc.41/src/database/sea_schema_shim.rs:44:1
   |
44 | #[async_trait::async_trait(?Send)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait `futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>> + std::marker::Send`, found trait `futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>>`
   |
   = note: expected signature `fn(&'life0 database::executor::DatabaseExecutor<'_>, std::string::String) -> Pin<Box<(dyn futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>> + std::marker::Send + 'async_trait)>>`
              found signature `fn(&'life0 database::executor::DatabaseExecutor<'_>, std::string::String) -> Pin<Box<(dyn futures_util::Future<Output = Result<Vec<SqlxRow>, sqlx::Error>> + 'async_trait)>>`

For more information about this error, try `rustc --explain E0053`.
error: could not compile `sea-orm` (lib) due to 6 previous errors

Reproduces How Often

every compile

Versions

$ cargo tree | grep sea-                                                                                                                                                                                                            101 ↡
└── sea-orm v2.0.0-rc.41
    β”œβ”€β”€ sea-orm-macros v2.0.0-rc.41 (proc-macro)
    β”‚   β”œβ”€β”€ sea-bae v0.2.1 (proc-macro)
    β”œβ”€β”€ sea-query v1.0.1
    β”‚   β”œβ”€β”€ sea-query-derive v1.0.0 (proc-macro)
    β”œβ”€β”€ sea-query-sqlx v0.9.1
    β”‚   β”œβ”€β”€ sea-query v1.0.1 (*)
    β”œβ”€β”€ sea-schema v0.18.1
    β”‚   β”œβ”€β”€ sea-query v1.0.1 (*)
    β”‚   β”œβ”€β”€ sea-query-sqlx v0.9.1 (*)
    β”‚   β”œβ”€β”€ sea-schema-derive v0.3.0 (proc-macro)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions