From 07165fa7476b76e6fd2dd07a1f07cc991f7f82de Mon Sep 17 00:00:00 2001 From: ananas Date: Tue, 7 Oct 2025 19:21:27 +0100 Subject: [PATCH] chore(program-libs): bump versions --- Cargo.lock | 6 +++--- Cargo.toml | 6 +++--- program-libs/indexed-array/Cargo.toml | 2 +- program-tests/merkle-tree/Cargo.toml | 2 +- scripts/detect-version-changes.sh | 4 ++-- scripts/validate-packages.sh | 27 ++++++++++++++++++++------- sparse-merkle-tree/Cargo.toml | 3 +-- 7 files changed, 31 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b2ca2729da..fc1479e877 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3584,7 +3584,7 @@ dependencies = [ [[package]] name = "light-indexed-array" -version = "0.1.0" +version = "0.2.0" dependencies = [ "light-hasher", "num-bigint 0.4.6", @@ -3638,7 +3638,7 @@ dependencies = [ [[package]] name = "light-merkle-tree-reference" -version = "3.0.0" +version = "3.0.1" dependencies = [ "light-hasher", "light-indexed-array", @@ -3856,7 +3856,7 @@ dependencies = [ [[package]] name = "light-sparse-merkle-tree" -version = "0.1.0" +version = "0.2.0" dependencies = [ "light-hasher", "light-indexed-array", diff --git a/Cargo.toml b/Cargo.toml index 2dcd9aa4f9..e985b974dc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -157,11 +157,11 @@ ark-std = "0.5" light-hash-set = { version = "3.0.0", path = "program-libs/hash-set" } light-indexed-merkle-tree = { version = "3.0.0", path = "program-libs/indexed-merkle-tree" } light-concurrent-merkle-tree = { version = "3.0.0", path = "program-libs/concurrent-merkle-tree" } -light-sparse-merkle-tree = { version = "0.1.0", path = "sparse-merkle-tree" } +light-sparse-merkle-tree = { version = "0.2.0", path = "sparse-merkle-tree" } light-client = { path = "sdk-libs/client", version = "0.14.0" } light-hasher = { path = "program-libs/hasher", version = "4.0.0" } light-macros = { path = "program-libs/macros", version = "2.1.0" } -light-merkle-tree-reference = { path = "program-tests/merkle-tree", version = "3.0.0" } +light-merkle-tree-reference = { path = "program-tests/merkle-tree", version = "3.0.1" } light-heap = { path = "program-libs/heap", version = "2.0.0" } light-prover-client = { path = "prover/client", version = "2.0.0" } light-sdk = { path = "sdk-libs/sdk", version = "0.13.0" } @@ -199,7 +199,7 @@ light-bloom-filter = { path = "program-libs/bloom-filter", version = "0.4.0" } light-bounded-vec = { version = "2.0.0" } light-poseidon = { version = "0.3.0" } light-test-utils = { path = "program-tests/utils", version = "1.2.1" } -light-indexed-array = { path = "program-libs/indexed-array", version = "0.1.0" } +light-indexed-array = { path = "program-libs/indexed-array", version = "0.2.0" } light-program-profiler = { version = "0.1.0" } create-address-program-test = { path = "program-tests/create-address-test-program", version = "1.0.0" } groth16-solana = { version = "0.2.0" } diff --git a/program-libs/indexed-array/Cargo.toml b/program-libs/indexed-array/Cargo.toml index 39e8f5d16b..2d97b73842 100644 --- a/program-libs/indexed-array/Cargo.toml +++ b/program-libs/indexed-array/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "light-indexed-array" -version = "0.1.0" +version = "0.2.0" description = "Implementation of indexed (and concurrent) Merkle tree in Rust" repository = "https://github.com/Lightprotocol/light-protocol" license = "Apache-2.0" diff --git a/program-tests/merkle-tree/Cargo.toml b/program-tests/merkle-tree/Cargo.toml index 0eb9ea3edf..e56557b832 100644 --- a/program-tests/merkle-tree/Cargo.toml +++ b/program-tests/merkle-tree/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "light-merkle-tree-reference" -version = "3.0.0" +version = "3.0.1" description = "Non-sparse reference Merkle tree implementation" repository = "https://github.com/Lightprotocol/light-protocol" license = "Apache-2.0" diff --git a/scripts/detect-version-changes.sh b/scripts/detect-version-changes.sh index cf02d14df9..2bfdd0ec6c 100755 --- a/scripts/detect-version-changes.sh +++ b/scripts/detect-version-changes.sh @@ -29,8 +29,8 @@ else DIFF_ARGS=("$BASE_REF...$HEAD_REF") fi -# Get list of changed Cargo.toml files in program-libs, sdk-libs, and program-tests/merkle-tree -for file in $(git diff "${DIFF_ARGS[@]}" --name-only -- '**/Cargo.toml' | grep -E '(program-libs|sdk-libs|program-tests/merkle-tree)/'); do +# Get list of changed Cargo.toml files in program-libs, sdk-libs, program-tests/merkle-tree, and sparse-merkle-tree +for file in $(git diff "${DIFF_ARGS[@]}" --name-only -- '**/Cargo.toml' | grep -E '(program-libs|sdk-libs|program-tests/merkle-tree|sparse-merkle-tree)/'); do # Extract old and new version from the diff versions=$(git diff "${DIFF_ARGS[@]}" -- "$file" | grep -E '^\+version|^-version' | grep -v '+++\|---') old_ver=$(echo "$versions" | grep '^-version' | head -1 | awk -F'"' '{print $2}') diff --git a/scripts/validate-packages.sh b/scripts/validate-packages.sh index cdec076f29..226965407b 100755 --- a/scripts/validate-packages.sh +++ b/scripts/validate-packages.sh @@ -48,20 +48,33 @@ done echo "" if [ -n "$EXECUTE_FLAG" ]; then - echo "Running: cargo publish $PACKAGE_ARGS --no-verify" + echo "Running: cargo check (all packages) then cargo release publish $PACKAGE_ARGS --execute --no-confirm --no-verify" else - echo "Running: cargo publish $PACKAGE_ARGS --dry-run" + echo "Running: cargo check (all packages) then cargo publish $PACKAGE_ARGS --dry-run --allow-dirty --no-verify" fi echo "----------------------------------------" # Native cargo 1.90.0+ handles dependency ordering for interdependent workspace crates + +# First: Always run compilation check to catch errors +echo "" +echo "Running compilation check..." +for pkg in "${PACKAGES[@]}"; do + echo " Checking $pkg..." + if ! cargo check -p "$pkg" --all-features 2>&1 | tail -20; then + echo "Error: Compilation check failed for $pkg" + exit 1 + fi +done +echo "✓ All packages compile successfully" +echo "" + +# Then: Either publish or dry-run if [ -n "$EXECUTE_FLAG" ]; then - # Actual publish to crates.io using native cargo - # Skip verification to avoid build issues with interdependent packages - cargo publish $PACKAGE_ARGS --no-verify + # Publish with --no-verify to avoid cargo bug with unpublished deps + cargo release publish $PACKAGE_ARGS --execute --no-confirm --no-verify else - # Dry-run validation using native cargo publish - # Allow dirty state and skip verification due to cargo bug with unpublished dep hashes + # Dry-run validation - allow dirty state and skip verification cargo publish $PACKAGE_ARGS --dry-run --allow-dirty --no-verify fi diff --git a/sparse-merkle-tree/Cargo.toml b/sparse-merkle-tree/Cargo.toml index 79b6dd4525..1eb4656c2d 100644 --- a/sparse-merkle-tree/Cargo.toml +++ b/sparse-merkle-tree/Cargo.toml @@ -1,11 +1,10 @@ [package] name = "light-sparse-merkle-tree" -version = "0.1.0" +version = "0.2.0" description = "Implementation of a sparse indexed (and concurrent) Merkle tree in Rust" repository = "https://github.com/Lightprotocol/light-protocol" license = "Apache-2.0" edition = "2021" -publish = false [dependencies] light-hasher = { workspace = true }