diff --git a/.gitignore b/.gitignore index e9ec3b6322f..effb929830b 100644 --- a/.gitignore +++ b/.gitignore @@ -83,3 +83,6 @@ bench.html # Emacs .projectile + +# nix-direnv +.direnv diff --git a/cabal-install/src/Distribution/Client/Main.hs b/cabal-install/src/Distribution/Client/Main.hs index 1a3cc94d49f..eeb084f62ef 100644 --- a/cabal-install/src/Distribution/Client/Main.hs +++ b/cabal-install/src/Distribution/Client/Main.hs @@ -49,7 +49,6 @@ import Distribution.Client.Setup , defaultInstallFlags , fetchCommand , formatCommand - , freezeCommand , genBoundsCommand , getCommand , globalCommand @@ -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) @@ -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 @@ -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) diff --git a/cabal-install/src/Distribution/Client/Setup.hs b/cabal-install/src/Distribution/Client/Setup.hs index 460decd55cd..699e52e2ef7 100644 --- a/cabal-install/src/Distribution/Client/Setup.hs +++ b/cabal-install/src/Distribution/Client/Setup.hs @@ -59,7 +59,6 @@ module Distribution.Client.Setup , InfoFlags (..) , fetchCommand , FetchFlags (..) - , freezeCommand , FreezeFlags (..) , genBoundsCommand , getCommand @@ -409,7 +408,6 @@ globalCommand commands = , addCmd "v1-run" , addCmd "v1-test" , addCmd "v1-bench" - , addCmd "v1-freeze" , addCmd "v1-haddock" , addCmd "v1-install" , addCmd "v1-clean" @@ -1430,82 +1428,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