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

Write per-crate query data in .sqlx directories unconditionally #2668

Open
tamasfe opened this issue Jul 31, 2023 · 0 comments
Open

Write per-crate query data in .sqlx directories unconditionally #2668

tamasfe opened this issue Jul 31, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@tamasfe
Copy link
Contributor

tamasfe commented Jul 31, 2023

I remember this being mentioned somewhere but I cannot find the issue/PR anymore. Found it in #1598, that issue aims at a complete rework of how the macros work, this one proposes smaller changes in the current one with much less work involved.

The idea would be that macros would populate .sqlx queries for offline use unconditionally and cargo sqlx prepare would become optional for cleanup or double-checking purposes. cargo sqlx prepare can be slow-ish for large workspaces and it's easy to forget running it before a commit unless a git hook is set.

If this is implemented, I would also remove the workspace-level .sqlx directory and let each crate manage its own queries, this would somewhat complicate prepare --check though.

@tamasfe tamasfe added the enhancement New feature or request label Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant