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
Hey @dev-ardi! This is due to using the sqlx query macros that run compile-time checks against a database. I believe you can resolve this by using sqlx offline mode. Let me know how it goes, and if it works out we'll update our docs.
I experienced the same thing, although while using Actix-web. I resolved it by using the hello world example from the repo, with the shuttle-annotations in the main function kept in place. After it built, I could revert back, and it worked fine from there.
I don't run the docker systemd service by default, so it might not have been running when I first tried to run the project. I started the service soon afterwards, but I had to resort to rewriting main.rs to get the project to build again.
jonaro00
changed the title
[Bug]: Error with SQLx: Can't provision a database with shuttle
[Bug]: Can't use sqlx compile time macros
Oct 22, 2024
What happened?
Sqlx refuses to build because it can't connect to a database and shuttle refuses to provision a database because the code doesn't build!
For people experiencing this issue
My workaround is to delete all code except
and then
git reset --hard
Version
cargo-shuttle 0.35.2
Which operating system(s) are you seeing the problem on?
Linux
Which CPU architectures are you seeing the problem on?
x86_64
Relevant log output
No response
Duplicate declaration
The text was updated successfully, but these errors were encountered: