From dd2b21ce786f4c1b722bda270348597182153c8e Mon Sep 17 00:00:00 2001 From: Roberto Bayardo Date: Tue, 1 Oct 2024 12:19:34 -0700 Subject: [PATCH] make check-interfaces.sh warn on old versions of bash (#12220) --- .../contracts-bedrock/scripts/checks/check-interfaces.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/contracts-bedrock/scripts/checks/check-interfaces.sh b/packages/contracts-bedrock/scripts/checks/check-interfaces.sh index 2a4a566f34e9..24c584690f10 100755 --- a/packages/contracts-bedrock/scripts/checks/check-interfaces.sh +++ b/packages/contracts-bedrock/scripts/checks/check-interfaces.sh @@ -1,6 +1,12 @@ #!/usr/bin/env bash set -euo pipefail +# Warn users of Mac OSX who have not ever upgraded bash from the default that they may experience +# performance issues. +if [ "${BASH_VERSINFO[0]}" -lt 5 ]; then + echo "WARNING: your bash installation is very old, and may cause this script to run extremely slowly. Please upgrade bash to at least version 5 if you have performance issues." +fi + # This script checks for ABI consistency between interfaces and their corresponding contracts. # It compares the ABIs of interfaces (files starting with 'I') with their implementation contracts, # excluding certain predefined files. Constructors are expected to be represented in interfaces by a