Skip to content

Commit

Permalink
Remove unused packages from cabal-testsuite
Browse files Browse the repository at this point in the history
Use -Wwarn=unused-packages for cabal-testsuite
  • Loading branch information
philderbeast committed Mar 29, 2024
1 parent 363fd5d commit 52fdef8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
35 changes: 16 additions & 19 deletions cabal-testsuite/cabal-testsuite.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ common shared
, base >= 4.9 && <4.20
-- this needs to match the in-tree lib:Cabal version
, Cabal ^>= 3.11.0.0
, Cabal-syntax ^>= 3.11.0.0
, Cabal-tests

ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns

Expand Down Expand Up @@ -58,9 +56,9 @@ library
Test.Cabal.ScriptEnv0

build-depends:
, Cabal-tests
, aeson ^>= 1.4.2.0 || ^>=1.5.0.0 || ^>= 2.0.0.0 || ^>= 2.1.0.0 || ^>= 2.2.1.0
, async ^>= 2.2.1
, attoparsec ^>= 0.13.2.2 || ^>=0.14.1
, base16-bytestring ^>= 0.1.1.5 || ^>= 1.0
, bytestring ^>= 0.10.0.2 || ^>= 0.11.0.0 || ^>= 0.12.0.0
, containers ^>= 0.5.0.0 || ^>= 0.6.0.1 || ^>= 0.7
Expand All @@ -75,7 +73,6 @@ library
, regex-tdfa ^>= 1.2.3.1 || ^>=1.3.1.0
, retry ^>= 0.9.1.0
, array ^>= 0.4.0.1 || ^>= 0.5.0.0
, temporary ^>= 1.3
, text ^>= 1.2.3.1 || ^>= 2.0.1 || ^>= 2.1
, transformers ^>= 0.3.0.0 || ^>= 0.4.2.0 || ^>= 0.5.2.0 || ^>= 0.6.0.2

Expand All @@ -97,11 +94,9 @@ executable cabal-tests
, cabal-testsuite
-- constraints inherited via lib:cabal-testsuite component
, async
, exceptions
, filepath
, optparse-applicative
, process
, transformers
-- dependencies specific to exe:cabal-tests
, clock ^>= 0.7.2 || ^>=0.8
, directory
Expand All @@ -123,23 +118,25 @@ executable setup
-- If you require an external dependency for a test it must be listed here.
executable test-runtime-deps
default-language: Haskell2010
build-depends: cabal-testsuite,
base,
directory,
Cabal,
Cabal-syntax,
filepath,
transformers,
bytestring,
time,
process,
exceptions
ghc-options: -Wno-unused-packages
-- Apart from base that is a compile-time dependency, the rest are runtime dependencies
build-depends:
, Cabal
, Cabal-syntax
, base
, bytestring
, cabal-testsuite
, directory
, exceptions
, filepath
, process
, time
, transformers
main-is: static/Main.hs
if !os(windows)
build-depends: unix
else
build-depends:
, Win32
build-depends: Win32

custom-setup
-- we only depend on even stable releases of lib:Cabal
Expand Down
3 changes: 3 additions & 0 deletions project-cabal/ghc-options.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
program-options
ghc-options: -fno-ignore-asserts -Werror -Wunused-packages

package cabal-testsuite
ghc-options: -Wwarn=unused-packages

0 comments on commit 52fdef8

Please sign in to comment.