diff --git a/.github/container-linux-static/Dockerfile b/.github/container-linux-static/Dockerfile index 9ab126465..dfd7680f8 100644 --- a/.github/container-linux-static/Dockerfile +++ b/.github/container-linux-static/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.18.6 +FROM alpine:3.18.9 # Based on https://github.com/fpco/alpine-haskell-stack/blob/9.2.8v2/ghc-Dockerfile RUN apk upgrade --no-cache &&\ @@ -27,7 +27,7 @@ RUN apk upgrade --no-cache &&\ lld \ shadow # for stack --docker, provides groupadd -RUN curl -sSLo /usr/local/bin/stack https://github.com/commercialhaskell/stack/releases/download/v2.13.1/stack-2.13.1-linux-x86_64-bin && \ +RUN curl -sSLo /usr/local/bin/stack https://github.com/commercialhaskell/stack/releases/download/v3.1.1/stack-3.1.1-linux-x86_64-bin && \ chmod +x /usr/local/bin/stack # https://stackoverflow.com/a/41517423 @@ -36,12 +36,12 @@ RUN ln -s /usr/lib/libncurses.a /usr/lib/libtinfo.a COPY stack-config.yaml /root/.stack/config.yaml RUN cd /tmp && \ - curl -sSLo /tmp/ghc.tar.xz https://downloads.haskell.org/~ghc/9.6.5/ghc-9.6.5-x86_64-alpine3_12-linux.tar.xz && \ + curl -sSLo /tmp/ghc.tar.xz https://downloads.haskell.org/~ghc/9.8.2/ghc-9.8.2-x86_64-alpine3_12-linux.tar.xz && \ tar xf ghc.tar.xz && \ - cd ghc-9.6.5-x86_64-unknown-linux && \ + cd ghc-9.8.2-x86_64-unknown-linux && \ ./configure --prefix=/usr/local && \ make install && \ - rm -rf /tmp/ghc.tar.xz /tmp/ghc-9.6.5-x86_64-unknown-linux + rm -rf /tmp/ghc.tar.xz /tmp/ghc-9.8.2-x86_64-unknown-linux RUN apk upgrade --no-cache &&\ apk add --no-cache \ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 756de78e3..7b1107ddf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: include: - os: ubuntu-20.04 shell: bash - container: "{\"image\": \"elopeztob/alpine-haskell-stack-echidna:ghc-9.6.5\", \"options\": \"--user 1001\"}" + container: "{\"image\": \"elopeztob/alpine-haskell-stack-echidna:ghc-9.8.2\", \"options\": \"--user 1001\"}" - os: macos-13 # x86_64 macOS shell: bash - os: windows-latest @@ -64,7 +64,7 @@ jobs: id: stack if: matrix.container == '' with: - ghc-version: '9.6.5' + ghc-version: '9.8.2' enable-stack: true stack-version: 'latest' @@ -90,7 +90,7 @@ jobs: echo "- $HOME/.local/lib"; echo; echo "ghc-options:"; - echo ' "$locals": -Werror' + echo ' "$locals": -Werror -Wno-error=x-partial' "$REPLACE_LINKER_WIN" && echo ' "$everything": -pgml='$(cygpath -m "$GHC_MINGW_PATH/bin/clang.exe"); echo; "$SKIP_MSYS" && echo "skip-msys: true" || true @@ -156,12 +156,12 @@ jobs: - name: Build Dependencies run: | export PATH="$HASKELL_PATHS:$PATH" - stack build --ghc-options="-Werror" --only-dependencies + stack build --ghc-options="-Werror -Wno-error=x-partial" --only-dependencies - name: Build and install echidna run: | export PATH="$HASKELL_PATHS:$PATH" - stack install --ghc-options="-Werror" + stack install --ghc-options="-Werror -Wno-error=x-partial" - name: Amend and compress binaries (macOS) if: runner.os == 'macOS' @@ -185,7 +185,7 @@ jobs: if: runner.os != 'macOS' run: | export PATH="$HASKELL_PATHS:$PATH" - stack build --test --no-run-tests --ghc-options="-Werror" + stack build --test --no-run-tests --ghc-options="-Werror -Wno-error=x-partial" cp "$(find "$PWD" -name 'echidna-testsuite*' -type f)" . - name: Upload testsuite diff --git a/flake.lock b/flake.lock index a44f65c89..0f51596ee 100644 --- a/flake.lock +++ b/flake.lock @@ -70,11 +70,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1726436956, - "narHash": "sha256-a3rP7uafX/qBFX0y4CGS8vvTPvxsLl9eZQ85DkIn3DI=", + "lastModified": 1733229606, + "narHash": "sha256-FLYY5M0rpa5C2QAE3CKLYAM6TwbKicdRK6qNrSHlNrE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "039b72d0c738c934e2e36d7fc5520d1b425287a6", + "rev": "566e53c2ad750c84f6d31f9ccb9d00f823165550", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index df0d42800..8b3eca0b6 100644 --- a/flake.nix +++ b/flake.nix @@ -38,22 +38,25 @@ ncurses-static = pkgsStatic.ncurses.override { enableStatic = true; }; hsPkgs = ps : - ps.haskellPackages.override { + ps.haskell.packages.ghc98.override { overrides = hfinal: hprev: { - with-utf8 = - if (with ps.stdenv; hostPlatform.isDarwin && hostPlatform.isx86) - then ps.haskell.lib.compose.overrideCabal (_ : { extraLibraries = [ps.libiconv]; }) hprev.with-utf8 - else hprev.with-utf8; - # TODO: temporary fix for static build which is still on 9.4 - witch = ps.haskell.lib.doJailbreak hprev.witch; + with-utf8 = ps.haskell.lib.compose.overrideCabal (drv: { + version = "1.1.0.0"; + src = pkgs.fetchFromGitHub { + owner = "serokell"; + repo = "haskell-with-utf8"; + rev = "cf6e31475da3d9f54439650a70170819daa35f54"; + sha256 = "sha256-hxUiZbbcA6RvrVgGk4Vbt/rZT6wnBF3bfYbbQflzQ24="; + }; + }) hprev.with-utf8; }; }; hevm = pkgs: pkgs.lib.pipe ((hsPkgs pkgs).callCabal2nix "hevm" (pkgs.fetchFromGitHub { owner = "ethereum"; repo = "hevm"; - rev = "release/0.54.2"; - sha256 = "sha256-h0e6QeMBIUkyANYdrGjrqZ2M4fnODOB0gNPQtsrAiL8="; + rev = "53bccde13eeb6712eb9bc1d99b53529614a33690"; + sha256 = "sha256-sd7DEWz7hrs8AO+0juFz5S7Y5l/cWmQmullFeJH7FeE="; }) { secp256k1 = pkgs.secp256k1; }) ([ pkgs.haskell.lib.compose.dontCheck @@ -65,7 +68,7 @@ # FIXME: figure out solc situation, it conflicts with the one from # solc-select that is installed with slither, disable tests in the meantime haskell.lib.compose.dontCheck - (haskell.lib.compose.addTestToolDepends [ haskellPackages.hpack slither-analyzer solc ]) + (haskell.lib.compose.addTestToolDepends [ (hsPkgs pkgs).hpack slither-analyzer solc ]) (haskell.lib.compose.disableCabalFlag "static") ]); @@ -148,7 +151,7 @@ packages.echidna-redistributable = echidnaRedistributable; devShell = with pkgs; - haskellPackages.shellFor { + (hsPkgs pkgs).shellFor { packages = _: [ (echidna pkgs) ]; shellHook = '' hpack @@ -156,9 +159,9 @@ buildInputs = [ solc slither-analyzer - haskellPackages.hlint - haskellPackages.cabal-install - haskellPackages.haskell-language-server + (hsPkgs pkgs).hlint + (hsPkgs pkgs).cabal-install + (hsPkgs pkgs).haskell-language-server ]; withHoogle = true; }; diff --git a/stack.yaml b/stack.yaml index 3594dc184..ec905e40d 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,11 +1,11 @@ -resolver: lts-22.34 +resolver: nightly-2024-10-21 packages: - '.' extra-deps: - git: https://github.com/ethereum/hevm.git - commit: 037ff11779d0089378f01cb103db1171dc642be2 + commit: 53bccde13eeb6712eb9bc1d99b53529614a33690 - smt2-parser-0.1.0.1@sha256:1e1a4565915ed851c13d1e6b8bb5185cf5d454da3b43170825d53e221f753d77,1421 - spawn-0.3@sha256:b91e01d8f2b076841410ae284b32046f91471943dc799c1af77d666c72101f02,1162