Skip to content

Commit

Permalink
Account for .buildinfo in repl when build-type: Configure
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alt-romes committed Dec 18, 2023
1 parent 993481e commit ed10567
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Cabal/src/Distribution/Simple.hs
Original file line number Diff line number Diff line change
Expand Up @@ -743,8 +743,7 @@ simpleUserHooks =
--
-- * 'postConf' runs @.\/configure@, if present.
--
-- * the pre-hooks 'preBuild', 'preClean', 'preCopy', 'preInst',
-- 'preReg' and 'preUnreg' read additional build information from
-- * the pre-hooks, except for pre-conf, read additional build information from
-- /package/@.buildinfo@, if present.
--
-- Thus @configure@ can use local system information to generate
Expand All @@ -753,14 +752,17 @@ autoconfUserHooks :: UserHooks
autoconfUserHooks =
simpleUserHooks
{ postConf = defaultPostConf
, preBuild = readHookWithArgs buildVerbosity buildDistPref -- buildCabalFilePath,
, preBuild = readHookWithArgs buildVerbosity buildDistPref
, preRepl = readHookWithArgs replVerbosity replDistPref
, preCopy = readHookWithArgs copyVerbosity copyDistPref
, preClean = readHook cleanVerbosity cleanDistPref
, preInst = readHook installVerbosity installDistPref
, preHscolour = readHook hscolourVerbosity hscolourDistPref
, preHaddock = readHookWithArgs haddockVerbosity haddockDistPref
, preReg = readHook regVerbosity regDistPref
, preUnreg = readHook regVerbosity regDistPref
, preTest = readHookWithArgs testVerbosity testDistPref
, preBench = readHookWithArgs benchmarkVerbosity benchmarkDistPref
}
where
defaultPostConf
Expand Down

0 comments on commit ed10567

Please sign in to comment.