Skip to content
Snippets Groups Projects
Commit bd177197 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Change pruneInstallPlanToTargets to take ComponentTargets

Previously it took the specification for the targets to build in terms
of PackageTarget which is a high-ish level specification of which
components to build. It is high level in the sense that it says things
like BuildDefaultComponents which still have to be elaborated into the
specific components.

This elaboration from the higher level intention of what to build into
what components to build specifically has to vary between different
commands (build, repl, run, test, bench) and it can also fail. These
features make it not a good fit to do within plan pruning. Instead it
is better to have plan pruning take the lower level specification of
what to build in terms of components and to do the conversion of high
level to low level separately. That will allow us to do it differently
for different commands and deal with failures better.

This patch does one step: it changes pruneInstallPlanToTargets from
taking [PackageTarget] to [ComponentTarget] and as an intermediate step
in refactoring it converts the existing elaboratePackageTargets code to
convert from the [PackageTarget] to [ComponentTarget] which is then used
by the calling code in ProjectOrchestration. The next step will be to
replace the elaboratePackageTargets with something more flexible and
that can handle errors better.
parent 5fbf262c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment