-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
sqlx prepare should not clean sqlx #2785
Comments
It looks like this issue is now of interest to me. I can take a look, but yes excluding |
Just noting that for our relatively large workspace,
The make command just runs:
|
Do you have a fairly large target dir (as in 10's of GBs)? |
Yep, it's quite large:
|
Cleaning that will likely drastically reduce the run time as a temporary workaround I've been meaning to dig into |
Oh yeah, nice! Did an
Thanks for the tip! |
Bug Description
The minimal_project_recompile step of
cargo sqlx prepare --workspace
always runscargo clean -p sqlx
, because it depends onsqlx-macros
(assuming themacros
feature is enabled).Surprisingly,
cargo clean -p sqlx
can take several minutes in a large project, and I don't think it is necessary sincesqlx
itself does not contain any query macros.Edit: it seems like it was always the plan to exclude
sqlx
from being cleaned: #1802 (comment)Suggestions
sqlx
inout_of_workspace_dependents
.SQLX_PREPARE_NO_CLEAN="sqlx crate1 crate2"
?Minimal Reproduction
Reproducible in any workspace where the
macros
feature is enabled forsqlx::query!
, andcargo sqlx prepare --workspace
is run.E.g. https://github.com/cycraig/sqlx_prepare_bug.
Info
["chrono", "ipnetwork", "json", "macros", "migrate", "postgres", "runtime-tokio-rustls", "uuid"]
(onlymacros
seems relevant here)rustc --version
: 1.72.0The text was updated successfully, but these errors were encountered: