| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Stack.Build.Execute
Contents
Description
Perform a build
Synopsis
- printPlan :: (HasRunner env, HasTerm env) => Plan -> RIO env ()
- preFetch :: HasEnvConfig env => Plan -> RIO env ()
- executePlan :: HasEnvConfig env => BuildOptsCLI -> BaseConfigOpts -> [LocalPackage] -> [DumpPackage] -> [DumpPackage] -> [DumpPackage] -> InstalledMap -> Map PackageName Target -> Plan -> RIO env ()
- data ExecuteEnv
- withExecuteEnv :: forall env a. HasEnvConfig env => BuildOpts -> BuildOptsCLI -> BaseConfigOpts -> [LocalPackage] -> [DumpPackage] -> [DumpPackage] -> [DumpPackage] -> Maybe Int -> (ExecuteEnv -> RIO env a) -> RIO env a
- withSingleContext :: forall env a. HasEnvConfig env => ActionContext -> ExecuteEnv -> Task -> Map PackageIdentifier GhcPkgId -> Maybe String -> (Package -> Path Abs File -> Path Abs Dir -> (KeepOutputOpen -> ExcludeTHLoading -> [String] -> RIO env ()) -> (Utf8Builder -> RIO env ()) -> OutputType -> RIO env a) -> RIO env a
- data ExcludeTHLoading
- data KeepOutputOpen
Documentation
printPlan :: (HasRunner env, HasTerm env) => Plan -> RIO env () Source #
Print a description of build plan for human consumption.
preFetch :: HasEnvConfig env => Plan -> RIO env () Source #
Fetch the packages necessary for a build, for example in combination with a dry run.
Arguments
| :: HasEnvConfig env | |
| => BuildOptsCLI | |
| -> BaseConfigOpts | |
| -> [LocalPackage] | |
| -> [DumpPackage] | global packages |
| -> [DumpPackage] | snapshot packages |
| -> [DumpPackage] | local packages |
| -> InstalledMap | |
| -> Map PackageName Target | |
| -> Plan | |
| -> RIO env () |
Perform the actual plan
Running Setup.hs
data ExecuteEnv Source #
Arguments
| :: forall env a. HasEnvConfig env | |
| => BuildOpts | |
| -> BuildOptsCLI | |
| -> BaseConfigOpts | |
| -> [LocalPackage] | |
| -> [DumpPackage] | global packages |
| -> [DumpPackage] | snapshot packages |
| -> [DumpPackage] | local packages |
| -> Maybe Int | largest package name, for nicer interleaved output |
| -> (ExecuteEnv -> RIO env a) | |
| -> RIO env a |
Execute a function that takes an ExecuteEnv.
Arguments
| :: forall env a. HasEnvConfig env | |
| => ActionContext | |
| -> ExecuteEnv | |
| -> Task | |
| -> Map PackageIdentifier GhcPkgId | All dependencies' package ids to provide to Setup.hs. |
| -> Maybe String | |
| -> (Package -> Path Abs File -> Path Abs Dir -> (KeepOutputOpen -> ExcludeTHLoading -> [String] -> RIO env ()) -> (Utf8Builder -> RIO env ()) -> OutputType -> RIO env a) | |
| -> RIO env a |
This sets up a context for executing build steps which need to run Cabal (via a compiled Setup.hs). In particular it does the following:
- Ensures the package exists in the file system, downloading if necessary.
- Opens a log file if the built output shouldn't go to stderr.
- Ensures that either a simple Setup.hs is built, or the package's custom setup is built.
- Provides the user a function with which run the Cabal process.
data ExcludeTHLoading Source #
Constructors
| ExcludeTHLoading | |
| KeepTHLoading |
data KeepOutputOpen Source #
special marker for expected failures in curator builds, using those we need to keep log handle open as build continues further even after a failure
Constructors
| KeepOpen | |
| CloseOnException |
Instances
| Eq KeepOutputOpen Source # | |
Defined in Stack.Build.Execute Methods (==) :: KeepOutputOpen -> KeepOutputOpen -> Bool # (/=) :: KeepOutputOpen -> KeepOutputOpen -> Bool # | |