| License | BSD-3-Clause |
|---|---|
| Safe Haskell | None |
| Language | GHC2024 |
Stack.Runners
Description
Utilities for running stack commands.
Instead of using Has-style classes below, the type signatures use concrete
environments to try and avoid accidentally rerunning configuration parsing. For
example, we want withConfig $ withConfig $ ... to fail.
Synopsis
- withBuildConfig :: RIO BuildConfig a -> RIO Config a
- withEnvConfig :: NeedTargets -> BuildOptsCLI -> RIO EnvConfig a -> RIO Config a
- withDefaultEnvConfig :: RIO EnvConfig a -> RIO Config a
- withConfig :: ShouldReexec -> RIO Config a -> RIO Runner a
- withGlobalProject :: RIO Runner a -> RIO Runner a
- withRunnerGlobal :: GlobalOpts -> RIO Runner a -> IO a
- data ShouldReexec
Documentation
withBuildConfig :: RIO BuildConfig a -> RIO Config a Source #
Load the build configuration, adds build-specific values to config loaded
by loadConfig. values.
Arguments
| :: NeedTargets | |
| -> BuildOptsCLI | |
| -> RIO EnvConfig a | Action that uses the build config. If Docker is enabled for builds, this will be run in a Docker container. |
| -> RIO Config a |
Upgrade a Config environment to an EnvConfig environment by performing
further parsing of project-specific configuration (like withBuildConfig)
and then setting up a build environment toolchain. This is intended to be run
inside a call to withConfig.
withDefaultEnvConfig :: RIO EnvConfig a -> RIO Config a Source #
Helper for withEnvConfig which passes in some default arguments:
- No targets are requested
- Default command line build options are assumed
withConfig :: ShouldReexec -> RIO Config a -> RIO Runner a Source #
Load the configuration. Convenience function used throughout this module.
withGlobalProject :: RIO Runner a -> RIO Runner a Source #
Ensure that no project settings are used when running withConfig.
withRunnerGlobal :: GlobalOpts -> RIO Runner a -> IO a Source #
Use the GlobalOpts to create a Runner and run the provided
action.
data ShouldReexec Source #
If the settings justify it, should we reexec inside Docker or Nix?