Turn cabal-install into a build graph orchestrator
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- haskell
- Ambito
- build-system
Direzione di ricerca
Inizia leggendo Distribution.Simple.Build.build_setupHooks e Distribution.Client.ProjectBuilding.rebuildTargets, poi esamina l’RFC collegato e i commit di implementazione per comprendere le informazioni di build ora disponibili. La prima fase è completata quando Cabal espone i passaggi di build elencati come regole separate e cabal-install può eseguire tali regole come un grafo continuando a usare ghc --make per i moduli Haskell.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
#976 and #4174 both discuss the idea of cabal-install keeping track of a per-module build graph. However, recent architectural changes in cabal-install significantly change the design constraints.
Firstly, we now have -jsem. This allows us to recover module-level compilation parallelism when invoking cabal-install with --semaphore. (We should move towards making it the default.)
The remaining enhancements from #976 are:
- Cross-package pipelining. If package
qdepends onp, we should be able to start compiling modules ofqonce all the modules inpon which it transitively depends have been compiled, instead of waiting for the entire ofpto have been built. - Improved recompilation checking. We can avoid the overhead of
ghc --makeinvocations (see #6658) and can rebuild at a finer granularity.
Secondly, HF RFC #060 and its implementation in c5f99331266a88a833a69b5766b69aaf68f24097 + 6867dd5da57194337bab0079bbe2f1c21e11662f provides cabal-install with a complete picture of what it is building (instead of opaque ./Setup build invocations which it can't peek into). This allows us to rethink the level of granularity that cabal-install is operating at: it can operate on the module level instead of the package level (with some opaque single ./Setup build nodes for legacy build-type: Custom packages).
New design
Let's look at what Distribution.Simple.Build.build_setupHooks currently does:
pre-build: generate autogenerated files (e.g. paths module), run pre-build rules.- Run pre-processors (alex, happy,...).
- Build all Haskell modules in one go with one
ghc --makeinvocation. - Build non-Haskell code (e.g. C files).
- Link.
- Install/register.
To cabal-install, this is one opaque blob today (see Distribution.Client.ProjectBuilding.rebuildTargets).
This ticket concretely suggests to make Cabal return the individual steps above as separate rules, and implement a graph-based orchestrator in cabal-install that executes rule graphs.
For the time being, we would continue to use ghc --make to build all Haskell modules in one go. Therefore this ticket is only the first phase in implementing per-module build graphs in cabal-install.
The gains we get from this first phase are minor but not insignificant:
- Finer-grained recompilation checking (e.g. can entirely avoid invoking GHC for building Haskell modules if a C file changes).
- Slightly better cross-package pipelining (e.g. we can start running preprocessors in
qbefore Haskell module dependencies ofphave been built).
This ticket is agnostic about the second phase, which concerns splitting up ghc --make invocations. We can use many individual one-shot ghc -c invocations, but this means a lot more work dealing with interface files. Or we could be more ambitious and use a persistent GHC worker where everything is kept in-memory.
- Lingua principale
- Haskell
- Stelle
- 1.8k
- Fork
- 766
- Merge medio
- 5g 21h
- PR unite (30g)
- 27
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 haskell/cabal
-
needs triage type: enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 3 giorni
-
needs triage type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
haskell/cabal#12568 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
needs triage type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
haskell/cabal#12525 · 3 commenti · 1 reazione ·
I maintainer di solito rispondono entro 3 giorni
-
Required version of `cabal-install` to build CabalForse già presa @philderbeast l’ha presa 24 giorni fa. Apertadocumentation type: discussion
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
haskell/cabal#12477 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
-
Document which are our LTS releasesForse già presa @KeuqS l’ha presa 41 giorni fa. Apertadocumentation type: discussion
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
haskell/cabal#12373 · 2 commenti ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di haskell/cabal
Issue simili
-
bug desktop
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
simplex-chat/simplex-chat#8291 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: C# programs with top-level statements fail to compileForse già presa @AsyncNigam l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
compiler-explorer/compiler-explorer#9625 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
reflex-0.10Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
commercialhaskell/stackage#8180 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenZeppelin/canton-contracts#140 ·
I maintainer di solito rispondono entro 1 giorno
-
takeInterval yields nothing, dropInterval drops nothingForse già presa @GuillaumedeVolpiano l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
composewell/streamly#3271 ·