Merge pull request #202542 from arcz/echidna-2.0.4
echidna: 2.0.3 -> 2.0.4
This commit is contained in:
commit
42aae6fa74
2 changed files with 13 additions and 58 deletions
|
@ -1,39 +1,32 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
# Haskell deps
|
||||
, mkDerivation, aeson, ansi-terminal, base, base16-bytestring, binary, brick
|
||||
, bytestring, cborg, containers, data-dword, data-has, deepseq, directory
|
||||
, exceptions, filepath, hashable, hevm, hpack, lens, lens-aeson, megaparsec
|
||||
, MonadRandom, mtl, optparse-applicative, process, random, stm, tasty
|
||||
, tasty-hunit, tasty-quickcheck, temporary, text, transformers , unix, unliftio
|
||||
, unliftio-core, unordered-containers, vector, vector-instances, vty
|
||||
, wl-pprint-annotated, word8, yaml, extra, ListLike, semver
|
||||
, mkDerivation, aeson, base, base16-bytestring, binary, brick, bytestring
|
||||
, containers, data-dword, data-has, directory, exceptions, extra, filepath
|
||||
, hashable, hevm, hpack, html-entities, lens, ListLike, MonadRandom, mtl
|
||||
, optparse-applicative, process, random, semver, tasty, tasty-hunit
|
||||
, tasty-quickcheck, text, transformers, unix, unliftio, unordered-containers
|
||||
, vector, vector-instances, vty, yaml
|
||||
}:
|
||||
mkDerivation rec {
|
||||
pname = "echidna";
|
||||
version = "2.0.3";
|
||||
version = "2.0.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "crytic";
|
||||
repo = "echidna";
|
||||
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;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
aeson ansi-terminal base base16-bytestring binary brick bytestring cborg
|
||||
containers data-dword data-has deepseq directory exceptions filepath
|
||||
hashable hevm lens lens-aeson megaparsec MonadRandom mtl
|
||||
optparse-applicative process random stm temporary text transformers unix
|
||||
unliftio unliftio-core unordered-containers vector vector-instances vty
|
||||
wl-pprint-annotated word8 yaml extra ListLike semver
|
||||
aeson base base16-bytestring binary brick bytestring containers data-dword
|
||||
data-has directory exceptions extra filepath hashable hevm html-entities
|
||||
lens ListLike MonadRandom mtl optparse-applicative process random semver
|
||||
text transformers unix unliftio unordered-containers vector vector-instances
|
||||
vty yaml
|
||||
];
|
||||
libraryToolDepends = [ hpack ];
|
||||
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