Skip to content

Commit

Permalink
Add changelog.d entry for haskell#7344
Browse files Browse the repository at this point in the history
  • Loading branch information
emilypi authored and ptkato committed May 31, 2021
1 parent 1a5b022 commit 3575a4e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 27 deletions.
1 change: 0 additions & 1 deletion cabal-install/main/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 0 additions & 26 deletions cabal-install/tests/UnitTests/Distribution/Client/Init/Golden.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 24 additions & 0 deletions changelog.d/pr-7344
Original file line number Diff line number Diff line change
@@ -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.

}

0 comments on commit 3575a4e

Please sign in to comment.