From c549aba8b8ec9eac23884103d2850ab49b81537a Mon Sep 17 00:00:00 2001 From: Mate Soos Date: Fri, 16 Feb 2024 12:47:57 +0100 Subject: [PATCH] Using with-utf8 so we don't encounter weird utf8 issues anymore --- CHANGELOG.md | 1 + cli/cli.hs | 3 ++- hevm.cabal | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0d2a3d1d..0094a7512 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Traces now correctly perform source mapping to display contract details - Event traces now correctly display indexed arguments and argument names - JSON reading of foundry JSONs was dependent on locale and did not work with many locales. +- cli.hs now uses with-utf8 so no release binary will have locale issues anymore ## [0.52.0] - 2023-10-26 diff --git a/cli/cli.hs b/cli/cli.hs index 48e076915..7dfa31c92 100644 --- a/cli/cli.hs +++ b/cli/cli.hs @@ -26,6 +26,7 @@ import Paths_hevm qualified as Paths import System.Directory (withCurrentDirectory, getCurrentDirectory, doesDirectoryExist, makeAbsolute) import System.FilePath (()) import System.Exit (exitFailure, exitWith, ExitCode(..)) +import Main.Utf8 (withUtf8) import EVM (initialContract, abstractContract, makeVm) import EVM.ABI (Sig(..)) @@ -197,7 +198,7 @@ getFullVersion = showVersion Paths.version <> " [" <> gitVersion <> "]" Left _ -> "no git revision present" main :: IO () -main = do +main = withUtf8 $ do cmd <- Options.unwrapRecord "hevm -- Ethereum evaluator" let env = Env { config = defaultConfig { dumpQueries = cmd.smtdebug diff --git a/hevm.cabal b/hevm.cabal index b07cf56e7..e4add419f 100644 --- a/hevm.cabal +++ b/hevm.cabal @@ -236,7 +236,8 @@ executable hevm optics-core, githash >= 0.1.6 && < 0.2, witch, - unliftio-core + unliftio-core, + with-utf8 >= 1.0.0.0 if os(windows) buildable: False