Commit ac72b521 authored by refold's avatar refold Committed by tibbe

Remove the 'sandbox-*' commands.

Preparation for merging sandbox commands with their normal counterparts.
parent b89d8949
...@@ -8,12 +8,11 @@ ...@@ -8,12 +8,11 @@
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
module Distribution.Client.Index ( module Distribution.Client.Index (
index,
createEmpty, createEmpty,
addBuildTreeRefs, addBuildTreeRefs,
removeBuildTreeRefs, removeBuildTreeRefs,
listBuildTreeRefs, listBuildTreeRefs,
validateIndexPath,
defaultIndexFileName defaultIndexFileName
) where ) where
...@@ -21,14 +20,12 @@ module Distribution.Client.Index ( ...@@ -21,14 +20,12 @@ module Distribution.Client.Index (
import qualified Distribution.Client.Tar as Tar import qualified Distribution.Client.Tar as Tar
import Distribution.Client.IndexUtils ( getSourcePackages ) import Distribution.Client.IndexUtils ( getSourcePackages )
import Distribution.Client.PackageIndex ( allPackages ) import Distribution.Client.PackageIndex ( allPackages )
import Distribution.Client.Setup ( IndexFlags(..) )
import Distribution.Client.Types ( Repo(..), LocalRepo(..) import Distribution.Client.Types ( Repo(..), LocalRepo(..)
, SourcePackageDb(..) , SourcePackageDb(..)
, SourcePackage(..), PackageLocation(..) ) , SourcePackage(..), PackageLocation(..) )
import Distribution.Client.Utils ( byteStringToFilePath, filePathToByteString import Distribution.Client.Utils ( byteStringToFilePath, filePathToByteString
, makeAbsoluteToCwd ) , makeAbsoluteToCwd )
import Distribution.Simple.Setup ( fromFlagOrDefault )
import Distribution.Simple.Utils ( die, debug, info, findPackageDesc ) import Distribution.Simple.Utils ( die, debug, info, findPackageDesc )
import Distribution.Verbosity ( Verbosity ) import Distribution.Verbosity ( Verbosity )
...@@ -52,34 +49,6 @@ newtype BuildTreeRef = BuildTreeRef { ...@@ -52,34 +49,6 @@ newtype BuildTreeRef = BuildTreeRef {
defaultIndexFileName :: FilePath defaultIndexFileName :: FilePath
defaultIndexFileName = "00-index.tar" defaultIndexFileName = "00-index.tar"
-- | Entry point for the 'cabal index' command.
index :: Verbosity -> IndexFlags -> FilePath -> IO ()
index verbosity indexFlags path' = do
let runInit = fromFlagOrDefault False (indexInit indexFlags)
let refsToAdd = indexLinkSource indexFlags
let runLinkSource = not . null $ refsToAdd
let refsToRemove = indexRemoveSource indexFlags
let runRemoveSource = not . null $ refsToRemove
let runList = fromFlagOrDefault False (indexList indexFlags)
unless (or [runInit, runLinkSource, runRemoveSource, runList]) $
die "no arguments passed to the 'index' command"
path <- validateIndexPath path'
when runInit $
createEmpty verbosity path
when runLinkSource $
addBuildTreeRefs verbosity path refsToAdd
when runRemoveSource $
removeBuildTreeRefs verbosity path refsToRemove
when runList $ do
refs <- listBuildTreeRefs verbosity path
mapM_ putStrLn refs
-- | Given a path, ensure that it refers to a local build tree. -- | Given a path, ensure that it refers to a local build tree.
buildTreeRefFromPath :: FilePath -> IO (Maybe BuildTreeRef) buildTreeRefFromPath :: FilePath -> IO (Maybe BuildTreeRef)
buildTreeRefFromPath dir = do buildTreeRefFromPath dir = do
......
...@@ -11,60 +11,35 @@ module Distribution.Client.Sandbox ( ...@@ -11,60 +11,35 @@ module Distribution.Client.Sandbox (
sandboxInit, sandboxInit,
sandboxDelete, sandboxDelete,
sandboxAddSource, sandboxAddSource,
sandboxConfigure,
sandboxBuild,
sandboxInstall,
dumpPackageEnvironment, dumpPackageEnvironment,
withSandboxBinDirOnSearchPath withSandboxBinDirOnSearchPath
) where ) where
import Distribution.Client.Setup import Distribution.Client.Setup
( SandboxFlags(..), ConfigFlags(..), ConfigExFlags(..), GlobalFlags(..) ( SandboxFlags(..), ConfigFlags(..), GlobalFlags(..)
, InstallFlags(..), globalRepos , defaultSandboxLocation )
, defaultInstallFlags, defaultConfigExFlags, defaultSandboxLocation
, installCommand )
import Distribution.Client.Config ( SavedConfig(..), loadConfig ) import Distribution.Client.Config ( SavedConfig(..), loadConfig )
import Distribution.Client.Configure ( configure )
import Distribution.Client.Install ( makeInstallContext
, makeInstallPlan
, processInstallPlan
, pruneInstallPlan
, InstallArgs )
import Distribution.Client.PackageEnvironment import Distribution.Client.PackageEnvironment
( PackageEnvironment(..), IncludeComments(..) ( PackageEnvironment(..), IncludeComments(..)
, createPackageEnvironment, tryLoadPackageEnvironment , createPackageEnvironment, tryLoadPackageEnvironment
, commentPackageEnvironment , commentPackageEnvironment
, showPackageEnvironmentWithComments , showPackageEnvironmentWithComments
, setPackageDB
, sandboxPackageEnvironmentFile ) , sandboxPackageEnvironmentFile )
import Distribution.Client.SetupWrapper import Distribution.Simple.Compiler ( Compiler, PackageDB(..) )
( setupWrapper, SetupScriptOptions(..), defaultSetupScriptOptions ) import Distribution.Simple.Configure ( configCompilerAux )
import Distribution.Client.Targets ( readUserTargets import Distribution.Simple.Program ( ProgramConfiguration )
, resolveUserTargets import Distribution.Simple.Setup ( Flag(..)
, UserTarget(..) ) , fromFlagOrDefault )
import Distribution.Client.Types ( SourcePackageDb(packageIndex) )
import Distribution.Client.Dependency.Types ( foldProgress )
import Distribution.Simple.Compiler ( Compiler
, PackageDB(..), PackageDBStack )
import Distribution.Simple.Configure ( configCompilerAux
, interpretPackageDbFlags )
import Distribution.Simple.Program ( ProgramConfiguration
, defaultProgramConfiguration )
import Distribution.Simple.Setup ( Flag(..), toFlag, fromFlag
, BuildFlags(..), HaddockFlags(..)
, buildCommand, fromFlagOrDefault )
import Distribution.Simple.Utils ( die, debug, notice, info import Distribution.Simple.Utils ( die, debug, notice, info
, debugNoWrap, intercalate , intercalate
, createDirectoryIfMissingVerbose ) , createDirectoryIfMissingVerbose )
import Distribution.Verbosity ( Verbosity, lessVerbose ) import Distribution.Verbosity ( Verbosity )
import Distribution.Compat.Env ( lookupEnv, setEnv ) import Distribution.Compat.Env ( lookupEnv, setEnv )
import Distribution.System ( Platform )
import qualified Distribution.Client.Index as Index import qualified Distribution.Client.Index as Index
import qualified Distribution.Simple.Register as Register import qualified Distribution.Simple.Register as Register
import Control.Exception ( bracket_ ) import Control.Exception ( bracket_ )
import Control.Monad ( unless, when ) import Control.Monad ( unless, when )
import Data.Monoid ( mappend, mempty )
import Data.List ( delete ) import Data.List ( delete )
import System.Directory ( canonicalizePath import System.Directory ( canonicalizePath
, doesDirectoryExist , doesDirectoryExist
...@@ -204,138 +179,3 @@ sandboxAddSource verbosity buildTreeRefs _sandboxFlags globalFlags = do ...@@ -204,138 +179,3 @@ sandboxAddSource verbosity buildTreeRefs _sandboxFlags globalFlags = do
Index.addBuildTreeRefs verbosity indexFile buildTreeRefs Index.addBuildTreeRefs verbosity indexFile buildTreeRefs
-- | Entry point for the 'cabal sandbox-configure' command.
sandboxConfigure :: Verbosity -> SandboxFlags -> ConfigFlags -> ConfigExFlags
-> [String] -> GlobalFlags -> IO ()
sandboxConfigure verbosity
_sandboxFlags configFlags configExFlags extraArgs globalFlags = do
(sandboxDir, pkgEnv) <- tryLoadSandboxConfig verbosity
(globalConfigFile globalFlags)
let config = pkgEnvSavedConfig pkgEnv
configFlags' = savedConfigureFlags config `mappend` configFlags
configExFlags' = savedConfigureExFlags config `mappend` configExFlags
globalFlags' = savedGlobalFlags config `mappend` globalFlags
(comp, platform, conf) <- configCompilerAux configFlags'
-- If the user has set the -w option, we may need to create the package DB for
-- this compiler.
let configFlags'' = setPackageDB sandboxDir comp configFlags'
initPackageDBIfNeeded verbosity configFlags'' comp conf
withSandboxBinDirOnSearchPath sandboxDir $
configure verbosity
(configPackageDB' configFlags'') (globalRepos globalFlags')
comp platform conf configFlags'' configExFlags' extraArgs
-- | Entry point for the 'cabal sandbox-build' command.
sandboxBuild :: Verbosity -> SandboxFlags -> BuildFlags -> GlobalFlags
-> [String] -> IO ()
sandboxBuild verbosity sandboxFlags buildFlags' globalFlags extraArgs = do
let setupScriptOptions = defaultSetupScriptOptions {
useDistPref = fromFlagOrDefault
(useDistPref defaultSetupScriptOptions)
(buildDistPref buildFlags)
}
buildFlags = buildFlags' {
buildVerbosity = toFlag verbosity
}
-- Check that the sandbox exists.
(sandboxDir, pkgEnv) <- tryLoadSandboxConfig verbosity
(globalConfigFile globalFlags)
indexFile <- tryGetIndexFilePath pkgEnv
buildTreeRefs <- Index.listBuildTreeRefs verbosity indexFile
-- Install all add-source dependencies of the current package into the
-- sandbox.
unless (null buildTreeRefs) $
sandboxInstall verbosity sandboxFlags mempty mempty mempty mempty
(".":buildTreeRefs) mempty [UserTargetLocalDir "."]
-- Actually build the package.
-- TODO: Do the "you should run configure before build" check before installing
-- add-source dependencies.
withSandboxBinDirOnSearchPath sandboxDir $
setupWrapper verbosity setupScriptOptions Nothing
(buildCommand defaultProgramConfiguration) (const buildFlags) extraArgs
-- | Entry point for the 'cabal sandbox-install' command.
sandboxInstall :: Verbosity -> SandboxFlags -> ConfigFlags -> ConfigExFlags
-> InstallFlags -> HaddockFlags
-> [String] -> GlobalFlags
-> [UserTarget] -- ^ Targets to prune from the install plan.
-> IO ()
sandboxInstall verbosity _sandboxFlags _configFlags _configExFlags
installFlags _haddockFlags _extraArgs _globalFlags _targetsToPrune
| fromFlagOrDefault False (installOnly installFlags)
-- TODO: It'd be nice if this picked up the -w flag passed to
-- sandbox-configure. Right now, running
--
-- $ cabal sandbox-init && cabal sandbox-configure -w /path/to/ghc
-- && cabal sandbox-build && cabal sandbox-install
--
-- performs the compilation twice unless you also pass -w to sandbox-install.
= setupWrapper verbosity defaultSetupScriptOptions Nothing
installCommand (const mempty) []
sandboxInstall verbosity _sandboxFlags configFlags configExFlags
installFlags haddockFlags extraArgs globalFlags
targetsToPrune = do
(sandboxDir, pkgEnv) <- tryLoadSandboxConfig verbosity
(globalConfigFile globalFlags)
targets <- readUserTargets verbosity extraArgs
let config = pkgEnvSavedConfig pkgEnv
configFlags' = savedConfigureFlags config `mappend` configFlags
configExFlags' = defaultConfigExFlags `mappend`
savedConfigureExFlags config `mappend` configExFlags
installFlags' = defaultInstallFlags `mappend`
savedInstallFlags config `mappend` installFlags
globalFlags' = savedGlobalFlags config `mappend` globalFlags
(comp, platform, conf) <- configCompilerAux' configFlags'
-- If the user has set the -w option, we may need to create the package DB for
-- this compiler.
let configFlags'' = setPackageDB sandboxDir comp configFlags'
args :: InstallArgs
args = ((configPackageDB' configFlags''), (globalRepos globalFlags'),
comp, platform, conf,
globalFlags', configFlags'', configExFlags', installFlags',
haddockFlags)
logMsg message rest = debugNoWrap verbosity message >> rest
initPackageDBIfNeeded verbosity configFlags'' comp conf
withSandboxBinDirOnSearchPath sandboxDir $ do
installContext@(_,sourcePkgDb,_,_) <-
makeInstallContext verbosity args targets
toPrune <- resolveUserTargets verbosity
(fromFlag $ globalWorldFile globalFlags')
(packageIndex sourcePkgDb)
targetsToPrune
installPlan <- foldProgress logMsg die return =<<
(fmap (\p -> p >>= if not . null $ targetsToPrune
then pruneInstallPlan toPrune
else return)
$ makeInstallPlan verbosity args installContext)
processInstallPlan verbosity args installContext installPlan
configPackageDB' :: ConfigFlags -> PackageDBStack
configPackageDB' cfg =
-- The userInstall parameter is set to False so that interpretPackageDbFlags
-- doesn't add UserPackageDb to the PackageDbStack (see #1183).
-- FIXME: This is a bit fragile, maybe change the boolean parameter to
-- UserInstall | GlobalInstall | UseSandbox ?
interpretPackageDbFlags {- userInstall = -} False (configPackageDBs cfg)
configCompilerAux' :: ConfigFlags
-> IO (Compiler, Platform, ProgramConfiguration)
configCompilerAux' configFlags =
configCompilerAux configFlags
--FIXME: make configCompilerAux use a sensible verbosity
{ configVerbosity = fmap lessVerbose (configVerbosity configFlags) }
...@@ -30,11 +30,7 @@ module Distribution.Client.Setup ...@@ -30,11 +30,7 @@ module Distribution.Client.Setup
, initCommand, IT.InitFlags(..) , initCommand, IT.InitFlags(..)
, sdistCommand, SDistFlags(..), SDistExFlags(..), ArchiveFormat(..) , sdistCommand, SDistFlags(..), SDistExFlags(..), ArchiveFormat(..)
, win32SelfUpgradeCommand, Win32SelfUpgradeFlags(..) , win32SelfUpgradeCommand, Win32SelfUpgradeFlags(..)
, indexCommand, IndexFlags(..) , sandboxCommand, defaultSandboxLocation, SandboxFlags(..)
, dumpPkgEnvCommand
, sandboxInitCommand, sandboxDeleteCommand, sandboxConfigureCommand
, sandboxAddSourceCommand, sandboxBuildCommand, sandboxInstallCommand
, SandboxFlags(..), defaultSandboxLocation
, parsePackageArgs , parsePackageArgs
--TODO: stop exporting these: --TODO: stop exporting these:
...@@ -1267,79 +1263,6 @@ instance Monoid Win32SelfUpgradeFlags where ...@@ -1267,79 +1263,6 @@ instance Monoid Win32SelfUpgradeFlags where
} }
where combine field = field a `mappend` field b where combine field = field a `mappend` field b
-- ------------------------------------------------------------
-- * Index flags
-- ------------------------------------------------------------
data IndexFlags = IndexFlags {
indexInit :: Flag Bool,
indexList :: Flag Bool,
indexLinkSource :: [FilePath],
indexRemoveSource :: [String],
indexVerbosity :: Flag Verbosity
}
defaultIndexFlags :: IndexFlags
defaultIndexFlags = IndexFlags {
indexInit = mempty,
indexList = mempty,
indexLinkSource = [],
indexRemoveSource = [],
indexVerbosity = toFlag normal
}
indexCommand :: CommandUI IndexFlags
indexCommand = CommandUI {
commandName = "index",
commandSynopsis = "Query and modify the index file",
commandDescription = Nothing,
commandUsage = \pname ->
"Usage: " ++ pname ++ " index FLAGS PATH\n\n"
++ "Flags for index:",
commandDefaultFlags = defaultIndexFlags,
commandOptions = \_ ->
[optionVerbosity indexVerbosity
(\v flags -> flags { indexVerbosity = v})
,option [] ["init"]
"Create the index"
indexInit (\v flags -> flags { indexInit = v })
trueArg
,option [] ["link-source"]
"Add a reference to a local build tree to the index"
indexLinkSource (\v flags -> flags { indexLinkSource = v })
(reqArg' "PATH" (\x -> [x]) id)
,option [] ["remove-source"]
"Remove a reference to a local build tree from the index"
indexRemoveSource (\v flags -> flags { indexRemoveSource = v })
(reqArg' "PATH" (\x -> [x]) id)
,option [] ["list"]
"List the local build trees that are referred to from the index"
indexList (\v flags -> flags { indexList = v })
trueArg
]
}
instance Monoid IndexFlags where
mempty = IndexFlags {
indexInit = mempty,
indexList = mempty,
indexLinkSource = mempty,
indexRemoveSource = mempty,
indexVerbosity = mempty
}
mappend a b = IndexFlags {
indexInit = combine indexInit,
indexList = combine indexList,
indexLinkSource = combine indexLinkSource,
indexRemoveSource = combine indexRemoveSource,
indexVerbosity = combine indexVerbosity
}
where combine field = field a `mappend` field b
-- ------------------------------------------------------------ -- ------------------------------------------------------------
-- * Sandbox-related flags -- * Sandbox-related flags
-- ------------------------------------------------------------ -- ------------------------------------------------------------
...@@ -1358,116 +1281,27 @@ defaultSandboxFlags = SandboxFlags { ...@@ -1358,116 +1281,27 @@ defaultSandboxFlags = SandboxFlags {
sandboxLocation = toFlag defaultSandboxLocation sandboxLocation = toFlag defaultSandboxLocation
} }
commonSandboxOptions :: ShowOrParseArgs -> [OptionField SandboxFlags] sandboxCommand :: CommandUI SandboxFlags
commonSandboxOptions _showOrParseArgs = sandboxCommand = CommandUI {
[ optionVerbosity sandboxVerbosity (\v flags -> flags { sandboxVerbosity = v }) commandName = "sandbox",
commandSynopsis = "Create/modify/delete a sandbox",
commandDescription = Nothing,
commandUsage = \pname ->
"Usage: " ++ pname ++ " sandbox init\n"
++ " or: " ++ pname ++ " sandbox delete\n"
++ " or: " ++ pname ++ " sandbox add-source [PATHS]\n\n"
++ "Flags for sandbox:",
commandDefaultFlags = defaultSandboxFlags,
commandOptions = \_ ->
[ optionVerbosity sandboxVerbosity
(\v flags -> flags { sandboxVerbosity = v })
, option [] ["sandbox"] , option [] ["sandbox"]
"Sandbox location (default: './.cabal-sandbox')." "Sandbox location (default: './.cabal-sandbox')."
sandboxLocation (\v flags -> flags { sandboxLocation = v }) sandboxLocation (\v flags -> flags { sandboxLocation = v })
(reqArgFlag "DIR") (reqArgFlag "DIR")
] ]
sandboxInitCommand :: CommandUI SandboxFlags
sandboxInitCommand = CommandUI {
commandName = "sandbox-init",
commandSynopsis = "Initialise a fresh sandbox",
commandDescription = Nothing,
commandUsage = usageFlags "sandbox-init",
commandDefaultFlags = defaultSandboxFlags,
commandOptions = commonSandboxOptions
}
sandboxDeleteCommand :: CommandUI SandboxFlags
sandboxDeleteCommand = CommandUI {
commandName = "sandbox-delete",
commandSynopsis = "Deletes current sandbox",
commandDescription = Nothing,
commandUsage = usageFlags "sandbox-delete",
commandDefaultFlags = defaultSandboxFlags,
commandOptions = commonSandboxOptions
}
sandboxAddSourceCommand :: CommandUI SandboxFlags
sandboxAddSourceCommand = CommandUI {
commandName = "sandbox-add-source",
commandSynopsis = "Make a source package available in a sandbox",
commandDescription = Nothing,
commandUsage = usageFlags "sandbox-add-source",
commandDefaultFlags = defaultSandboxFlags,
commandOptions = commonSandboxOptions
}
sandboxConfigureCommand :: CommandUI (SandboxFlags, ConfigFlags, ConfigExFlags)
sandboxConfigureCommand = CommandUI {
commandName = "sandbox-configure",
commandSynopsis = "Configure a package inside a sandbox",
commandDescription = Nothing,
commandUsage = usageFlags "sandbox-configure",
commandDefaultFlags = (defaultSandboxFlags, mempty, defaultConfigExFlags),
commandOptions = \showOrParseArgs ->
liftOptions get1 set1 (commonSandboxOptions showOrParseArgs)
++ liftOptions get2 set2
(filter ((\n -> n /= "constraint" && n /= "verbose") . optionName) $
configureOptions showOrParseArgs)
++ liftOptions get3 set3 (configureExOptions showOrParseArgs)
}
where
get1 (a,_,_) = a; set1 a (_,b,c) = (a,b,c)
get2 (_,b,_) = b; set2 b (a,_,c) = (a,b,c)
get3 (_,_,c) = c; set3 c (a,b,_) = (a,b,c)
sandboxBuildCommand :: CommandUI (SandboxFlags, BuildFlags)
sandboxBuildCommand = CommandUI {
commandName = "sandbox-build",
commandSynopsis = "Build a package inside a sandbox",
commandDescription = Nothing,
commandUsage = usageFlags "sandbox-build",
commandDefaultFlags = (defaultSandboxFlags, Cabal.defaultBuildFlags),
commandOptions = \showOrParseArgs ->
liftOptions fst setFst (commonSandboxOptions showOrParseArgs)
++ liftOptions snd setSnd (filter ((/= "verbose") . optionName) $
Cabal.buildOptions progConf showOrParseArgs)
}
where
progConf = defaultProgramConfiguration
setFst a (_,b) = (a,b)
setSnd b (a,_) = (a,b)
sandboxInstallCommand :: CommandUI (SandboxFlags, ConfigFlags, ConfigExFlags,
InstallFlags, HaddockFlags)
sandboxInstallCommand = CommandUI {
commandName = "sandbox-install",
commandSynopsis = "Install a list of packages into a sandbox",
commandDescription = commandDescription installCommand,
commandUsage = usageFlagsOrPackages "sandbox-install",
commandDefaultFlags = (defaultSandboxFlags, mempty, mempty, mempty, mempty),
commandOptions = \showOrParseArgs ->
liftOptions get1 set1 (commonSandboxOptions showOrParseArgs)
++ liftOptions get2 set2
(filter ((\n -> n /= "constraint" && n /= "verbose") . optionName) $
configureOptions showOrParseArgs)
++ liftOptions get3 set3 (configureExOptions showOrParseArgs)
++ liftOptions get4 set4 (installOptions showOrParseArgs)
++ liftOptions get5 set5 (haddockOptions showOrParseArgs)
}
where
get1 (a,_,_,_,_) = a; set1 a (_,b,c,d,e) = (a,b,c,d,e)
get2 (_,b,_,_,_) = b; set2 b (a,_,c,d,e) = (a,b,c,d,e)
get3 (_,_,c,_,_) = c; set3 c (a,b,_,d,e) = (a,b,c,d,e)
get4 (_,_,_,d,_) = d; set4 d (a,b,c,_,e) = (a,b,c,d,e)
get5 (_,_,_,_,e) = e; set5 e (a,b,c,d,_) = (a,b,c,d,e)
dumpPkgEnvCommand :: CommandUI SandboxFlags
dumpPkgEnvCommand = CommandUI {
commandName = "dump-pkgenv",
commandSynopsis = "Dump a parsed package environment file",
commandDescription = Nothing,
commandUsage = usageFlags "dump-pkgenv",
commandDefaultFlags = defaultSandboxFlags,
commandOptions = commonSandboxOptions
} }
instance Monoid SandboxFlags where instance Monoid SandboxFlags where
......
...@@ -32,11 +32,7 @@ import Distribution.Client.Setup ...@@ -32,11 +32,7 @@ import Distribution.Client.Setup
, InitFlags(initVerbosity), initCommand , InitFlags(initVerbosity), initCommand
, SDistFlags(..), SDistExFlags(..), sdistCommand , SDistFlags(..), SDistExFlags(..), sdistCommand
, Win32SelfUpgradeFlags(..), win32SelfUpgradeCommand , Win32SelfUpgradeFlags(..), win32SelfUpgradeCommand
, IndexFlags(..), indexCommand , SandboxFlags(..), sandboxCommand
, SandboxFlags(..), sandboxInitCommand, sandboxDeleteCommand
, sandboxAddSourceCommand, sandboxConfigureCommand
, sandboxBuildCommand, sandboxInstallCommand
, dumpPkgEnvCommand
, reportCommand , reportCommand
) )
import Distribution.Simple.Setup import Distribution.Simple.Setup
...@@ -67,14 +63,10 @@ import Distribution.Client.Upload as Upload (upload, check, report) ...@@ -67,14 +63,10 @@ import Distribution.Client.Upload as Upload (upload, check, report)
import Distribution.Client.Run (run) import Distribution.Client.Run (run)
import Distribution.Client.SrcDist (sdist) import Distribution.Client.SrcDist (sdist)
import Distribution.Client.Get (get) import Distribution.Client.Get (get)
import Distribution.Client.Index (index)
import Distribution.Client.Sandbox (sandboxInit import Distribution.Client.Sandbox (sandboxInit
, sandboxDelete ,sandboxAddSource
, sandboxAddSource ,sandboxDelete
, sandboxBuild ,dumpPackageEnvironment)
, sandboxConfigure
, sandboxInstall
, dumpPackageEnvironment)
import Distribution.Client.Init (initCabal) import Distribution.Client.Init (initCabal)
import qualified Distribution.Client.Win32SelfUpgrade as Win32SelfUpgrade import qualified Distribution.Client.Win32SelfUpgrade as Win32SelfUpgrade
...@@ -166,6 +158,7 @@ mainWorker args = topHandler $ ...@@ -166,6 +158,7 @@ mainWorker args = topHandler $
,initCommand `commandAddAction` initAction