Skip to content

Commit 157ab75

Browse files
committed
Remove unused packages from cabal-testsuite
Use -Wwarn=unused-packages for cabal-testsuite
1 parent 5ae2d61 commit 157ab75

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

cabal-testsuite/cabal-testsuite.cabal

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ common shared
2929
, base >= 4.9 && <4.20
3030
-- this needs to match the in-tree lib:Cabal version
3131
, Cabal ^>= 3.11.0.0
32-
, Cabal-syntax ^>= 3.11.0.0
33-
, Cabal-tests
3432

3533
ghc-options:
3634
-Wall
@@ -62,9 +60,9 @@ library
6260
Test.Cabal.ScriptEnv0
6361

6462
build-depends:
63+
, Cabal-tests
6564
, aeson ^>= 1.4.2.0 || ^>=1.5.0.0 || ^>= 2.0.0.0 || ^>= 2.1.0.0 || ^>= 2.2.1.0
6665
, async ^>= 2.2.1
67-
, attoparsec ^>= 0.13.2.2 || ^>=0.14.1
6866
, base16-bytestring ^>= 0.1.1.5 || ^>= 1.0
6967
, bytestring ^>= 0.10.0.2 || ^>= 0.11.0.0 || ^>= 0.12.0.0
7068
, containers ^>= 0.5.0.0 || ^>= 0.6.0.1 || ^>= 0.7
@@ -79,7 +77,6 @@ library
7977
, regex-tdfa ^>= 1.2.3.1 || ^>=1.3.1.0
8078
, retry ^>= 0.9.1.0
8179
, array ^>= 0.4.0.1 || ^>= 0.5.0.0
82-
, temporary ^>= 1.3
8380
, text ^>= 1.2.3.1 || ^>= 2.0.1 || ^>= 2.1
8481
, transformers ^>= 0.3.0.0 || ^>= 0.4.2.0 || ^>= 0.5.2.0 || ^>= 0.6.0.2
8582

@@ -101,11 +98,9 @@ executable cabal-tests
10198
, cabal-testsuite
10299
-- constraints inherited via lib:cabal-testsuite component
103100
, async
104-
, exceptions
105101
, filepath
106102
, optparse-applicative
107103
, process
108-
, transformers
109104
-- dependencies specific to exe:cabal-tests
110105
, clock ^>= 0.7.2 || ^>=0.8
111106
, directory
@@ -127,23 +122,24 @@ executable setup
127122
-- If you require an external dependency for a test it must be listed here.
128123
executable test-runtime-deps
129124
default-language: Haskell2010
130-
build-depends: cabal-testsuite,
131-
base,
132-
directory,
133-
Cabal,
134-
Cabal-syntax,
135-
filepath,
136-
transformers,
137-
bytestring,
138-
time,
139-
process,
140-
exceptions
125+
-- Apart from base that is a compile-time dependency, the rest are runtime dependencies
126+
build-depends:
127+
, Cabal
128+
, Cabal-syntax
129+
, base
130+
, bytestring
131+
, cabal-testsuite
132+
, directory
133+
, exceptions
134+
, filepath
135+
, process
136+
, time
137+
, transformers
141138
main-is: static/Main.hs
142139
if !os(windows)
143140
build-depends: unix
144141
else
145-
build-depends:
146-
, Win32
142+
build-depends: Win32
147143

148144
custom-setup
149145
-- we only depend on even stable releases of lib:Cabal

project-cabal/ghc-options.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
program-options
22
ghc-options: -fno-ignore-asserts -Werror -Wunused-packages
3+
4+
package cabal-testsuite
5+
ghc-options: -Wwarn=unused-packages

0 commit comments

Comments
 (0)