Understand relationship between `stack repl` and Cabal (the library) `repl`
@mpilgrem がすでに取り組んでいます。
2024年4月3日 から。
評価
この issue はまだ評価されていません。
説明
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)
- 主要言語
- Haskell
- スター
- 4.1k
- フォーク
- 857
- 平均マージ
- 17時間 32分
- マージ済み PR(30日)
- 5
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
commercialhaskell/stack のほかの issue
-
Build Stack against Cabal >= 3.18対応中かも @mpilgrem が 14 日前に担当しました。 オープン
commercialhaskell/stack#6976 · 担当者 1 名 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
commercialhaskell/stack#6954 ·
-
Support type-checking without compiling再び着手できるかも @mpilgrem が 135 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンcomponent: build type: enhancement
commercialhaskell/stack#6951 · リアクション 3 件 · 担当者 1 名 ·
-
Support semaphore-compat 2.0.0再び着手できるかも @mpilgrem が 158 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンcomponent: build in progress type: enhancement
commercialhaskell/stack#6934 · コメント 3 件 · 担当者 1 名 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
commercialhaskell/stack#6864 · コメント 1 件 ·
commercialhaskell/stack の issue をすべて見る
似ている issue
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
alunduil/network-arbitrary#293 ·
メンテナーはふだん 1 日以内に返信
-
area:client bug priority-low
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
bug triage
難易度 2/5 1〜3時間 初心者へのやさしさ 91/100
simplex-chat/simplex-chat#8372 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
compiler-explorer/compiler-explorer#9710 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信