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
f43217b9
Unverified
Commit
f43217b9
authored
6 years ago
by
Alexis Williams
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #5584 from typedrat/fix-5554
Filter out executables from package-id flags
parents
a9436418
6b0271ca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cabal-install/Distribution/Client/CmdRepl.hs
+10
-2
10 additions, 2 deletions
cabal-install/Distribution/Client/CmdRepl.hs
with
10 additions
and
2 deletions
cabal-install/Distribution/Client/CmdRepl.hs
+
10
−
2
View file @
f43217b9
...
...
@@ -35,6 +35,8 @@ import Distribution.Client.ProjectConfig
import
Distribution.Client.ProjectOrchestration
import
Distribution.Client.ProjectPlanning
(
ElaboratedSharedConfig
(
..
),
ElaboratedInstallPlan
)
import
Distribution.Client.ProjectPlanning.Types
(
elabOrderExeDependencies
)
import
Distribution.Client.RebuildMonad
(
runRebuild
)
import
Distribution.Client.Setup
...
...
@@ -407,14 +409,20 @@ addDepsToProjectTarget deps pkgId ctx =
generateReplFlags
::
Bool
->
ElaboratedInstallPlan
->
OriginalComponentInfo
->
ReplFlags
generateReplFlags
includeTransitive
elaboratedPlan
OriginalComponentInfo
{
..
}
=
flags
where
exeDeps
::
[
UnitId
]
exeDeps
=
foldMap
(
InstallPlan
.
foldPlanPackage
(
const
[]
)
elabOrderExeDependencies
)
(
InstallPlan
.
dependencyClosure
elaboratedPlan
[
ociUnitId
])
deps
,
deps'
,
trans
,
trans'
::
[
UnitId
]
flags
::
ReplFlags
deps
=
installedUnitId
<$>
InstallPlan
.
directDeps
elaboratedPlan
ociUnitId
deps'
=
deps
\\
ociOriginalDeps
trans
=
installedUnitId
<$>
InstallPlan
.
dependencyClosure
elaboratedPlan
deps'
trans'
=
trans
\\
ociOriginalDeps
flags
=
(
"-package-id "
++
)
.
prettyShow
<$>
if
includeTransitive
then
trans'
else
deps'
flags
=
fmap
(
(
"-package-id "
++
)
.
prettyShow
)
.
(
\\
exeDeps
)
$
if
includeTransitive
then
trans'
else
deps'
-- | This defines what a 'TargetSelector' means for the @repl@ command.
-- It selects the 'AvailableTarget's that the 'TargetSelector' refers to,
...
...
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