Skip to content

Commit c805ff1

Browse files
mergify[bot]alt-romesKleidukos
authored
Account for .buildinfo in repl when build-type: Configure (backport #9440) (#9612)
* Account for .buildinfo in repl when build-type: Configure (#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 #9401 (cherry picked from commit ee1e6b8) # Conflicts: # Cabal/src/Distribution/Simple.hs * Update Simple.hs --------- Co-authored-by: Rodrigo Mesquita <[email protected]> Co-authored-by: Hécate Moonlight <[email protected]>
1 parent f1a168a commit c805ff1

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

Cabal/src/Distribution/Simple.hs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -576,8 +576,7 @@ simpleUserHooks =
576576
--
577577
-- * 'postConf' runs @.\/configure@, if present.
578578
--
579-
-- * the pre-hooks 'preBuild', 'preClean', 'preCopy', 'preInst',
580-
-- 'preReg' and 'preUnreg' read additional build information from
579+
-- * the pre-hooks, except for pre-conf, read additional build information from
581580
-- /package/@.buildinfo@, if present.
582581
--
583582
-- Thus @configure@ can use local system information to generate
@@ -588,14 +587,17 @@ autoconfUserHooks
588587
= simpleUserHooks
589588
{
590589
postConf = defaultPostConf,
591-
preBuild = readHookWithArgs buildVerbosity buildDistPref, -- buildCabalFilePath,
590+
preBuild = readHookWithArgs buildVerbosity buildDistPref,
591+
preRepl = readHookWithArgs replVerbosity replDistPref,
592592
preCopy = readHookWithArgs copyVerbosity copyDistPref,
593593
preClean = readHook cleanVerbosity cleanDistPref,
594594
preInst = readHook installVerbosity installDistPref,
595595
preHscolour = readHook hscolourVerbosity hscolourDistPref,
596596
preHaddock = readHookWithArgs haddockVerbosity haddockDistPref,
597597
preReg = readHook regVerbosity regDistPref,
598-
preUnreg = readHook regVerbosity regDistPref
598+
preUnreg = readHook regVerbosity regDistPref,
599+
preTest = readHookWithArgs testVerbosity testDistPref,
600+
preBench = readHookWithArgs benchmarkVerbosity benchmarkDistPref
599601
}
600602
where defaultPostConf :: Args -> ConfigFlags -> PackageDescription
601603
-> LocalBuildInfo -> IO ()

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)