Skip to content

Commit 97ac6ff

Browse files
alt-romeserikd
authored andcommitted
Account for .buildinfo in repl when build-type: Configure (haskell#9440)
In `autoconfUserHooks` we were not updating the `preRepl` hook to read additional build information from /package/@.buildinfo@. Additionally updates `autoconfUserHooks` to read additional build info information for the remaining pre-hooks that are not pre-conf. Fixes haskell#9401
1 parent cdaf7c8 commit 97ac6ff

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

Cabal/src/Distribution/Simple.hs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -743,8 +743,7 @@ simpleUserHooks =
743743
--
744744
-- * 'postConf' runs @.\/configure@, if present.
745745
--
746-
-- * the pre-hooks 'preBuild', 'preClean', 'preCopy', 'preInst',
747-
-- 'preReg' and 'preUnreg' read additional build information from
746+
-- * the pre-hooks, except for pre-conf, read additional build information from
748747
-- /package/@.buildinfo@, if present.
749748
--
750749
-- Thus @configure@ can use local system information to generate
@@ -753,14 +752,17 @@ autoconfUserHooks :: UserHooks
753752
autoconfUserHooks =
754753
simpleUserHooks
755754
{ postConf = defaultPostConf
756-
, preBuild = readHookWithArgs buildVerbosity buildDistPref -- buildCabalFilePath,
755+
, preBuild = readHookWithArgs buildVerbosity buildDistPref
756+
, preRepl = readHookWithArgs replVerbosity replDistPref
757757
, preCopy = readHookWithArgs copyVerbosity copyDistPref
758758
, preClean = readHook cleanVerbosity cleanDistPref
759759
, preInst = readHook installVerbosity installDistPref
760760
, preHscolour = readHook hscolourVerbosity hscolourDistPref
761761
, preHaddock = readHookWithArgs haddockVerbosity haddockDistPref
762762
, preReg = readHook regVerbosity regDistPref
763763
, preUnreg = readHook regVerbosity regDistPref
764+
, preTest = readHookWithArgs testVerbosity testDistPref
765+
, preBench = readHookWithArgs benchmarkVerbosity benchmarkDistPref
764766
}
765767
where
766768
defaultPostConf

changelog.d/issue-9401

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
synopsis: Account for .buildinfo in repl, test, and bench
2+
packages: Cabal
3+
prs: #9440
4+
issues: #9401
5+
6+
description: {
7+
8+
Generated <project>.buildinfo is now respected in cabal repl, cabal test and cabal bench.
9+
10+
}
11+

0 commit comments

Comments
 (0)