Safe Haskell | None |
---|---|
Language | Haskell2010 |
Construct a Plan
for how to build
- constructPlan :: forall env m. (StackM env m, HasEnvConfig env) => MiniBuildPlan -> BaseConfigOpts -> [LocalPackage] -> Set PackageName -> [DumpPackage () () ()] -> (PackageName -> Version -> Map FlagName Bool -> [Text] -> IO Package) -> SourceMap -> InstalledMap -> Bool -> m Plan
Documentation
:: (StackM env m, HasEnvConfig env) | |
=> MiniBuildPlan | |
-> BaseConfigOpts | |
-> [LocalPackage] | |
-> Set PackageName | additional packages that must be built |
-> [DumpPackage () () ()] | locally registered |
-> (PackageName -> Version -> Map FlagName Bool -> [Text] -> IO Package) | load upstream package |
-> SourceMap | |
-> InstalledMap | |
-> Bool | |
-> m Plan |
Computes a build plan. This means figuring out which build Task
s
to take, and the interdependencies among the build Task
s. In
particular:
1) It determines which packages need to be built, based on the
transitive deps of the current targets. For local packages, this is
indicated by the lpWanted
boolean. For extra packages to build,
this comes from the extraToBuild0
argument of type Set
PackageName
. These are usually packages that have been specified on
the commandline.
2) It will only rebuild an upstream package if it isn't present in
the InstalledMap
, or if some of its dependencies have changed.
3) It will only rebuild a local package if its files are dirty or some of its dependencies have changed.