Skip to content

Commit

Permalink
Remove v1-sdist
Browse files Browse the repository at this point in the history
  • Loading branch information
phadej committed Apr 1, 2020
1 parent b910fcf commit dd96a65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
5 changes: 2 additions & 3 deletions cabal-install/Distribution/Client/SrcDist.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
-- distribution for this package. That is, packs up the source code
-- into a tarball, making use of the corresponding Cabal module.
module Distribution.Client.SrcDist (
sdist,
allPackageSourceFiles
) where

Expand Down Expand Up @@ -45,8 +44,8 @@ import System.Directory (getTemporaryDirectory)
import Control.Exception (IOException, evaluate)

-- |Create a source distribution.
sdist :: SDistFlags -> IO ()
sdist flags = do
_sdist :: SDistFlags -> IO ()
_sdist flags = do
pkg <- liftM flattenPackageDescription
(readGenericPackageDescription verbosity =<< defaultPackageDesc verbosity)
let withDir :: (FilePath -> IO a) -> IO a
Expand Down
14 changes: 0 additions & 14 deletions cabal-install/main/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import Distribution.Client.Setup
, ReportFlags(..), reportCommand
, runCommand
, InitFlags(initVerbosity, initHcPath), initCommand
, SDistFlags(..), sdistCommand
, Win32SelfUpgradeFlags(..), win32SelfUpgradeCommand
, ActAsSetupFlags(..), actAsSetupCommand
, SandboxFlags(..), sandboxCommand
Expand Down Expand Up @@ -107,7 +106,6 @@ import Distribution.Client.Check as Check (check)
--import Distribution.Client.Clean (clean)
import qualified Distribution.Client.Upload as Upload
import Distribution.Client.Run (run, splitRunArgs)
import Distribution.Client.SrcDist (sdist)
import Distribution.Client.Get (get)
import Distribution.Client.Reconfigure (Check(..), reconfigure)
import Distribution.Client.Nix (nixInstantiate
Expand Down Expand Up @@ -309,7 +307,6 @@ mainWorker args = do
, legacyCmd benchmarkCommand benchmarkAction
, legacyCmd execCommand execAction
, legacyCmd cleanCommand cleanAction
, legacyCmd sdistCommand sdistAction
, legacyCmd doctestCommand doctestAction
, legacyWrapperCmd copyCommand copyVerbosity copyDistPref
, legacyWrapperCmd registerCommand regVerbosity regDistPref
Expand Down Expand Up @@ -1050,17 +1047,6 @@ uninstallAction verbosityFlag extraArgs _globalFlags = do
++ "in the meantime you're advised to use either 'ghc-pkg unregister "
++ package ++ "' or 'cabal sandbox hc-pkg -- unregister " ++ package ++ "'."


sdistAction :: SDistFlags -> [String] -> Action
sdistAction sdistFlags extraArgs globalFlags = do
let verbosity = fromFlag (sDistVerbosity sdistFlags)
unless (null extraArgs) $
die' verbosity $ "'sdist' doesn't take any extra arguments: " ++ unwords extraArgs
load <- try (loadConfigOrSandboxConfig verbosity globalFlags)
let config = either (\(SomeException _) -> mempty) snd load
distPref <- findSavedDistPref config (sDistDistPref sdistFlags)
sdist sdistFlags { sDistDistPref = toFlag distPref }

reportAction :: ReportFlags -> [String] -> Action
reportAction reportFlags extraArgs globalFlags = do
let verbosity = fromFlag (reportVerbosity reportFlags)
Expand Down

0 comments on commit dd96a65

Please sign in to comment.