From 406671881a8cd95c6c195fcc9b4cd26f376822fc Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sat, 26 Nov 2022 20:27:54 +0000 Subject: [PATCH] Reword Error: [S-910] Removes the link to a Stack issue and incorporates directly the information about the Hackage requirement, which is refected in Cabal's manual here: https://cabal.readthedocs.io/en/latest/cabal-package.html#package-descriptions. --- src/Pantry/Types.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Pantry/Types.hs b/src/Pantry/Types.hs index 34ddeb9e..45fd914d 100644 --- a/src/Pantry/Types.hs +++ b/src/Pantry/Types.hs @@ -1037,13 +1037,14 @@ instance Display PantryException where <> fold (intersperse ", " (map display sfps)) display (MismatchedCabalName fp name) = "Error: [S-910]\n" - <> "cabal file path " + <> "The Cabal file:\n" <> fromString (toFilePath fp) - <> " does not match the package name it defines.\n" + <> "\nis not named after the package that it defines.\n" <> "Please rename the file to: " <> fromString (packageNameString name) <> ".cabal\n" - <> "For more information, see: https://github.com/commercialhaskell/stack/issues/317" + <> "Hackage rejects packages where the first part of the Cabal file name " + <> "is not the package name." display (NoCabalFileFound dir) = "Error: [S-636]\n" <> "Stack looks for packages in the directories configured in\n"