Skip to content
Snippets Groups Projects
Unverified Commit fd8020fb authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub
Browse files

Merge pull request #9926 from haskell/wip/succeed-on-nothing-copy

Downgrade NoLibraryFound from an error to a warning
parents abb334c7 312a4124
No related branches found
No related tags found
No related merge requests found
Pipeline #94353 passed
......@@ -47,7 +47,8 @@ data CabalException
| EnableBenchMark
| BenchMarkNameDisabled String
| NoBenchMark String
| NoLibraryFound
| -- | @NoLibraryFound@ has been downgraded to a warning, and is therefore no longer emitted.
NoLibraryFound
| CompilerNotInstalled CompilerFlavor
| CantFindIncludeFile String
| UnsupportedTestSuite String
......
......@@ -147,7 +147,7 @@ install_setupHooks
checkHasLibsOrExes =
unless (hasLibs pkg_descr || hasForeignLibs pkg_descr || hasExes pkg_descr) $
dieWithException verbosity NoLibraryFound
warn verbosity "No executables and no library found. Nothing to do."
-- | Copy package global files.
copyPackage
......
cabal-version: 3.0
name: OnlyTestSuite
version: 0.1.0.0
build-type: Simple
common warnings
ghc-options: -Wall
test-suite OnlyTestSuite-test
import: warnings
default-language: Haskell2010
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Main.hs
build-depends: base
# Setup configure
Configuring OnlyTestSuite-0.1.0.0...
# Setup build
Building OnlyTestSuite-0.1.0.0...
# Setup copy
Warning: No executables and no library found. Nothing to do.
# Setup configure
Configuring OnlyTestSuite-0.1.0.0...
# Setup build
Building OnlyTestSuite-0.1.0.0...
# Setup copy
Warning: No executables and no library found. Nothing to do.
import Test.Cabal.Prelude
main = setupAndCabalTest $ do
withPackageDb $ do
setup "configure" []
setup "build" []
setup "copy" []
module Main (main) where
main :: IO ()
main = putStrLn "Test suite not yet implemented."
synopsis: Make Setup copy/install succeed when there's no executable or library
packages: Cabal
prs: #9926
issues: #6750
description: {
Historically the Setup copy and install steps would fail if the package didn't
contain an executable or library component. In this case there's nothing to do.
This required workarounds for downstream users of Cabal to handle this edge case.
Now that this error has been downgraded to a warning, Cabal will succeed if
there's nothing to do.
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment