Open dev-ardi opened 9 months ago
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.
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