echidna: 2.0.3 -> 2.0.4
This commit is contained in:
parent
d240db171b
commit
05f0b0614b
|
@ -1,39 +1,32 @@
|
||||||
{ lib
|
{ lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
# Haskell deps
|
# Haskell deps
|
||||||
, mkDerivation, aeson, ansi-terminal, base, base16-bytestring, binary, brick
|
, mkDerivation, aeson, base, base16-bytestring, binary, brick, bytestring
|
||||||
, bytestring, cborg, containers, data-dword, data-has, deepseq, directory
|
, containers, data-dword, data-has, directory, exceptions, extra, filepath
|
||||||
, exceptions, filepath, hashable, hevm, hpack, lens, lens-aeson, megaparsec
|
, hashable, hevm, hpack, html-entities, lens, ListLike, MonadRandom, mtl
|
||||||
, MonadRandom, mtl, optparse-applicative, process, random, stm, tasty
|
, optparse-applicative, process, random, semver, tasty, tasty-hunit
|
||||||
, tasty-hunit, tasty-quickcheck, temporary, text, transformers , unix, unliftio
|
, tasty-quickcheck, text, transformers, unix, unliftio, unordered-containers
|
||||||
, unliftio-core, unordered-containers, vector, vector-instances, vty
|
, vector, vector-instances, vty, yaml
|
||||||
, wl-pprint-annotated, word8, yaml, extra, ListLike, semver
|
|
||||||
}:
|
}:
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
pname = "echidna";
|
pname = "echidna";
|
||||||
version = "2.0.3";
|
version = "2.0.4";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "crytic";
|
owner = "crytic";
|
||||||
repo = "echidna";
|
repo = "echidna";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-ZLk3K00O6aERf+G5SagDVUk1/ba9U+9n9dqCImkczJs=";
|
sha256 = "sha256-DiEZGbd08QLP8zgrIssGYL6h18AprcWZSYp1mMu9TRw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# NOTE: echidna is behind with aeson because of hevm, this patch updates
|
|
||||||
# the code to work with the major aeson update that broke the build
|
|
||||||
# it's temporary until hevm version 0.50.0 is released - https://github.com/ethereum/hevm/milestone/1
|
|
||||||
patches = [ ./echidna-update-aeson.patch ];
|
|
||||||
|
|
||||||
isLibrary = true;
|
isLibrary = true;
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
libraryHaskellDepends = [
|
libraryHaskellDepends = [
|
||||||
aeson ansi-terminal base base16-bytestring binary brick bytestring cborg
|
aeson base base16-bytestring binary brick bytestring containers data-dword
|
||||||
containers data-dword data-has deepseq directory exceptions filepath
|
data-has directory exceptions extra filepath hashable hevm html-entities
|
||||||
hashable hevm lens lens-aeson megaparsec MonadRandom mtl
|
lens ListLike MonadRandom mtl optparse-applicative process random semver
|
||||||
optparse-applicative process random stm temporary text transformers unix
|
text transformers unix unliftio unordered-containers vector vector-instances
|
||||||
unliftio unliftio-core unordered-containers vector vector-instances vty
|
vty yaml
|
||||||
wl-pprint-annotated word8 yaml extra ListLike semver
|
|
||||||
];
|
];
|
||||||
libraryToolDepends = [ hpack ];
|
libraryToolDepends = [ hpack ];
|
||||||
executableHaskellDepends = libraryHaskellDepends;
|
executableHaskellDepends = libraryHaskellDepends;
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
diff --git a/lib/Echidna/Config.hs b/lib/Echidna/Config.hs
|
|
||||||
index f8d5777..3d761fe 100644
|
|
||||||
--- a/lib/Echidna/Config.hs
|
|
||||||
+++ b/lib/Echidna/Config.hs
|
|
||||||
@@ -13,8 +13,8 @@ import Control.Monad.State (StateT(..), runStateT)
|
|
||||||
import Control.Monad.Trans (lift)
|
|
||||||
import Data.Bool (bool)
|
|
||||||
import Data.Aeson
|
|
||||||
+import Data.Aeson.KeyMap (keys)
|
|
||||||
import Data.Has (Has(..))
|
|
||||||
-import Data.HashMap.Strict (keys)
|
|
||||||
import Data.HashSet (fromList, insert, difference)
|
|
||||||
import Data.Maybe (fromMaybe)
|
|
||||||
import Data.Text (isPrefixOf)
|
|
||||||
@@ -23,11 +23,13 @@ import EVM.Types (w256)
|
|
||||||
|
|
||||||
import qualified Control.Monad.Fail as M (MonadFail(..))
|
|
||||||
import qualified Data.ByteString as BS
|
|
||||||
+import qualified Data.Aeson.Key as Key
|
|
||||||
+import qualified Data.HashSet as HS
|
|
||||||
import qualified Data.List.NonEmpty as NE
|
|
||||||
import qualified Data.Yaml as Y
|
|
||||||
|
|
||||||
import Echidna.Test
|
|
||||||
-import Echidna.Types.Campaign
|
|
||||||
+import Echidna.Types.Campaign
|
|
||||||
import Echidna.Mutator.Corpus (defaultMutationConsts)
|
|
||||||
import Echidna.Types.Config (EConfigWithUsage(..), EConfig(..))
|
|
||||||
import Echidna.Types.Solidity
|
|
||||||
@@ -52,7 +54,7 @@ instance FromJSON EConfigWithUsage where
|
|
||||||
_ -> mempty
|
|
||||||
(c, ks) <- runStateT (parser v') $ fromList []
|
|
||||||
let found = fromList (keys v')
|
|
||||||
- return $ EConfigWithUsage c (found `difference` ks) (ks `difference` found)
|
|
||||||
+ return $ EConfigWithUsage c (HS.map Key.toText $ found `difference` ks) (HS.map Key.toText $ ks `difference` found)
|
|
||||||
-- this parser runs in StateT and comes equipped with the following
|
|
||||||
-- equivalent unary operators:
|
|
||||||
-- x .:? k (Parser) <==> x ..:? k (StateT)
|
|
Loading…
Reference in a new issue