Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add output saying how to get the right noir version #2622

Merged
merged 3 commits into from
Oct 3, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions yarn-project/noir-contracts/scripts/nargo_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ nargo_check() {
EXPECTED_VERSION=$(jq -r '.commit' ../noir-compiler/src/noir-version.json)
FOUND_VERSION=$(nargo --version | grep -o 'git version hash: [0-9a-f]*' | cut -d' ' -f4)
if [ "$EXPECTED_VERSION" != "$FOUND_VERSION" ]; then
echo "Expected nargo version $EXPECTED_VERSION but found version $FOUND_VERSION. Aborting."
exit 1
echo "Expected nargo version $EXPECTED_VERSION but found version $FOUND_VERSION. Aborting."

# Get the directory of the script and the parent directory, where its meant to be run
SCRIPT_DIR="$(dirname "$(realpath "$0")")"
PARENT_DIR="$(dirname "$SCRIPT_DIR")"

# bootstrap.sh calls this non-interactively, so we can't just ask for confirmation to autorun this script.
echo "To fix the version issue, you can run the following command:"
echo "cd $PARENT_DIR && scripts/install_noir.sh"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if its too aggressive to automatically run this for the user

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question I have, is this script run in the aztec-cli, or is it just for us?

Copy link
Contributor Author

@dan-aztec dan-aztec Oct 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good q... i don't see any reference to this in the CLI (just bash calls)!

image

exit 1
fi
}