You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When doing a clean build with a freshly created sqlite database the query validation fails with error returned from database: database is locked, which is very prominent and reproducible in CI environments. I can also observe the behavior when running cargo clippy --all-targets from the command line, although sometimes the error randomly goes away with repeated invocations, sometimes it doesn't.
Create a minimal project with a main file which runs any sqlx::query!(...)
cargo clean
yes | sqlx database reset
cargo clippy --all-targets
This triggers with sqlx-cli version 0.6.0, and using sqlx = "0.6.0" in Cargo.toml`. This does not trigger with versions 0.5.9.
Also worth noting that the issue does not trigger with a plain cargo clippy invocation. Perhaps the issue is that the regular crate build and the test version are compiled in parallel which results in concurrent proc-macro expansions trying to access the database at the same time
The text was updated successfully, but these errors were encountered:
When doing a clean build with a freshly created sqlite database the query validation fails with
error returned from database: database is locked
, which is very prominent and reproducible in CI environments. I can also observe the behavior when runningcargo clippy --all-targets
from the command line, although sometimes the error randomly goes away with repeated invocations, sometimes it doesn't.Here is a gist with a minimal reproduction: https://gist.github.com/ipetkov/e6d514b3fc5518276fffd7dbbbc5cc8f
As a quick summary on how to repro:
sqlx mig add
and add an arbitrary tablesqlx::query!(...)
cargo clean
yes | sqlx database reset
cargo clippy --all-targets
This triggers with
sqlx-cli
version 0.6.0, and usingsqlx = "0.6.0" in
Cargo.toml`. This does not trigger with versions 0.5.9.Also worth noting that the issue does not trigger with a plain
cargo clippy
invocation. Perhaps the issue is that the regular crate build and the test version are compiled in parallel which results in concurrent proc-macro expansions trying to access the database at the same timeThe text was updated successfully, but these errors were encountered: