File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ Other enhancements:
1616Bug fixes:
1717
1818* When using the ` STACK_YAML ` env var with Docker, make the path absolute.
19+ * Fix the problem of ` stack repl foo:test:bar ` failing without a project
20+ build before that. See
21+ [ #5213 ] ( https://github.com/commercialhaskell/stack/issues/5213 )
1922
2023* Fix ` stack sdist ` introducing unneded sublibrary syntax when using
2124 pvp-bounds. See
Original file line number Diff line number Diff line change @@ -183,8 +183,13 @@ ghci opts@GhciOpts{..} = do
183183 -- need is the location of main modules, not the rest.
184184 pkgs0 <- getGhciPkgInfos installMap addPkgs (fmap fst mfileTargets) pkgDescs
185185 figureOutMainFile bopts mainIsTargets localTargets pkgs0
186+ let pkgTargets pn targets =
187+ case targets of
188+ TargetAll _ -> [T. pack (packageNameString pn)]
189+ TargetComps comps -> [renderPkgComponent (pn, c) | c <- toList comps]
186190 -- Build required dependencies and setup local packages.
187- buildDepsAndInitialSteps opts (map (T. pack . packageNameString . fst ) localTargets)
191+ buildDepsAndInitialSteps opts $
192+ concatMap (\ (pn, (_, t)) -> pkgTargets pn t) localTargets
188193 targetWarnings localTargets nonLocalTargets mfileTargets
189194 -- Load the list of modules _after_ building, to catch changes in
190195 -- unlisted dependencies (#1180)
You can’t perform that action at this time.
0 commit comments