Safe Haskell | None |
---|---|
Language | Haskell2010 |
Stack.Runners
Description
Utilities for running stack commands.
- withGlobalConfigAndLock :: GlobalOpts -> StackT Config IO () -> IO ()
- withConfigAndLock :: GlobalOpts -> StackT Config IO () -> IO ()
- withMiniConfigAndLock :: GlobalOpts -> StackT MiniConfig IO () -> IO ()
- withBuildConfigAndLock :: GlobalOpts -> (Maybe FileLock -> StackT EnvConfig IO ()) -> IO ()
- withBuildConfig :: GlobalOpts -> StackT EnvConfig IO () -> IO ()
- withBuildConfigExt :: GlobalOpts -> Maybe (StackT Config IO ()) -> (Maybe FileLock -> StackT EnvConfig IO ()) -> Maybe (StackT Config IO ()) -> IO ()
- loadConfigWithOpts :: GlobalOpts -> IO (Manager, LoadConfig (StackLoggingT IO))
- loadCompilerVersion :: Manager -> GlobalOpts -> LoadConfig (StackLoggingT IO) -> IO CompilerVersion
- withUserFileLock :: (MonadBaseControl IO m, MonadIO m) => GlobalOpts -> Path Abs Dir -> (Maybe FileLock -> m a) -> m a
- munlockFile :: MonadIO m => Maybe FileLock -> m ()
Documentation
withGlobalConfigAndLock :: GlobalOpts -> StackT Config IO () -> IO () Source
Loads global config, ignoring any configuration which would be loaded due to $PWD.
withConfigAndLock :: GlobalOpts -> StackT Config IO () -> IO () Source
withMiniConfigAndLock :: GlobalOpts -> StackT MiniConfig IO () -> IO () Source
withBuildConfigAndLock :: GlobalOpts -> (Maybe FileLock -> StackT EnvConfig IO ()) -> IO () Source
withBuildConfig :: GlobalOpts -> StackT EnvConfig IO () -> IO () Source
Arguments
:: GlobalOpts | |
-> Maybe (StackT Config IO ()) | Action to perform before the build. This will be run on the host OS even if Docker is enabled for builds. The build config is not available in this action, since that would require build tools to be installed on the host OS. |
-> (Maybe FileLock -> StackT EnvConfig IO ()) | Action that uses the build config. If Docker is enabled for builds, this will be run in a Docker container. |
-> Maybe (StackT Config IO ()) | Action to perform after the build. This will be run on the host OS even if Docker is enabled for builds. The build config is not available in this action, since that would require build tools to be installed on the host OS. |
-> IO () |
loadConfigWithOpts :: GlobalOpts -> IO (Manager, LoadConfig (StackLoggingT IO)) Source
Load the configuration with a manager. Convenience function used throughout this module.
loadCompilerVersion :: Manager -> GlobalOpts -> LoadConfig (StackLoggingT IO) -> IO CompilerVersion Source
withUserFileLock :: (MonadBaseControl IO m, MonadIO m) => GlobalOpts -> Path Abs Dir -> (Maybe FileLock -> m a) -> m a Source
Enforce mutual exclusion of every action running via this function, on this path, on this users account.
A lock file is created inside the given directory. Currently, stack uses locks per-snapshot. In the future, stack may refine this to an even more fine-grain locking approach.
munlockFile :: MonadIO m => Maybe FileLock -> m () Source
Unlock a lock file, if the value is Just