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
env::var("CARGO_MANIFEST_DIR").map_err(|_| "`CARGO_MANIFEST_DIR` must be set")?;
which is where we look for .env.
I've been told the working dir that proc macros are executed in is always the workspace root, but assuming that is always the case isn't really any better than requiring these env vars to be set.
We need some way to know the directory to search in for sqlx-data.json (or .sqlx/ later on) and .env. Any suggestions?
It's not guaranteed that Rust projects are compiled with cargo, so it would probably good to replace this
.expect()
with a fallback:sqlx/sqlx-macros/src/query/mod.rs
Line 33 in af7f259
CC rust-lang/rust-analyzer/issues/7462
The text was updated successfully, but these errors were encountered: