Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
Cabal
Commits
e1699ce6
Commit
e1699ce6
authored
3 years ago
by
Hannes Siebenhandl
Committed by
Daniel Gröber (dxld)
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Always write build-info, even before building
parent
024c0601
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Cabal/src/Distribution/Simple/Build.hs
+19
-15
19 additions, 15 deletions
Cabal/src/Distribution/Simple/Build.hs
with
19 additions
and
15 deletions
Cabal/src/Distribution/Simple/Build.hs
+
19
−
15
View file @
e1699ce6
...
@@ -114,21 +114,9 @@ build pkg_descr lbi flags suffixes = do
...
@@ -114,21 +114,9 @@ build pkg_descr lbi flags suffixes = do
internalPackageDB
<-
createInternalPackageDB
verbosity
lbi
distPref
internalPackageDB
<-
createInternalPackageDB
verbosity
lbi
distPref
(
\
f
->
foldM_
f
(
installedPkgs
lbi
)
componentsToBuild
)
$
\
index
target
->
do
-- Before the actual building, dump out build-information.
let
comp
=
targetComponent
target
-- This way, if the actual compilation failed, the options have still been
clbi
=
targetCLBI
target
-- dumped.
componentInitialBuildSteps
distPref
pkg_descr
lbi
clbi
verbosity
let
bi
=
componentBuildInfo
comp
progs'
=
addInternalBuildTools
pkg_descr
lbi
bi
(
withPrograms
lbi
)
lbi'
=
lbi
{
withPrograms
=
progs'
,
withPackageDB
=
withPackageDB
lbi
++
[
internalPackageDB
],
installedPkgs
=
index
}
mb_ipi
<-
buildComponent
verbosity
(
buildNumJobs
flags
)
pkg_descr
lbi'
suffixes
comp
clbi
distPref
return
(
maybe
index
(
Index
.
insert
`
flip
`
index
)
mb_ipi
)
when
shouldDumpBuildInfo
$
do
when
shouldDumpBuildInfo
$
do
-- Changing this line might break consumers of the dumped build info.
-- Changing this line might break consumers of the dumped build info.
-- Announce changes on mailing lists!
-- Announce changes on mailing lists!
...
@@ -150,6 +138,22 @@ build pkg_descr lbi flags suffixes = do
...
@@ -150,6 +138,22 @@ build pkg_descr lbi flags suffixes = do
exists
<-
doesFileExist
(
buildInfoPref
distPref
)
exists
<-
doesFileExist
(
buildInfoPref
distPref
)
when
exists
$
removeFile
(
buildInfoPref
distPref
)
when
exists
$
removeFile
(
buildInfoPref
distPref
)
-- Now do the actual building
(
\
f
->
foldM_
f
(
installedPkgs
lbi
)
componentsToBuild
)
$
\
index
target
->
do
let
comp
=
targetComponent
target
clbi
=
targetCLBI
target
componentInitialBuildSteps
distPref
pkg_descr
lbi
clbi
verbosity
let
bi
=
componentBuildInfo
comp
progs'
=
addInternalBuildTools
pkg_descr
lbi
bi
(
withPrograms
lbi
)
lbi'
=
lbi
{
withPrograms
=
progs'
,
withPackageDB
=
withPackageDB
lbi
++
[
internalPackageDB
],
installedPkgs
=
index
}
mb_ipi
<-
buildComponent
verbosity
(
buildNumJobs
flags
)
pkg_descr
lbi'
suffixes
comp
clbi
distPref
return
(
maybe
index
(
Index
.
insert
`
flip
`
index
)
mb_ipi
)
return
()
return
()
where
where
distPref
=
fromFlag
(
buildDistPref
flags
)
distPref
=
fromFlag
(
buildDistPref
flags
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment