File tree Expand file tree Collapse file tree 8 files changed +53
-2
lines changed
Cabal/src/Distribution/Simple
cabal-testsuite/PackageTests/OnlyTestSuite Expand file tree Collapse file tree 8 files changed +53
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ data CabalException
47
47
| EnableBenchMark
48
48
| BenchMarkNameDisabled String
49
49
| NoBenchMark String
50
- | NoLibraryFound
50
+ | -- | @NoLibraryFound@ has been downgraded to a warning, and is therefore no longer emitted.
51
+ NoLibraryFound
51
52
| CompilerNotInstalled CompilerFlavor
52
53
| CantFindIncludeFile String
53
54
| UnsupportedTestSuite String
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ install_setupHooks
147
147
148
148
checkHasLibsOrExes =
149
149
unless (hasLibs pkg_descr || hasForeignLibs pkg_descr || hasExes pkg_descr) $
150
- dieWithException verbosity NoLibraryFound
150
+ warn verbosity " No executables and no library found. Nothing to do. "
151
151
152
152
-- | Copy package global files.
153
153
copyPackage
Original file line number Diff line number Diff line change
1
+ cabal-version : 3.0
2
+ name : OnlyTestSuite
3
+ version : 0.1.0.0
4
+ build-type : Simple
5
+
6
+ common warnings
7
+ ghc-options : -Wall
8
+
9
+ test-suite OnlyTestSuite-test
10
+ import : warnings
11
+ default-language : Haskell2010
12
+ type : exitcode-stdio-1.0
13
+ hs-source-dirs : test
14
+ main-is : Main.hs
15
+ build-depends : base
Original file line number Diff line number Diff line change
1
+ # Setup configure
2
+ Configuring OnlyTestSuite-0.1.0.0...
3
+ # Setup build
4
+ Building OnlyTestSuite-0.1.0.0...
5
+ # Setup copy
6
+ Warning: No executables and no library found. Nothing to do.
Original file line number Diff line number Diff line change
1
+ # Setup configure
2
+ Configuring OnlyTestSuite-0.1.0.0...
3
+ # Setup build
4
+ Building OnlyTestSuite-0.1.0.0...
5
+ # Setup copy
6
+ Warning: No executables and no library found. Nothing to do.
Original file line number Diff line number Diff line change
1
+ import Test.Cabal.Prelude
2
+ main = setupAndCabalTest $ do
3
+ withPackageDb $ do
4
+ setup " configure" []
5
+ setup " build" []
6
+ setup " copy" []
Original file line number Diff line number Diff line change
1
+ module Main (main ) where
2
+
3
+ main :: IO ()
4
+ main = putStrLn " Test suite not yet implemented."
Original file line number Diff line number Diff line change
1
+ synopsis: Make Setup copy/install succeed when there's no executable or library
2
+ packages: Cabal
3
+ prs: #9926
4
+ issues: #6750
5
+
6
+ description: {
7
+ Historically the Setup copy and install steps would fail if the package didn't
8
+ contain an executable or library component. In this case there's nothing to do.
9
+
10
+ This required workarounds for downstream users of Cabal to handle this edge case.
11
+ Now that this error has been downgraded to a warning, Cabal will succeed if
12
+ there's nothing to do.
13
+ }
You can’t perform that action at this time.
0 commit comments