Skip to content

Commit 7564ac9

Browse files
authored
Merge pull request #5587 from tkaaad97/stack_ghci_config_flags
FIX #5434: use stack.yaml's package flags in stack ghci
2 parents c8cc7cc + 1202d1d commit 7564ac9

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

ChangeLog.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ Bug fixes:
4545
* `stack setup` will look in sandboxed directories for executables, not
4646
relying on `findExecutables. See
4747
[GHC issue 20074](https://gitlab.haskell.org/ghc/ghc/-/issues/20074)
48-
* Track changes to `setup-config` properly to avoid reconfiguring on every
49-
change. See [#5578](https://github.com/commercialhaskell/stack/issues/5578)
48+
* Track changes to `setup-config` properly to avoid reconfiguring on every change.
49+
See [#5578](https://github.com/commercialhaskell/stack/issues/5578)
50+
* `stack ghci` now uses package flags in `stack.yaml`
51+
[#5434](https://github.com/commercialhaskell/stack/issues/5434)
5052

5153

5254
## v2.7.1

src/Stack/Ghci.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,11 +644,12 @@ loadGhciPkgDesc buildOptsCLI name cabalfp target = do
644644
(cpCabalConfigOpts . ppCommon <$> M.lookup name smProject)
645645
<|>
646646
(cpCabalConfigOpts . dpCommon <$> M.lookup name smDeps)
647+
sourceMapFlags = maybe mempty (cpFlags . ppCommon) $ M.lookup name smProject
647648
config =
648649
PackageConfig
649650
{ packageConfigEnableTests = True
650651
, packageConfigEnableBenchmarks = True
651-
, packageConfigFlags = getLocalFlags buildOptsCLI name
652+
, packageConfigFlags = getLocalFlags buildOptsCLI name `M.union` sourceMapFlags
652653
, packageConfigGhcOptions = sourceMapGhcOptions
653654
, packageConfigCabalConfigOpts = sourceMapCabalConfigOpts
654655
, packageConfigCompilerVersion = compilerVersion

0 commit comments

Comments
 (0)