From f32bd5bf7b4e123b58910d29cdafbdbdaec5d7dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9cate=20Moonlight?= Date: Mon, 29 May 2023 14:36:48 +0200 Subject: [PATCH 1/2] Use the latest cabal spec in the interactive project init closes #8977 --- cabal-install/src/Distribution/Client/Init/Defaults.hs | 2 +- .../src/Distribution/Client/Init/Interactive/Command.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cabal-install/src/Distribution/Client/Init/Defaults.hs b/cabal-install/src/Distribution/Client/Init/Defaults.hs index 9be998feda7..e0e39622198 100644 --- a/cabal-install/src/Distribution/Client/Init/Defaults.hs +++ b/cabal-install/src/Distribution/Client/Init/Defaults.hs @@ -67,7 +67,7 @@ defaultTestDir :: String defaultTestDir = "test" defaultCabalVersion :: CabalSpecVersion -defaultCabalVersion = CabalSpecV3_0 +defaultCabalVersion = CabalSpecV3_4 defaultPackageType :: PackageType defaultPackageType = Executable diff --git a/cabal-install/src/Distribution/Client/Init/Interactive/Command.hs b/cabal-install/src/Distribution/Client/Init/Interactive/Command.hs index 2fab0db25cc..b358c38a9bb 100644 --- a/cabal-install/src/Distribution/Client/Init/Interactive/Command.hs +++ b/cabal-install/src/Distribution/Client/Init/Interactive/Command.hs @@ -306,7 +306,7 @@ cabalVersionPrompt flags = getCabalVersion flags $ do parseCabalVersion "2.4" = CabalSpecV2_4 parseCabalVersion "3.0" = CabalSpecV3_0 parseCabalVersion "3.4" = CabalSpecV3_4 - parseCabalVersion _ = defaultCabalVersion -- 2.4 + parseCabalVersion _ = defaultCabalVersion -- 3.4 displayCabalVersion :: CabalSpecVersion -> String displayCabalVersion v = case v of CabalSpecV2_0 -> "2.0 (support for Backpack, internal sub-libs, '^>=' operator)" From 8ffe05900c01d909473bfae7564fe2d559a2e564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9cate=20Moonlight?= Date: Mon, 29 May 2023 14:46:42 +0200 Subject: [PATCH 2/2] add Changelog --- Makefile | 1 - changelog.d/pr-8978 | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 changelog.d/pr-8978 diff --git a/Makefile b/Makefile index 91ade431fa7..71ae53e2ebe 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,6 @@ exe : $(LEXER_HS) init: ## Set up git hooks and ignored revisions @git config core.hooksPath .githooks - ## TODO style: ## Run the code styler @find Cabal Cabal-syntax cabal-install -name '*.hs' \ diff --git a/changelog.d/pr-8978 b/changelog.d/pr-8978 new file mode 100644 index 00000000000..fa6b04fa676 --- /dev/null +++ b/changelog.d/pr-8978 @@ -0,0 +1,9 @@ +synopsis: Use the latest cabal spec in the interactive package init +packages: cabal-install +prs: #8978 + +description: { + +`cabal init` will now suggest version spec 3.4 when initialising new packages + +}