diff --git a/cabal-install/main/Main.hs b/cabal-install/main/Main.hs index 6bb112a26a5..02c1469cadf 100644 --- a/cabal-install/main/Main.hs +++ b/cabal-install/main/Main.hs @@ -13,7 +13,6 @@ -- Entry point to the default cabal-install front-end. ----------------------------------------------------------------------------- -{-# OPTIONS_GHC -Wno-deferred-type-errors #-} module Main (main) where import Distribution.Client.Setup diff --git a/cabal-install/tests/UnitTests/Distribution/Client/Init/Golden.hs b/cabal-install/tests/UnitTests/Distribution/Client/Init/Golden.hs index 34052296ef7..f7e82edded5 100644 --- a/cabal-install/tests/UnitTests/Distribution/Client/Init/Golden.hs +++ b/cabal-install/tests/UnitTests/Distribution/Client/Init/Golden.hs @@ -71,32 +71,6 @@ tests v initFlags _comp pkgIx srcDb = testGroup "golden" pkgName = evalPrompt (packageNamePrompt srcDb initFlags) $ fromList ["test-package", "y"] --- goldenCabalTests --- :: Verbosity --- -> InstalledPackageIndex --- -> FilePath --- -> PackageName --- -> SourcePackageDb --- -> TestTree --- goldenCabalTests v pkgIx pkgDir pkgName srcDb = testGroup ".cabal golden tests" --- [ goldenVsString "Create lib .cabal project" (goldenCabal "lib-cabal.golden") $ --- runGoldenCabal emptyFlags { packageType = Flag Library } --- , goldenVsString "Create lib+test .cabal project" (goldenCabal "lib-test-cabal.golden") $ --- runGoldenCabal emptyFlags --- { packageType = Flag Library --- , initializeTestSuite = Flag True --- } --- , goldenVsString "Create lib .cabal project" (goldenCabal "exe-cabal.golden") $ --- runGoldenCabal emptyFlags { packageType = Flag Executable } --- ] --- where --- runGoldenCabal flags = --- case _runPrompt (createProject v pkgIx srcDb flags) of --- Right (t, _) -> return . BS8.pack $ showFields' --- annCommentLines postProcessFieldLines --- 4 [mkCabalStanza opts t] --- Left e -> assertFailure $ show e - goldenPkgDescTests :: Verbosity -> SourcePackageDb diff --git a/changelog.d/pr-7344 b/changelog.d/pr-7344 new file mode 100644 index 00000000000..dc5eb40044a --- /dev/null +++ b/changelog.d/pr-7344 @@ -0,0 +1,24 @@ +synopsis: Cabal init rewrite +pr: #7344 +issues: #7273 #7256 #7255 #7251 #6758 #6864 #1074 +significance: significant +description: { + +- Restructures the `cabal init` command to fix historical + issues. All flags are preserved. + - Codebases for interactive and non-interactive flags + are disentangled. + - Data structures now exploit relevant stanza structure + and formatters only care about stanza data + - Heuristics and prompts have a pure and impure implementation. + +- Sets default behavior to be `--interactive` as opposed to + `--non-interactive`. + +- Rewrites tests to achieve 98% coverage + - Golden files now test every stanza individually + - Every flag is covered by a unit test + - Interactive, simple, and non-interactive workflows are + covered. + +} \ No newline at end of file