Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove legacy command v1-freeze #9107

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions cabal-install/src/Distribution/Client/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import Distribution.Client.Setup
, defaultInstallFlags
, fetchCommand
, formatCommand
, freezeCommand
, genBoundsCommand
, getCommand
, globalCommand
Expand Down Expand Up @@ -137,7 +136,6 @@ import qualified Distribution.Client.CmdUpdate as CmdUpdate
import Distribution.Client.Check as Check (check)
import Distribution.Client.Configure (configure, writeConfigFlags)
import Distribution.Client.Fetch (fetch)
import Distribution.Client.Freeze (freeze)
import Distribution.Client.GenBounds (genBounds)
import Distribution.Client.Install (install)

Expand Down Expand Up @@ -395,7 +393,6 @@ mainWorker args = do
, legacyCmd configureExCommand configureAction
, legacyCmd buildCommand buildAction
, legacyCmd replCommand replAction
, legacyCmd freezeCommand freezeAction
, legacyCmd haddockCommand haddockAction
, legacyCmd installCommand installAction
, legacyCmd runCommand runAction
Expand Down Expand Up @@ -1048,27 +1045,6 @@ fetchAction fetchFlags extraArgs globalFlags = do
fetchFlags
targets

freezeAction :: FreezeFlags -> [String] -> Action
freezeAction freezeFlags _extraArgs globalFlags = do
let verbosity = fromFlag (freezeVerbosity freezeFlags)
config <- loadConfigOrSandboxConfig verbosity globalFlags
distPref <- findSavedDistPref config NoFlag
nixShell verbosity distPref globalFlags config $ do
let configFlags = savedConfigureFlags config
globalFlags' = savedGlobalFlags config `mappend` globalFlags
(comp, platform, progdb) <- configCompilerAux' configFlags

withRepoContext verbosity globalFlags' $ \repoContext ->
freeze
verbosity
(configPackageDB' configFlags)
repoContext
comp
platform
progdb
globalFlags'
freezeFlags

genBoundsAction :: FreezeFlags -> [String] -> GlobalFlags -> IO ()
genBoundsAction freezeFlags _extraArgs globalFlags = do
let verbosity = fromFlag (freezeVerbosity freezeFlags)
Expand Down
78 changes: 0 additions & 78 deletions cabal-install/src/Distribution/Client/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ module Distribution.Client.Setup
, InfoFlags (..)
, fetchCommand
, FetchFlags (..)
, freezeCommand
, FreezeFlags (..)
, genBoundsCommand
, getCommand
Expand Down Expand Up @@ -408,7 +407,6 @@ globalCommand commands =
, addCmd "v1-run"
, addCmd "v1-test"
, addCmd "v1-bench"
, addCmd "v1-freeze"
, addCmd "v1-haddock"
, addCmd "v1-install"
, addCmd "v1-clean"
Expand Down Expand Up @@ -1429,82 +1427,6 @@ defaultFreezeFlags =
, freezeVerbosity = toFlag normal
}

freezeCommand :: CommandUI FreezeFlags
freezeCommand =
CommandUI
{ commandName = "freeze"
, commandSynopsis = "Freeze dependencies."
, commandDescription = Just $ \_ ->
wrapText $
"Calculates a valid set of dependencies and their exact versions. "
++ "If successful, saves the result to the file `cabal.config`.\n"
++ "\n"
++ "The package versions specified in `cabal.config` will be used for "
++ "any future installs.\n"
++ "\n"
++ "An existing `cabal.config` is ignored and overwritten.\n"
, commandNotes = Nothing
, commandUsage = usageFlags "freeze"
, commandDefaultFlags = defaultFreezeFlags
, commandOptions = \showOrParseArgs ->
[ optionVerbosity
freezeVerbosity
(\v flags -> flags{freezeVerbosity = v})
, option
[]
["dry-run"]
"Do not freeze anything, only print what would be frozen"
freezeDryRun
(\v flags -> flags{freezeDryRun = v})
trueArg
, option
[]
["tests"]
( "freezing of the dependencies of any tests suites "
++ "in the package description file."
)
freezeTests
(\v flags -> flags{freezeTests = v})
(boolOpt [] [])
, option
[]
["benchmarks"]
( "freezing of the dependencies of any benchmarks suites "
++ "in the package description file."
)
freezeBenchmarks
(\v flags -> flags{freezeBenchmarks = v})
(boolOpt [] [])
]
++ optionSolver
freezeSolver
(\v flags -> flags{freezeSolver = v})
: optionSolverFlags
showOrParseArgs
freezeMaxBackjumps
(\v flags -> flags{freezeMaxBackjumps = v})
freezeReorderGoals
(\v flags -> flags{freezeReorderGoals = v})
freezeCountConflicts
(\v flags -> flags{freezeCountConflicts = v})
freezeFineGrainedConflicts
(\v flags -> flags{freezeFineGrainedConflicts = v})
freezeMinimizeConflictSet
(\v flags -> flags{freezeMinimizeConflictSet = v})
freezeIndependentGoals
(\v flags -> flags{freezeIndependentGoals = v})
freezePreferOldest
(\v flags -> flags{freezePreferOldest = v})
freezeShadowPkgs
(\v flags -> flags{freezeShadowPkgs = v})
freezeStrongFlags
(\v flags -> flags{freezeStrongFlags = v})
freezeAllowBootLibInstalls
(\v flags -> flags{freezeAllowBootLibInstalls = v})
freezeOnlyConstrained
(\v flags -> flags{freezeOnlyConstrained = v})
}

-- ------------------------------------------------------------

-- * 'gen-bounds' command
Expand Down
Loading