+
Skip to content

Sqlx0.8.4 breaks sea-orm #2561

@satyamjay-iitd

Description

@satyamjay-iitd

Description

sqlx-0.8.4 breaks the compilation. We get this error:-

error[E0061]: this function takes 2 arguments but 1 argument was supplied
  --> /home/satyam/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sea-orm-1.1.9/src/database/transaction.rs:57:17
   |
57 |                 <sqlx::Postgres as sqlx::Database>::TransactionManager::begin(c)
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^--- argument #2 of type `std::option::Option<Cow<'static, str>>` is missing
   |
note: associated function defined here
  --> /home/satyam/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-core-0.8.4/src/transaction.rs:25:8
   |
25 |     fn begin<'conn>(
   |        ^^^^^
help: provide the argument
   |
57 |                 <sqlx::Postgres as sqlx::Database>::TransactionManager::begin(c, /* std::option::Option<Cow<'static, str>> */)
   |                                  

They have changed their TransactionManager::begin interface in 0.8.4 release.

Steps to Reproduce

  1. cargo init
  2. Add sea-orm = { version = "1.1.9", features = [ "sqlx-postgres", "runtime-tokio-rustls", "macros" ] } in the dependency
  3. cargo build

Expected Behavior

Successful Compilation

Actual Behavior

Compilation Error

Reproduces How Often

Always

Workarounds

Currently the workaround is to pin the sqlx-core version to '0.8.3' in the user's project.

Reproducible Example

Versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载