Skip to content
Snippets Groups Projects
Unverified Commit c805ff17 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub
Browse files

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 ee1e6b81)

# Conflicts:
#	Cabal/src/Distribution/Simple.hs

* Update Simple.hs

---------

Co-authored-by: default avatarRodrigo Mesquita <rodrigo.m.mesquita@gmail.com>
Co-authored-by: default avatarHécate Moonlight <Kleidukos@users.noreply.github.com>
parent f1a168aa
No related branches found
No related tags found
No related merge requests found
......@@ -576,8 +576,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
......@@ -588,14 +587,17 @@ 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
preUnreg = readHook regVerbosity regDistPref,
preTest = readHookWithArgs testVerbosity testDistPref,
preBench = readHookWithArgs benchmarkVerbosity benchmarkDistPref
}
where defaultPostConf :: Args -> ConfigFlags -> PackageDescription
-> LocalBuildInfo -> IO ()
......
synopsis: Account for .buildinfo in repl, test, and bench
packages: Cabal
prs: #9440
issues: #9401
description: {
Generated <project>.buildinfo is now respected in cabal repl, cabal test and cabal bench.
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment