Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Successive Cabal Package Errors #9162

Merged
merged 19 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
1cc99f7
Cabal Package Exceptions
SuganyaAK Aug 6, 2023
d652de7
Accepting new format of output with error codes
SuganyaAK Aug 7, 2023
14ba477
Reverting the changes to new error output
SuganyaAK Aug 7, 2023
f700822
Rebasing branch Subsequent Cabal Package errors
SuganyaAK Aug 7, 2023
115b874
Added setup-explicit-fail.out
SuganyaAK Aug 7, 2023
4d2d593
Delete setup-explicit-fail.out
SuganyaAK Aug 7, 2023
879e996
Merge branch 'Subsequent-Cabal-Package-Errors' of https://github.com/…
SuganyaAK Aug 7, 2023
cf47871
Accepting new output with error codes
SuganyaAK Aug 8, 2023
1bd3f06
Changed to "GetProgramInvocationException" and "SanityCheckForEnableC…
SuganyaAK Aug 9, 2023
e834da9
Going back to former die' call in `getProgramInvocationOutout` funct…
SuganyaAK Aug 9, 2023
f8fea52
Accepted new error output, included cabalexception in handler
SuganyaAK Aug 10, 2023
d9003cb
Error code rectification
SuganyaAK Aug 10, 2023
56d358a
Merge branch 'master' into Subsequent-Cabal-Package-Errors
SuganyaAK Aug 10, 2023
1d75436
Added a handler condition for VerboseException CabalException in `ann…
SuganyaAK Aug 10, 2023
331924e
Leaving "GetProgramInvocationException" unmodified
SuganyaAK Aug 10, 2023
30ad07f
Incorporated review comments
SuganyaAK Aug 10, 2023
e3fdde3
Updated "nor" in AutoGenModule test case
SuganyaAK Aug 10, 2023
e29b204
Updated "AutogenExposeOther" test case which was dependent on this "n…
SuganyaAK Aug 10, 2023
87443ba
Merge branch 'master' into Subsequent-Cabal-Package-Errors
SuganyaAK Aug 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cabal/src/Distribution/PackageDescription/Check.hs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ ppExplanation SignaturesCabal2 =
"To use the 'signatures' field the package needs to specify "
++ "at least 'cabal-version: 2.0'."
ppExplanation AutogenNotExposed =
"An 'autogen-module' is neither on 'exposed-modules' or 'other-modules'."
"An 'autogen-module' is neither on 'exposed-modules' nor 'other-modules'."
ppExplanation AutogenIncludesNotIncluded =
"An include in 'autogen-includes' is neither in 'includes' or "
++ "'install-includes'."
Expand Down
13 changes: 4 additions & 9 deletions Cabal/src/Distribution/Simple.hs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ import Distribution.Pretty
import Distribution.Simple.Bench
import Distribution.Simple.BuildPaths
import Distribution.Simple.ConfigureScript
import Distribution.Simple.Errors
import Distribution.Simple.Haddock
import Distribution.Simple.Install
import Distribution.Simple.LocalBuildInfo
Expand Down Expand Up @@ -601,16 +602,10 @@ sanityCheckHookedBuildInfo
verbosity
(PackageDescription{library = Nothing})
(Just _, _) =
die' verbosity $
"The buildinfo contains info for a library, "
++ "but the package does not have a library."
dieWithException verbosity $ NoLibraryForPackage
sanityCheckHookedBuildInfo verbosity pkg_descr (_, hookExes)
| exe1 : _ <- nonExistant =
die' verbosity $
"The buildinfo contains info for an executable called '"
++ prettyShow exe1
++ "' but the package does not have a "
++ "executable with that name."
dieWithException verbosity $ SanityCheckHookedBuildInfo exe1
where
pkgExeNames = nub (map exeName (executables pkg_descr))
hookExeNames = nub (map fst hookExes)
Expand Down Expand Up @@ -777,7 +772,7 @@ autoconfUserHooks =
verbosity
flags
lbi
else die' verbosity "configure script not found."
else dieWithException verbosity ConfigureScriptNotFound

pbi <- getHookedBuildInfo verbosity (buildDir lbi)
sanityCheckHookedBuildInfo verbosity pkg_descr pbi
Expand Down
4 changes: 1 addition & 3 deletions Cabal/src/Distribution/Simple/Build.hs
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ checkSemaphoreSupport
:: Verbosity -> Compiler -> BuildFlags -> IO ()
checkSemaphoreSupport verbosity comp flags = do
unless (jsemSupported comp || (isNothing (flagToMaybe (buildUseSemaphore flags)))) $
die' verbosity $
"Your compiler does not support the -jsem flag. "
++ "To use this feature you must use GHC 9.8 or later."
dieWithException verbosity CheckSemaphoreSupport

-- | Write available build information for 'LocalBuildInfo' to disk.
--
Expand Down
Loading