apache / apache/datafusion

Reduce Recompilation When Switching Crates

Aperta
#7,370 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Rust
Stelle
9.3k
Fork
2.4k
Merge medio
3g 11h
PR unite (30g)
360

Descrizione

### Is your feature request related to a problem or challenge?

It is fairly common to compile the various DataFusion crates separately for the purposes of improved test iteration. Unfortunately the experience of switching between crates is currently often involves recompiling huge tranches of the build tree.

This is because different dependencies set different feature flags for various dependencies, in some cases these are very low-level crates, forcing recompilation of the entire dependency tree. This is not only slow, but also is a recipe for ending up with an extremely chonky target directory

Examples of particularly painful crates with inconsistent feature sets:

* syn
* chrono
* num-traits
* tokio
* regex
* hashbrown

### Describe the solution you'd like

One possible solution is to create a workspace hack crate that forces a common set of feature flags when building crates within the workspace. There is [tooling](https://docs.rs/cargo-hakari/0.9.27/cargo_hakari/) to make this slightly less painful.

The major downsides of this are:

* Might complicate consuming DataFusion as a git dependency
* Would require a slightly different release workflow `cargo hakari publish` instead of `cargo publish`

A slightly less intrusive solution might be to try and find particularly problematic dependencies and make them workspace dependencies

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia esaminando i set di feature delle dipendenze del workspace per syn, chrono, num-traits, tokio, regex e hashbrown. Confronta un hack del workspace cargo-hakari con la definizione di dipendenze selezionate come dipendenze del workspace, quindi verifica che il passaggio tra i crate DataFusion eviti una ricompilazione ampia senza compromettere il consumo tramite git o il workflow di release.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust
Ambito
build-system
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
28/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.