From 9a19f35a2cce138c05a05984aea85d4cf9370a54 Mon Sep 17 00:00:00 2001 From: Charlie Lye Date: Sun, 31 Mar 2024 10:18:11 +0000 Subject: [PATCH] feat: Tell user they need to pip install clang. --- barretenberg/scripts/bindgen.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/barretenberg/scripts/bindgen.sh b/barretenberg/scripts/bindgen.sh index e3d5b9b5a70c..b1c43e319b3c 100755 --- a/barretenberg/scripts/bindgen.sh +++ b/barretenberg/scripts/bindgen.sh @@ -1,6 +1,15 @@ #!/usr/bin/env bash set -eu +if ! pip list | grep -E 'clang\s+16.0.6' > /dev/null; then + echo "You need to install python clang: pip install clang==16.0.6" + exit 1 +fi + #find ./cpp/src -type f -name "c_bind*.hpp" | ./scripts/decls_json.py > exports.json cat ./scripts/c_bind_files.txt | ./scripts/decls_json.py > exports.json -(cd ./ts && yarn node --loader ts-node/esm ./src/bindgen/index.ts ../exports.json > ./src/barretenberg_api/index.ts) \ No newline at end of file +( + cd ./ts && \ + yarn node --loader ts-node/esm ./src/bindgen/index.ts ../exports.json > ./src/barretenberg_api/index.ts && \ + yarn prettier -w ./src/barretenberg_api/index.ts +) \ No newline at end of file