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

Wrong proc-macro error message when prepared files are out of date in offline mode #2767

Closed
Nemo157 opened this issue Sep 20, 2023 · 0 comments · Fixed by #2769
Closed

Wrong proc-macro error message when prepared files are out of date in offline mode #2767

Nemo157 opened this issue Sep 20, 2023 · 0 comments · Fixed by #2769
Labels

Comments

@Nemo157
Copy link
Contributor

Nemo157 commented Sep 20, 2023

Bug Description

When the prepared files are out of date the error message claims the directory does not exist, not that the specific query is missing from it (also with an explicit SQLX_OFFLINE I don't think it should mention the DATABASE_URL).

error: `DATABASE_URL` must be set, or `cargo sqlx prepare` must have been run and .sqlx must exist, to use query macros

Minimal Reproduction

Edit some whitespace in a query in a project with prepared queries, run SQLX_OFFLINE=true cargo check.

Info

  • SQLx version: v0.7.1
  • SQLx features enabled: default, chrono, runtime-tokio, postgres
  • Database server and version: Postgres
  • Operating system: Linux
  • rustc --version: rustc 1.74.0-nightly (7d9bce327 2023-09-16)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant