Skip to content

Commit

Permalink
Merge pull request #518 from hellwolf/warn-unused-packages
Browse files Browse the repository at this point in the history
using -Wunused-packages to eliminate unused deps
  • Loading branch information
msooseth authored Aug 1, 2024
2 parents 03d1bf4 + e43b66f commit cad8b5c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 47 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
as the only check is that the size allocated is less than $2**{64}$, but that is too large to fit in memory. Now,
we check more stringently, and still return an IllegalOverflow
- Fixed `--root` option for the `test` subcommand
- Use `-Wunused-packages` and eliminate unused deps.

## Added

Expand Down
66 changes: 19 additions & 47 deletions hevm.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,13 @@ source-repository head

common shared
if flag(ci)
ghc-options: -Werror
ghc-options:
-Werror
-- FIXME: we have to disable this, due to ghc bug: https://gitlab.haskell.org/ghc/ghc/-/issues/24120
-Wno-unused-packages
if flag(devel)
ghc-options: -j
ghc-options:
-j
if flag(debug)
ghc-options:
-j
Expand All @@ -66,6 +70,7 @@ common shared
-Wno-unticked-promoted-constructors
-Wno-orphans
-Wno-ambiguous-fields
-Wunused-packages
-optc-Wno-ignored-attributes
-fspecialize-aggressively
-fexpose-all-unfoldings
Expand Down Expand Up @@ -136,10 +141,8 @@ library
build-depends:
system-cxx-std-lib >= 1.0 && < 2.0,
QuickCheck >= 2.13.2 && < 2.15,
quickcheck-text >= 0.1.2 && < 0.2,
Decimal >= 0.5.1 && < 0.6,
containers >= 0.6.0 && < 0.7,
time >= 1.11 && < 1.14,
transformers >= 0.5 && < 0.7,
tree-view >= 0.5 && < 0.6,
aeson >= 2.0.0 && < 2.2,
Expand All @@ -152,7 +155,6 @@ library
base16 >= 1.0 && < 1.1,
megaparsec >= 9.0.0 && < 10.0,
mtl >= 2.2 && < 2.4,
directory >= 1.3.3 && < 1.4,
filepath >= 1.4.2 && < 1.5,
cereal >= 0.5.8 && < 0.6,
cryptonite >= 0.30 && < 0.31,
Expand All @@ -168,7 +170,6 @@ library
optparse-generic >= 1.3.1 && < 1.6,
pretty-hex >= 1.1 && < 1.2,
rosezipper >= 0.2 && < 0.3,
witherable >= 0.3.5 && < 0.5,
wreq >= 0.5.3 && < 0.6,
regex-tdfa >= 1.2.3 && < 1.4,
base >= 4.9 && < 5,
Expand All @@ -195,30 +196,14 @@ executable hevm
autogen-modules:
Paths_hevm
build-depends:
QuickCheck,
aeson,
async,
base,
base16,
binary,
bytestring,
containers,
cryptonite,
data-dword,
directory,
filepath,
hevm,
mtl,
optparse-generic,
operational,
process,
quickcheck-text,
regex-tdfa,
temporary,
text,
vector,
stm,
spawn,
optics-core,
githash,
witch,
Expand All @@ -236,39 +221,27 @@ common test-base
autogen-modules:
Paths_hevm
build-depends:
HUnit,
QuickCheck,
quickcheck-instances,
aeson,
base,
base16,
binary,
containers,
directory,
bytestring,
filemanip,
filepath,
here,
hevm,
here,
mtl,
data-dword,
process,
tasty,
tasty-hunit,
tasty-quickcheck,
tasty-expected-failure,
temporary,
text,
regex-tdfa,
regex,
time,
array,
vector,
tasty-bench,
stm,
spawn,
witherable,
smt2-parser,
operational,
optics-core,
optics-extra,
Expand All @@ -277,16 +250,14 @@ common test-base
exceptions

library test-utils
import:
test-base
import: test-base
exposed-modules:
EVM.Test.Utils
EVM.Test.Tracing
EVM.Test.BlockchainTests

common test-common
import:
test-base
import: test-base
if flag(devel)
ghc-options: -threaded -with-rtsopts=-N
build-depends:
Expand All @@ -299,26 +270,29 @@ common test-common
--- Test Suites ---

test-suite test
import:
test-common
import: test-common
type:
exitcode-stdio-1.0
main-is:
test.hs
build-depends:
base16,
binary,
data-dword,
time,
regex

-- these tests require network access so we split them into a separate test
-- suite to make it easy to skip them when running nix-build
test-suite rpc-tests
import:
test-common
import: test-common
type:
exitcode-stdio-1.0
main-is:
rpc.hs

test-suite ethereum-tests
import:
test-common
import: test-common
type:
exitcode-stdio-1.0
main-is:
Expand Down Expand Up @@ -347,10 +321,8 @@ benchmark bench
bytestring,
text,
hevm,
here,
test-utils,
filemanip,
filepath,
containers,
mtl,
unliftio-core

0 comments on commit cad8b5c

Please sign in to comment.