Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
0ca732ca
Commit
0ca732ca
authored
Jan 27, 2017
by
Oleg Grenrus
Committed by
GitHub
Jan 27, 2017
Browse files
Merge pull request #4268 from Ericson2314/fix-filter-exes
Fix #4266
parents
c621a78a
661db40f
Changes
1
Hide whitespace changes
Inline
Side-by-side
cabal-install/Distribution/Client/ProjectPlanning.hs
View file @
0ca732ca
...
...
@@ -1367,20 +1367,27 @@ elaborateInstallPlan verbosity platform compiler compilerprogdb pkgConfigDB
exeMap
::
Map
PackageName
(
Set
UnqualComponentName
)
exeMap
=
Map
.
fromListWith
mappend
exeKV
go
(
InstallPlan
.
Installed
_
)
=
error
"
unexpected
s
tate
"
go
(
InstallPlan
.
Installed
_
)
=
unexpected
S
tate
go
(
InstallPlan
.
PreExisting
_
)
=
True
go
(
InstallPlan
.
Configured
(
ElaboratedConfiguredPackage
{
elabPkgSourceId
=
PackageIdentifier
{
pkgName
,
..
},
elabPkgOrComp
,
..
}))
=
case
elabPkgOrComp
of
-- If we can only build the whole package or none of it, then we have
-- no choice and must build it all.
ElabPackage
_
->
True
-- If we can build specific components, lets just build the ones we
-- actually need.
ElabComponent
comp'
->
case
Ty
.
compSolverName
comp'
of
CD
.
ComponentExe
n
|
Just
set
<-
Map
.
lookup
pkgName
exeMap
->
Set
.
member
n
set
_
->
error
"unexpected state"
CD
.
ComponentExe
n
->
case
Map
.
lookup
pkgName
exeMap
of
Just
set
->
Set
.
member
n
set
-- We may get unwanted components, but they should be from
-- packages we at least depended on.
Nothing
->
unexpectedState
-- If it's not an exe component, it won't satisfy an exe dep
_
->
False
elaborateLibSolverId'
::
(
SolverId
->
[
ElaboratedPlanPackage
])
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment