Skip to content

sqlx-cli fails to build on 0.7-dev branch #2198

Closed

Description

@joehillen

Bug Description

The build fails forsqlx-cli on the 0.7-dev branch. It looks like GItHub Actions is not configured to run on this branch, so that's probably why this was missed.

   Compiling sqlx-core v0.6.2 (/home/joe/src/sqlx/sqlx-core)
warning: unused import: `std::ops::DerefMut`
  --> sqlx-core/src/pool/mod.rs:77:5
   |
77 | use std::ops::DerefMut;
   |     ^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

error: non-binding let on a synchronization lock
  --> sqlx-core/src/sqlite/statement/unlock_notify.rs:51:13
   |
51 |           let _ = self
   |  _____________^___^
   | |             |
   | |             this lock is not assigned to a binding and is immediately dropped
52 | |             .condvar
53 | |             .wait_while(self.mutex.lock().unwrap(), |fired| !*fired)
54 | |             .unwrap();
   | |_____________________^ this binding will immediately drop the value assigned to it
   |
   = note: `#[deny(let_underscore_lock)]` on by default
help: consider binding to an unused variable to avoid immediately dropping the value
   |
51 |         let _unused = self
   |             ~~~~~~~
help: consider immediately dropping the value
   |
51 ~         drop(self
52 |             .condvar
53 |             .wait_while(self.mutex.lock().unwrap(), |fired| !*fired)
54 ~             .unwrap());
   |

warning: `sqlx-core` (lib) generated 1 warning
error: could not compile `sqlx-core` due to previous error; 1 warning emitted
warning: build failed, waiting for other jobs to finish...
warning: `sqlx-core` (lib) generated 1 warning (1 duplicate)
error: could not compile `sqlx-core` due to previous error; 1 warning emitted

Interestingly cargo build -F runtime-* works fine on this branch. It's just the CLI that fails.

Minimal Reproduction

  1. Fresh clone
  2. git checkout 0.7-dev
  3. cargo build --manifest-path sqlx-cli/Cargo.toml --bin cargo-sqlx

Info

  • SQLx version: 4b70538
  • SQLx features enabled: defaults, but I tried several and they made no difference
  • Database server and version: SQLite 3.39.4
  • Operating system: Archlinux
  • rustc --version: rustc 1.65.0 (897e37553 2022-11-02)

Activity

  1. added 2 commits that reference this issue on Nov 10, 2022
    30cbc8c
    eb2c4d9
  2. added a commit that references this issue on Feb 2, 2023
  3. abonander commented on Feb 4, 2023

    @abonander
    Collaborator

    I believe this has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions