Skip to content

Commit 7baa972

Browse files
authored
Merge pull request #6982 from phadej/more-warnings
More warnings
2 parents 6d69799 + 15275d6 commit 7baa972

File tree

10 files changed

+82
-72
lines changed

10 files changed

+82
-72
lines changed

cabal-install/cabal-install.cabal

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ executable cabal
143143
if impl(ghc < 8.8)
144144
ghc-options: -Wnoncanonical-monadfail-instances
145145

146+
if impl(ghc >=8.10)
147+
ghc-options: -Wunused-packages
148+
146149

147150
ghc-options: -rtsopts -threaded
148151

@@ -353,7 +356,6 @@ executable cabal
353356
HTTP >= 4000.1.5 && < 4000.4,
354357
mtl >= 2.0 && < 2.3,
355358
network-uri >= 2.6.0.2 && < 2.7,
356-
network >= 2.6 && < 3.2,
357359
pretty >= 1.1 && < 1.2,
358360
process >= 1.2.3.0 && < 1.7,
359361
random >= 1 && < 1.2,

cabal-install/cabal-install.cabal.dev

Lines changed: 58 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ library cabal-lib-client
141141
if impl(ghc < 8.8)
142142
ghc-options: -Wnoncanonical-monadfail-instances
143143

144+
if impl(ghc >=8.10)
145+
ghc-options: -Wunused-packages
146+
144147
hs-source-dirs: src
145148
exposed-modules:
146149
-- this modules are moved from Cabal
@@ -347,7 +350,6 @@ library cabal-lib-client
347350
HTTP >= 4000.1.5 && < 4000.4,
348351
mtl >= 2.0 && < 2.3,
349352
network-uri >= 2.6.0.2 && < 2.7,
350-
network >= 2.6 && < 3.2,
351353
pretty >= 1.1 && < 1.2,
352354
process >= 1.2.3.0 && < 1.7,
353355
random >= 1 && < 1.2,
@@ -403,6 +405,9 @@ library cabal-install-solver-dsl
403405
if impl(ghc < 8.8)
404406
ghc-options: -Wnoncanonical-monadfail-instances
405407

408+
if impl(ghc >=8.10)
409+
ghc-options: -Wunused-packages
410+
406411
hs-source-dirs: solver-dsl
407412
exposed-modules:
408413
UnitTests.Distribution.Solver.Modular.DSL
@@ -423,6 +428,9 @@ executable cabal
423428
if impl(ghc < 8.8)
424429
ghc-options: -Wnoncanonical-monadfail-instances
425430

431+
if impl(ghc >=8.10)
432+
ghc-options: -Wunused-packages
433+
426434

427435
ghc-options: -rtsopts -threaded
428436

@@ -440,10 +448,21 @@ executable cabal
440448
-- Small, fast running tests.
441449
--
442450
Test-Suite unit-tests
451+
default-language: Haskell2010
452+
ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
453+
if impl(ghc >= 8.0)
454+
ghc-options: -Wcompat
455+
-Wnoncanonical-monad-instances
456+
if impl(ghc < 8.8)
457+
ghc-options: -Wnoncanonical-monadfail-instances
458+
459+
if impl(ghc >=8.10)
460+
ghc-options: -Wunused-packages
461+
462+
ghc-options: -threaded
443463
type: exitcode-stdio-1.0
444464
main-is: UnitTests.hs
445465
hs-source-dirs: tests
446-
ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -main-is UnitTests
447466
other-modules:
448467
UnitTests.Distribution.Client.ArbitraryInstances
449468
UnitTests.Distribution.Client.BuildReport
@@ -474,7 +493,6 @@ Test-Suite unit-tests
474493
build-depends:
475494
array,
476495
base,
477-
async,
478496
bytestring,
479497
cabal-lib-client,
480498
cabal-install-solver-dsl,
@@ -483,7 +501,6 @@ Test-Suite unit-tests
483501
Cabal-tree-diff,
484502
Cabal-QuickCheck,
485503
containers,
486-
deepseq,
487504
mtl,
488505
random,
489506
directory,
@@ -492,64 +509,71 @@ Test-Suite unit-tests
492509
time,
493510
zlib,
494511
network-uri >= 2.6.2.0 && <2.6.4.0,
495-
network,
496512
tasty >= 1.2.3 && <1.4,
497513
tasty-golden >=2.3.1.1 && <2.4,
498514
tasty-hunit >= 0.10,
499515
tasty-quickcheck,
500-
tagged,
501516
tree-diff,
502517
QuickCheck >= 2.14 && <2.15
503518

504-
ghc-options: -threaded
505-
506-
default-language: Haskell2010
507-
508519
-- Tests to run with a limited stack and heap size
509520
--
510521
Test-Suite memory-usage-tests
522+
default-language: Haskell2010
523+
ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
524+
if impl(ghc >= 8.0)
525+
ghc-options: -Wcompat
526+
-Wnoncanonical-monad-instances
527+
if impl(ghc < 8.8)
528+
ghc-options: -Wnoncanonical-monadfail-instances
529+
530+
if impl(ghc >=8.10)
531+
ghc-options: -Wunused-packages
532+
533+
ghc-options: -threaded
534+
ghc-options: "-with-rtsopts=-M4M -K1K"
511535
type: exitcode-stdio-1.0
512536
main-is: MemoryUsageTests.hs
513537
hs-source-dirs: tests
514-
ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns "-with-rtsopts=-M4M -K1K" -main-is MemoryUsageTests
515538
other-modules:
516539
UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils
517540
UnitTests.Distribution.Solver.Modular.MemoryUsage
518541
UnitTests.Options
519542
build-depends:
520543
base,
521-
async,
522544
Cabal,
523545
cabal-lib-client,
524546
cabal-install-solver-dsl,
525-
containers,
526-
deepseq,
527-
tagged,
528547
tasty >= 1.2.3 && <1.4,
529548
tasty-hunit >= 0.10
530549

531-
ghc-options: -threaded
532-
533-
default-language: Haskell2010
534-
535550
-- Slow solver tests
536551
--
537552
Test-Suite solver-quickcheck
553+
default-language: Haskell2010
554+
ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
555+
if impl(ghc >= 8.0)
556+
ghc-options: -Wcompat
557+
-Wnoncanonical-monad-instances
558+
if impl(ghc < 8.8)
559+
ghc-options: -Wnoncanonical-monadfail-instances
560+
561+
if impl(ghc >=8.10)
562+
ghc-options: -Wunused-packages
563+
564+
ghc-options: -threaded
538565
type: exitcode-stdio-1.0
539566
main-is: SolverQuickCheck.hs
540567
hs-source-dirs: tests
541-
ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -main-is SolverQuickCheck
542568
other-modules:
543569
UnitTests.Distribution.Solver.Modular.QuickCheck
544570
UnitTests.Distribution.Solver.Modular.QuickCheck.Utils
545571
build-depends:
546572
base,
547-
async,
548573
Cabal,
549574
Cabal-QuickCheck,
550575
cabal-lib-client,
551576
cabal-install-solver-dsl,
552-
containers,
553577
deepseq >= 1.2,
554578
hashable,
555579
random,
@@ -559,33 +583,35 @@ Test-Suite solver-quickcheck
559583
QuickCheck >= 2.14 && <2.15,
560584
pretty-show >= 1.6.15
561585

562-
ghc-options: -threaded
563-
564-
default-language: Haskell2010
565-
566-
567586
-- Integration tests that use the cabal-install code directly
568587
-- but still build whole projects
569588
test-suite integration-tests2
589+
default-language: Haskell2010
590+
ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
591+
if impl(ghc >= 8.0)
592+
ghc-options: -Wcompat
593+
-Wnoncanonical-monad-instances
594+
if impl(ghc < 8.8)
595+
ghc-options: -Wnoncanonical-monadfail-instances
596+
597+
if impl(ghc >=8.10)
598+
ghc-options: -Wunused-packages
599+
600+
ghc-options: -threaded
570601
type: exitcode-stdio-1.0
571602
main-is: IntegrationTests2.hs
572603
hs-source-dirs: tests
573-
ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns -main-is IntegrationTests2
574604
other-modules:
575605
build-depends:
576606
base,
577607
bytestring,
578608
Cabal,
579609
cabal-lib-client,
580610
containers,
581-
deepseq,
582611
directory,
583-
edit-distance,
584612
filepath,
585613
tasty >= 1.2.3 && <1.4,
586614
tasty-hunit >= 0.10,
587615
tagged
588616

589-
ghc-options: -threaded
590-
default-language: Haskell2010
591617

cabal-install/cabal-install.cabal.prod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ executable cabal
143143
if impl(ghc < 8.8)
144144
ghc-options: -Wnoncanonical-monadfail-instances
145145

146+
if impl(ghc >=8.10)
147+
ghc-options: -Wunused-packages
148+
146149

147150
ghc-options: -rtsopts -threaded
148151

@@ -353,7 +356,6 @@ executable cabal
353356
HTTP >= 4000.1.5 && < 4000.4,
354357
mtl >= 2.0 && < 2.3,
355358
network-uri >= 2.6.0.2 && < 2.7,
356-
network >= 2.6 && < 3.2,
357359
pretty >= 1.1 && < 1.2,
358360
process >= 1.2.3.0 && < 1.7,
359361
random >= 1 && < 1.2,

0 commit comments

Comments
 (0)