Understand relationship between `stack repl` and Cabal (the library) `repl`
@mpilgrem ci sta già lavorando.
Dal 3/4/2024.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Motivation:
- @sheaf's observations here: https://github.com/haskellfoundation/tech-proposals/pull/60#issuecomment-2034340587 ...
- ... here: https://github.com/commercialhaskell/stack/issues/6542#issuecomment-2034348791 ...
- ... here: https://github.com/haskell/cabal/issues/9857#issuecomment-2034465886 ...
- ... and here: https://github.com/haskell/cabal/issues/9856#issuecomment-2034370726.
Is there a reason that Stack avoids the use of Cabal (the library) repl (from Cabal >= 2.2)?
Context:
Stack.Build.ExecutePackage.realConfigAndBuild (extracts):
case ( ee.buildOptsCLI.onlyConfigure
, ee.buildOptsCLI.initialBuildSteps && taskIsTarget task
) of
...
(_, True) | null ac.downstream || installedMapHasThisPkg -> do
initialBuildSteps cabal announce
...
where
...
initialBuildSteps cabal announce = do
announce ("initial-build-steps" <> display annSuffix)
cabal KeepTHLoading ["repl", "stack-initial-build-steps"]
Stack.GhciCmd.ghciCmd (extracts):
ghciCmd ghciOpts =
let boptsCLI = defaultBuildOptsCLI
{ ...
, initialBuildSteps = True
...
}
in withConfig YesReexec $ withEnvConfig AllowNoTargets boptsCLI $ do
bopts <- view buildOptsL
-- override env so running of tests and benchmarks is disabled
let boptsLocal = bopts
{ testOpts = bopts.testOpts { TestOpts.disableRun = True }
, benchmarkOpts =
bopts.benchmarkOpts { BenchmarkOpts.disableRun = True }
}
local (set buildOptsL boptsLocal) (ghci ghciOpts)
Stack.GhciCmd.ghci (extracts):
-- | Launch a GHCi session for the given project package targets with the given
-- options and configure it with the load paths and extensions of those targets.
ghci :: HasEnvConfig env => GhciOpts -> RIO env ()
ghci opts = do
...
-- Build required dependencies and setup project packages.
buildDepsAndInitialSteps opts $
concatMap (\(pn, (_, t)) -> pkgTargets pn t) localTargets
...
-- Finally, do the invocation of ghci
runGhci
opts
localTargets
mainFile
pkgs
(maybe [] snd mfileTargets)
(nonLocalTargets ++ addPkgs)
relevantDependencies
History:
- May 2015: https://github.com/commercialhaskell/stack/issues/130 (at that time, there were aspects of Cabal's
replthat the Stack project did not want to emulate)
- Lingua principale
- Haskell
- Stelle
- 4.1k
- Fork
- 857
- Merge medio
- 17h 32m
- PR unite (30g)
- 5
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- 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 commercialhaskell/stack
-
Build Stack against Cabal >= 3.18Forse già presa @mpilgrem l’ha presa 14 giorni fa. Aperta
commercialhaskell/stack#6976 · 1 assegnatario ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
commercialhaskell/stack#6954 ·
-
Support type-checking without compilingForse di nuovo libera @mpilgrem l’ha presa 135 giorni fa e non c’è nessuna pull request aperta. Apertacomponent: build type: enhancement
commercialhaskell/stack#6951 · 3 reazioni · 1 assegnatario ·
-
Support semaphore-compat 2.0.0Forse di nuovo libera @mpilgrem l’ha presa 158 giorni fa e non c’è nessuna pull request aperta. Apertacomponent: build in progress type: enhancement
commercialhaskell/stack#6934 · 3 commenti · 1 assegnatario ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
commercialhaskell/stack#6864 · 1 commento ·
Tutte le issue di commercialhaskell/stack
Issue simili
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
alunduil/network-arbitrary#293 ·
I maintainer di solito rispondono entro 1 giorno
-
area:client bug priority-low
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
bug triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 91/100
simplex-chat/simplex-chat#8372 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
compiler-explorer/compiler-explorer#9710 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno