cabal-install-3.10.1.0: The command-line interface for Cabal and Hackage.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Distribution.Client.ProjectPlanOutput

Synopsis

Plan output

writePlanExternalRepresentation :: DistDirLayout -> ElaboratedInstallPlan -> ElaboratedSharedConfig -> IO () Source #

Write out a representation of the elaborated install plan.

This is for the benefit of debugging and external tools like editors.

Project status

Several outputs rely on having a general overview of

data PostBuildProjectStatus Source #

Constructors

PostBuildProjectStatus 

Fields

  • packagesDefinitelyUpToDate :: PackageIdSet

    Packages that are known to be up to date. These were found to be up to date before the build, or they have a successful build outcome afterwards.

    This does not include any packages outside of the subset of the plan that was executed because we did not check those and so don't know for sure that they're still up to date.

  • packagesProbablyUpToDate :: PackageIdSet

    Packages that are probably still up to date (and at least not known to be out of date, and certainly not invalid). This includes packagesDefinitelyUpToDate plus packages that were up to date previously and are outside of the subset of the plan that was executed. It excludes packagesOutOfDate.

  • packagesOutOfDate :: PackageIdSet

    Packages that are known to be out of date. These are packages that were determined to be out of date before the build, and they do not have a successful build outcome afterwards.

    Note that this can sometimes include packages outside of the subset of the plan that was executed. For example suppose package A and B depend on C, and A is the target so only A and C are in the subset to be built. Now suppose C is found to have changed, then both A and B are out-of-date before the build and since B is outside the subset to be built then it will remain out of date.

    Note also that this is not the inverse of packagesDefinitelyUpToDate or packagesProbablyUpToDate. There are packages where we have no information (ones that were not in the subset of the plan that was executed).

  • packagesInvalidByChangedLibDeps :: PackageIdSet

    Packages that depend on libraries that have changed during the build (either build success or failure).

    This corresponds to the fact that libraries and dynamic executables are invalid once any of the libs they depend on change.

    This does include packages that themselves failed (i.e. it is a superset of packagesInvalidByFailedBuild). It does not include changes in dependencies on executables (i.e. build tools).

  • packagesInvalidByFailedBuild :: PackageIdSet

    Packages that themselves failed during the build (i.e. them directly not a dep).

    This corresponds to the fact that static executables are invalid in unlucky circumstances such as linking failing half way though, or data file generation failing.

    This is a subset of packagesInvalidByChangedLibDeps.

  • packagesLibDepGraph :: Graph (Node UnitId ElaboratedPlanPackage)

    A subset of the plan graph, including only dependency-on-library edges. That is, dependencies on libraries, not dependencies of libraries. This tells us all the libraries that packages link to.

    This is here as a convenience, as strictly speaking it's not status as it's just a function of the original ElaboratedInstallPlan.

  • packagesBuildLocal :: PackageIdSet

    As a convenience for intersection with any of the other PackageIdSets to select only packages that are part of the project locally (i.e. with a local source dir).

  • packagesBuildInplace :: PackageIdSet

    As a convenience for intersection with any of the other PackageIdSets to select only packages that are being built in-place within the project (i.e. not destined for the store).

  • packagesAlreadyInStore :: PackageIdSet

    As a convenience for intersection or difference with any of the other PackageIdSets to select only packages that were pre-installed or already in the store prior to the build.

createPackageEnvironment :: Verbosity -> FilePath -> ElaboratedInstallPlan -> ElaboratedSharedConfig -> PostBuildProjectStatus -> IO [(String, Maybe String)] Source #

Prepare a package environment that includes all the library dependencies for a plan.

When running cabal new-exec, we want to set things up so that the compiler can find all the right packages (and nothing else). This function is intended to do that work. It takes a location where it can write files temporarily, in case the compiler wants to learn this information via the filesystem, and returns any environment variable overrides the compiler needs.