Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
joehillen opened this issue Nov 10, 2022 · 1 comment
Closed

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

joehillen opened this issue Nov 10, 2022 · 1 comment
Labels

Comments

@joehillen
Copy link

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)
@abonander
Copy link
Collaborator

abonander commented Feb 4, 2023

I believe this has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants