From ee332bd51fff9ffa505c4b40816c8ca39ddb69a6 Mon Sep 17 00:00:00 2001 From: Martin Minkov Date: Thu, 28 Sep 2023 13:14:45 -0300 Subject: [PATCH 1/2] feat: fix scripts to use different paths if mina is a submodule of o1js --- src/lib/crypto/kimchi_backend/common/gen_version.sh | 13 +++++++++++-- src/lib/mina_version/normal/gen.sh | 7 ++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/lib/crypto/kimchi_backend/common/gen_version.sh b/src/lib/crypto/kimchi_backend/common/gen_version.sh index 6f3c97a1971..4260551bbbf 100755 --- a/src/lib/crypto/kimchi_backend/common/gen_version.sh +++ b/src/lib/crypto/kimchi_backend/common/gen_version.sh @@ -1,8 +1,17 @@ #!/usr/bin/env bash set -e -o pipefail if [ -z ${MARLIN_REPO_SHA+x} ]; then - marlin_submodule_dir=$(git submodule status | grep proof-systems | sed 's/^[-\ ]//g' | cut -d ' ' -f 2) - marlin_repo_sha=$(cd $marlin_submodule_dir && git rev-parse --short=8 --verify HEAD) + # Check for the existence of the 'mina' submodule + git_root=$(git rev-parse --show-toplevel) + mina_submodule=$(git submodule status | grep "mina" || true) + + if [[ -n "$mina_submodule" ]]; then + marlin_submodule_dir=$(git -C "$git_root/src/mina" submodule status | grep proof-systems | sed 's/^[-\ ]//g' | cut -d ' ' -f 2) + marlin_repo_sha=$(git -C "$git_root/src/mina/$marlin_submodule_dir" rev-parse --short=8 --verify HEAD) + else + marlin_submodule_dir=$(git submodule status | grep proof-systems | sed 's/^[-\ ]//g' | cut -d ' ' -f 2) + marlin_repo_sha=$(git -C "$marlin_submodule_dir" rev-parse --short=8 --verify HEAD) + fi else marlin_repo_sha=$(cut -b -8 <<< "$MARLIN_REPO_SHA") fi diff --git a/src/lib/mina_version/normal/gen.sh b/src/lib/mina_version/normal/gen.sh index ee45e3683ec..ad34bfa5b6c 100755 --- a/src/lib/mina_version/normal/gen.sh +++ b/src/lib/mina_version/normal/gen.sh @@ -12,7 +12,12 @@ pushd "$root" > /dev/null if [[ -e .git ]] && ! git diff --quiet; then id="[DIRTY]$id"; fi commit_date="${MINA_COMMIT_DATE-$(git show HEAD -s --format="%cI" || echo "")}" - pushd src/lib/crypto/proof-systems > /dev/null + mina_submodule=$(git submodule status | grep "mina" || true) + if [[ -n "$mina_submodule" ]]; then + pushd src/mina/src/lib/crypto/proof-systems > /dev/null + else + pushd src/lib/crypto/proof-systems > /dev/null + fi marlin_commit_id="${MARLIN_COMMIT_ID-$(git rev-parse --verify HEAD || echo "")}" marlin_commit_id_short="$(printf '%s' "$marlin_commit_id" | cut -c1-8)" if [[ -e .git ]] && ! git diff --quiet; then marlin_commit_id="[DIRTY]$marlin_commit_id"; fi From 4f20eb65c1f0f6c0b7e8c55a07ff592fbc22f974 Mon Sep 17 00:00:00 2001 From: Martin Minkov Date: Wed, 11 Oct 2023 10:37:37 -0700 Subject: [PATCH 2/2] fix(libp2p_ipc/dune): update compiler flags to suppress warnings -53-55 --- src/libp2p_ipc/dune | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libp2p_ipc/dune b/src/libp2p_ipc/dune index 9819684e44c..a1e76f17f01 100644 --- a/src/libp2p_ipc/dune +++ b/src/libp2p_ipc/dune @@ -1,7 +1,7 @@ (library (name libp2p_ipc) (public_name libp2p_ipc) - (flags -w -53) + (flags -w -53-55) (inline_tests (flags -verbose -show-counts)) (libraries ;; opam libraries