Skip to content

Commit

Permalink
Merge pull request #9855 from cabalism/fix/remove-unused-packages
Browse files Browse the repository at this point in the history
Remove unused packages
  • Loading branch information
mergify[bot] committed Apr 8, 2024
2 parents cd9b1fd + fa915e9 commit d7147fc
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 49 deletions.
1 change: 0 additions & 1 deletion Cabal-described/Cabal-described.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ library
, rere >=0.1 && <0.3
, tasty
, tasty-quickcheck
, transformers

exposed-modules:
Distribution.Described
Expand Down
3 changes: 0 additions & 3 deletions Cabal-syntax/Cabal-syntax.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ library
if impl(ghc >= 8.0) && impl(ghc < 8.8)
ghc-options: -Wnoncanonical-monadfail-instances

if impl(ghc >= 8.10)
ghc-options: -Wunused-packages

build-tool-depends: alex:alex

exposed-modules:
Expand Down
12 changes: 0 additions & 12 deletions Cabal-tests/Cabal-tests.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -57,31 +57,23 @@ test-suite unit-tests
main-is: UnitTests.hs
build-depends:
array
, async >=2.2.2 && <2.3
, base >=4.9 && <5
, binary
, bytestring
, Cabal
, Cabal-described
, Cabal-syntax
, Cabal-QuickCheck
, Cabal-tests
, containers
, deepseq
, Diff >=0.4 && <0.6
, directory
, filepath
, integer-logarithms >=1.0.2 && <1.1
, pretty
, QuickCheck >=2.14 && <2.15
, rere >=0.1 && <0.3
, tagged
, tasty >=1.2.3 && <1.6
, tasty-hunit
, tasty-quickcheck
, temporary
, text
, transformers

ghc-options: -Wall
default-language: Haskell2010
Expand All @@ -102,7 +94,6 @@ test-suite parser-tests
, tasty >=1.2.3 && <1.6
, tasty-golden >=2.3.1.1 && <2.4
, tasty-hunit
, tasty-quickcheck
, tree-diff >=0.1 && <0.4

ghc-options: -Wall
Expand All @@ -121,7 +112,6 @@ test-suite check-tests
, directory
, filepath
, tasty >=1.2.3 && <1.6
, tasty-expected-failure
, tasty-golden >=2.3.1.1 && <2.4

ghc-options: -Wall
Expand Down Expand Up @@ -157,7 +147,6 @@ test-suite hackage-tests
, Cabal
, Cabal-syntax
, Cabal-tree-diff
, containers
, deepseq
, directory
, filepath
Expand All @@ -167,7 +156,6 @@ test-suite hackage-tests
, base-orphans >=0.6 && <0.10
, clock >=0.8 && <0.9
, optparse-applicative >=0.13.2.0 && <0.19
, stm >=2.4.5.0 && <2.6
, tar >=0.5.0.3 && <0.7
, tree-diff >=0.1 && <0.4

Expand Down
3 changes: 0 additions & 3 deletions Cabal/Cabal.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ library
if impl(ghc >= 8.0) && impl(ghc < 8.8)
ghc-options: -Wnoncanonical-monadfail-instances

if impl(ghc >= 8.10)
ghc-options: -Wunused-packages

exposed-modules:
Distribution.Backpack.Configure
Distribution.Backpack.ComponentsGraph
Expand Down
6 changes: 1 addition & 5 deletions cabal-install-solver/cabal-install-solver.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,9 @@ library
-Wall -Wcompat -Wnoncanonical-monad-instances
-fwarn-tabs -fwarn-incomplete-uni-patterns

if impl(ghc <8.8)
if impl(ghc < 8.8)
ghc-options: -Wnoncanonical-monadfail-instances

if impl(ghc >=8.10)
ghc-options: -Wunused-packages

exposed-modules:
Distribution.Client.Utils.Assertion

Expand Down Expand Up @@ -135,7 +132,6 @@ Test-Suite unit-tests

build-depends:
, base >= 4.10 && <4.20
, Cabal
, Cabal-syntax
, cabal-install-solver
, tasty >= 1.2.3 && <1.6
Expand Down
5 changes: 0 additions & 5 deletions cabal-install/cabal-install.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ common warnings
if impl(ghc < 8.8)
ghc-options: -Wnoncanonical-monadfail-instances

if impl(ghc >=9.0)
-- Warning: even though introduced with GHC 8.10, -Wunused-packages
-- gives false positives with GHC 8.10.
ghc-options: -Wunused-packages

common base-dep
build-depends: base >=4.10 && <4.20

Expand Down
34 changes: 15 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
Expand Down Expand Up @@ -62,9 +60,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 @@ -79,7 +77,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 @@ -101,11 +98,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 @@ -127,23 +122,24 @@ 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
-- 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
12 changes: 11 additions & 1 deletion project-cabal/ghc-options.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
program-options
ghc-options: -fno-ignore-asserts -Werror
ghc-options:
-fno-ignore-asserts
-Werror

-- Warning: even though introduced with GHC 8.10, -Wunused-packages gives false
-- positives with GHC 8.10.
if impl(ghc >= 9)
program-options
ghc-options: -Wunused-packages
package cabal-testsuite
ghc-options: -Wwarn=unused-packages

0 comments on commit d7147fc

Please sign in to comment.