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
8cd99d8f
Commit
8cd99d8f
authored
8 years ago
by
bardur.arantsson
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #4086 from ezyang/pr/T4081
Improve error output when package fails to build.
parents
915ca233
da9c0526
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cabal-install/Distribution/Client/ProjectOrchestration.hs
+6
-6
6 additions, 6 deletions
cabal-install/Distribution/Client/ProjectOrchestration.hs
cabal-install/Distribution/Client/ProjectPlanning/Types.hs
+31
-1
31 additions, 1 deletion
cabal-install/Distribution/Client/ProjectPlanning/Types.hs
with
37 additions
and
7 deletions
cabal-install/Distribution/Client/ProjectOrchestration.hs
+
6
−
6
View file @
8cd99d8f
...
...
@@ -751,7 +751,7 @@ dieOnBuildFailures verbosity plan buildOutcomes
++
" because it depends on "
++
display
depid
++
" which itself failed to build"
where
pkgstr
=
display
(
packageId
pkg
)
pkgstr
=
elabConfiguredName
verbosity
pkg
++
if
mentionDepOf
then
renderDependencyOf
(
installedUnitId
pkg
)
else
""
...
...
@@ -765,11 +765,11 @@ dieOnBuildFailures verbosity plan buildOutcomes
renderDependencyOf
pkgid
=
case
ultimateDeps
pkgid
of
[]
->
""
(
p1
:
[]
)
->
" (which is required by "
++
display
(
p
ackageName
p1
)
++
")"
(
p1
:
p2
:
[]
)
->
" (which is required by "
++
display
(
p
ackageName
p1
)
++
" and "
++
display
(
p
ackageName
p2
)
++
")"
(
p1
:
p2
:
_
)
->
" (which is required by "
++
display
(
p
ackageName
p1
)
++
", "
++
display
(
p
ackageName
p2
)
(
p1
:
[]
)
->
" (which is required by "
++
elabPlanP
ackageName
verbosity
p1
++
")"
(
p1
:
p2
:
[]
)
->
" (which is required by "
++
elabPlanP
ackageName
verbosity
p1
++
" and "
++
elabPlanP
ackageName
verbosity
p2
++
")"
(
p1
:
p2
:
_
)
->
" (which is required by "
++
elabPlanP
ackageName
verbosity
p1
++
", "
++
elabPlanP
ackageName
verbosity
p2
++
" and others)"
showException
e
=
case
fromException
e
of
...
...
This diff is collapsed.
Click to expand it.
cabal-install/Distribution/Client/ProjectPlanning/Types.hs
+
31
−
1
View file @
8cd99d8f
...
...
@@ -22,6 +22,9 @@ module Distribution.Client.ProjectPlanning.Types (
elabSetupDependencies
,
elabPkgConfigDependencies
,
elabPlanPackageName
,
elabConfiguredName
,
ElaboratedPackageOrComponent
(
..
),
ElaboratedComponent
(
..
),
ElaboratedPackage
(
..
),
...
...
@@ -46,7 +49,7 @@ import Distribution.Client.PackageHash
import
Distribution.Client.Types
import
Distribution.Client.InstallPlan
(
GenericInstallPlan
,
GenericPlanPackage
)
(
GenericInstallPlan
,
GenericPlanPackage
(
..
)
)
import
Distribution.Client.SolverInstallPlan
(
SolverInstallPlan
)
import
Distribution.Client.DistDirLayout
...
...
@@ -54,6 +57,8 @@ import Distribution.Client.DistDirLayout
import
Distribution.Backpack
import
Distribution.Backpack.ModuleShape
import
Distribution.Verbosity
import
Distribution.Text
import
Distribution.Types.ComponentRequestedSpec
import
Distribution.Package
hiding
(
InstalledPackageId
,
installedPackageId
)
...
...
@@ -100,6 +105,16 @@ type ElaboratedPlanPackage
=
GenericPlanPackage
InstalledPackageInfo
ElaboratedConfiguredPackage
-- | User-friendly display string for an 'ElaboratedPlanPackage'.
elabPlanPackageName
::
Verbosity
->
ElaboratedPlanPackage
->
String
elabPlanPackageName
verbosity
(
PreExisting
ipkg
)
|
verbosity
<=
normal
=
display
(
packageName
ipkg
)
|
otherwise
=
display
(
installedUnitId
ipkg
)
elabPlanPackageName
verbosity
(
Configured
elab
)
=
elabConfiguredName
verbosity
elab
elabPlanPackageName
verbosity
(
Installed
elab
)
=
elabConfiguredName
verbosity
elab
--TODO: [code cleanup] decide if we really need this, there's not much in it, and in principle
-- even platform and compiler could be different if we're building things
-- like a server + client with ghc + ghcjs
...
...
@@ -290,6 +305,21 @@ data ElaboratedPackageOrComponent
instance
Binary
ElaboratedPackageOrComponent
-- | A user-friendly descriptor for an 'ElaboratedConfiguredPackage'.
elabConfiguredName
::
Verbosity
->
ElaboratedConfiguredPackage
->
String
elabConfiguredName
verbosity
elab
|
verbosity
<=
normal
=
(
case
elabPkgOrComp
elab
of
ElabPackage
_
->
""
ElabComponent
comp
->
case
compComponentName
comp
of
Nothing
->
"setup from "
Just
CLibName
->
""
Just
cname
->
display
cname
++
" from "
)
++
display
(
packageId
elab
)
|
otherwise
=
display
(
elabUnitId
elab
)
elabDistDirParams
::
ElaboratedSharedConfig
->
ElaboratedConfiguredPackage
->
DistDirParams
elabDistDirParams
shared
elab
=
DistDirParams
{
distParamUnitId
=
installedUnitId
elab
,
...
...
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