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

Distribution.Client.ProjectBuilding.UnpackedPackage

Description

This module exposes functions to build and register unpacked packages.

Mainly, unpacked packages are either: * Built and registered in-place * Built and installed

The two cases differ significantly for there to be a distinction. For instance, we only care about file monitoring and re-building when dealing with "inplace" registered packages, whereas for installed packages we don't.

Synopsis

Documentation

buildAndInstallUnpackedPackage Source #

Arguments

:: Verbosity 
-> DistDirLayout 
-> StoreDirLayout 
-> Maybe SemaphoreName

Whether to pass a semaphore to build process this is different to BuildTimeSettings because the name of the semaphore is created freshly each time.

-> BuildTimeSettings 
-> Lock 
-> Lock 
-> ElaboratedSharedConfig 
-> ElaboratedInstallPlan 
-> ElaboratedReadyPackage 
-> SymbolicPath CWD (Dir Pkg) 
-> SymbolicPath Pkg (Dir Dist) 
-> IO BuildResult 

Auxiliary definitions

buildAndRegisterUnpackedPackage Source #

Arguments

:: Verbosity 
-> DistDirLayout 
-> Maybe SemaphoreName

Whether to pass a semaphore to build process this is different to BuildTimeSettings because the name of the semaphore is created freshly each time.

-> BuildTimeSettings 
-> Lock 
-> Lock 
-> ElaboratedSharedConfig 
-> ElaboratedInstallPlan 
-> ElaboratedReadyPackage 
-> SymbolicPath CWD (Dir Pkg) 
-> SymbolicPath Pkg (Dir Dist) 
-> Maybe FilePath

The path to an initialized log file

-> (PackageBuildingPhase -> IO ()) 
-> IO () 

Structures the phases of building and registering a package amongst others (see PackageBuildingPhase). Delegates logic specific to a certain building style (notably, inplace vs install) to the delegate function that receives as an argument PackageBuildingPhase)

data PackageBuildingPhase Source #

Each unpacked package is processed in the following phases:

  • Configure phase
  • Build phase
  • Haddock phase
  • Install phase (copy + register)
  • Register phase
  • Test phase
  • Bench phase
  • Repl phase

Depending on whether we are installing the package or building it inplace, the phases will be carried out differently. For example, when installing, the test, benchmark, and repl phase are ignored.

Utilities