Skip to content

Commit

Permalink
Pass --ignore-environment to nix dev shells in performance scripts (#…
Browse files Browse the repository at this point in the history
…4041)

Due to recent packaging changes to the blockchain plugin, the KEVM
performance script started to fail as it was using libraries provided by
brew and not nix on my local machine. The fix is to call `nix develop`
with `--ignore-environment`, which purges the path of any non-nix paths.
In general it is good practice to do this in any dev shells we call in
one of these scripts, as there is less likelihood of similar issues
arising.
  • Loading branch information
goodlyrottenapple committed Aug 20, 2024
1 parent 4c10181 commit b9e677d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scripts/performance-tests-kevm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ trap "exit 1" HUP INT PIPE QUIT TERM
trap clean_up EXIT

feature_shell() {
GC_DONT_GC=1 nix develop . --extra-experimental-features 'nix-command flakes' --override-input k-framework/haskell-backend $SCRIPT_DIR/../ --command bash -c "$1"
GC_DONT_GC=1 nix develop . --extra-experimental-features 'nix-command flakes' --override-input k-framework/haskell-backend $SCRIPT_DIR/../ --ignore-environment --command bash -c "$1"
}

master_shell() {
GC_DONT_GC=1 nix develop . --extra-experimental-features 'nix-command flakes' --override-input k-framework/haskell-backend github:runtimeverification/haskell-backend/$MASTER_COMMIT --command bash -c "$1"
GC_DONT_GC=1 nix develop . --extra-experimental-features 'nix-command flakes' --override-input k-framework/haskell-backend github:runtimeverification/haskell-backend/$MASTER_COMMIT --ignore-environment --command bash -c "$1"
}

cd $TEMPD
Expand Down
4 changes: 2 additions & 2 deletions scripts/performance-tests-kontrol.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ sed -i'' -e "s|'forge', 'build'|'forge', 'build', '--no-auto-detect'|g" src/test
poetry lock --no-update

feature_shell() {
GC_DONT_GC=1 nix develop . --extra-experimental-features 'nix-command flakes' --override-input kevm/k-framework/haskell-backend $SCRIPT_DIR/../ --command bash -c "$1"
GC_DONT_GC=1 nix develop . --extra-experimental-features 'nix-command flakes' --override-input kevm/k-framework/haskell-backend $SCRIPT_DIR/../ --ignore-environment --command bash -c "$1"
}

master_shell() {
GC_DONT_GC=1 nix develop . --extra-experimental-features 'nix-command flakes' --override-input kevm/k-framework/haskell-backend github:runtimeverification/haskell-backend/$MASTER_COMMIT --command bash -c "$1"
GC_DONT_GC=1 nix develop . --extra-experimental-features 'nix-command flakes' --override-input kevm/k-framework/haskell-backend github:runtimeverification/haskell-backend/$MASTER_COMMIT --ignore-environment --command bash -c "$1"
}

# kompile Kontrol's K dependencies
Expand Down

0 comments on commit b9e677d

Please sign in to comment.