Workspace-level `sqlx.toml`
I maintainer di solito rispondono entro 4 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 32/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Ambito
- databases, developer-experience, tooling
Direzione di ricerca
This is a design request for optional workspace-level sqlx.toml inheritance (opt-in from a crate sqlx.toml to a parent file), not a one-file patch. Start from how sqlx currently discovers and loads sqlx.toml relative to CARGO_MANIFEST_DIR, then decide merge vs override for keys like type-overrides and DATABASE_URL. Done means documented opt-in that works in a workspace checkout without breaking published crates that only have a per-crate file.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I have found these related issues/pull requests
No prior discussion that I could find.
Description
In a larger application it's common to break it up into multiple crates, which may involve different crates using sqlx for different parts of the database. These crates may share a lot of common configuration, such as preferred-crates or type-overrides.
Currently it appears to be possible to have a fully shared configuration via symlinking, which I do think satisfies my usecase for now, but could maybe be mentioned in the docs. That also handles publishing outside the workspace correctly: the symlink gets turned into a file copy in the tarball by cargo package. But it seems likely that there are cases where you want to share some but not all config, such as the different-DATABASE_URL cases but where you might expect all databases to be running a set of extensions. For an unpublished application that is designed to only compile as part of the workspace as a whole it would be possible for it to rely on reading files outside the CARGO_MANIFEST_DIR.
Prefered solution
Probably some explicit opt-in in the per-crate sqlx.toml telling it to read ../sqlx.toml that makes it clear this is slightly outside the bounds of what Cargo truly supports and will only work when building from the repository.
Is this a breaking change? Why or why not?
No, it would be a new functionality.
- Lingua principale
- Rust
- Stelle
- 17.5k
- Fork
- 1.7k
- Merge medio
- 1g 17h
- PR unite (30g)
- 7
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di transact-rs/sqlx
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
transact-rs/sqlx#4466 ·
I maintainer di solito rispondono entro 4 giorni
-
MySQL: ENUM and SET columns with a binary collation are named BINARY or CHARForse già presa @CodeMasterXZT l’ha presa 9 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
transact-rs/sqlx#4453 ·
I maintainer di solito rispondono entro 4 giorni
-
Postgres text arrays: a quoted "NULL" element is decoded as SQL NULLForse già presa @MinJaeRun l’ha presa 6 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
transact-rs/sqlx#4452 ·
I maintainer di solito rispondono entro 4 giorni
-
Fetch stream ends after first error using query macrosForse già presa @barry3406 l’ha presa 206 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
transact-rs/sqlx#4126 · 1 commento ·
I maintainer di solito rispondono entro 4 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
transact-rs/sqlx#3963 · 2 commenti ·
I maintainer di solito rispondono entro 4 giorni
Tutte le issue di transact-rs/sqlx
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
longbridge/nsh#804 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
devex good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
calcit-lang/calcit#2538 ·
I maintainer di solito rispondono entro 1 giorno