Skip to content

Commit

Permalink
Explain why --only-download checks are there
Browse files Browse the repository at this point in the history
  • Loading branch information
fgaz committed May 4, 2021
1 parent 6896c6a commit 1b368d7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cabal-install/src/Distribution/Client/ProjectBuilding.hs
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,14 @@ rebuildTarget verbosity
sharedPackageConfig
plan rpkg@(ReadyPackage pkg)
pkgBuildStatus
-- Technically, doing the --only-download filtering only in this function is
-- not perfect. We could also prune the plan at an earlier stage, like it's
-- done with --only-dependencies. But...
-- * the benefit would be minimal (practically just avoiding to print the
-- "requires build" parts of the plan)
-- * we currently don't have easy access to the BuildStatus of packages
-- in the pruning phase
-- * we still have to check it here to avoid performing successive phases
| buildSettingOnlyDownload buildSettings = do
case pkgBuildStatus of
BuildStatusDownload ->
Expand Down

0 comments on commit 1b368d7

Please sign in to comment.