stack- The Haskell Tool Stack

Safe HaskellNone




Construct a Plan for how to build



constructPlan Source #


:: HasEnvConfig env 
=> LoadedSnapshot 
-> BaseConfigOpts 
-> [LocalPackage] 
-> Set PackageName

additional packages that must be built

-> [DumpPackage () () ()]

locally registered

-> (PackageLocationIndex FilePath -> Map FlagName Bool -> [Text] -> RIO EnvConfig Package)

load upstream package

-> SourceMap 
-> InstalledMap 
-> Bool 
-> RIO env Plan 

Computes a build plan. This means figuring out which build Tasks to take, and the interdependencies among the build Tasks. 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.

Orphan instances