Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ light-hash-set = { version = "4.0.0", path = "program-libs/hash-set" }
light-indexed-merkle-tree = { version = "5.0.0", path = "program-libs/indexed-merkle-tree" }
light-concurrent-merkle-tree = { version = "5.0.0", path = "program-libs/concurrent-merkle-tree" }
light-sparse-merkle-tree = { version = "0.3.0", path = "sparse-merkle-tree" }
light-client = { path = "sdk-libs/client", version = "0.20.0" }
light-event = { path = "sdk-libs/event", version = "0.20.0" }
light-client = { path = "sdk-libs/client", version = "0.21.0" }
light-event = { path = "sdk-libs/event", version = "0.21.0" }
light-hasher = { path = "program-libs/hasher", version = "5.0.0", default-features = false }
light-macros = { path = "program-libs/macros", version = "2.2.0" }
light-merkle-tree-reference = { path = "program-tests/merkle-tree", version = "4.0.0" }
Expand All @@ -213,7 +213,7 @@ light-sdk = { path = "sdk-libs/sdk", version = "0.20.0" }
light-sdk-pinocchio = { path = "sdk-libs/sdk-pinocchio", version = "0.20.0" }
light-sdk-macros = { path = "sdk-libs/macros", version = "0.20.0" }
light-sdk-types = { path = "sdk-libs/sdk-types", version = "0.20.0", default-features = false }
light-compressed-account = { path = "program-libs/compressed-account", version = "0.10.0", default-features = false }
light-compressed-account = { path = "program-libs/compressed-account", version = "0.10.1", default-features = false }
light-compressible = { path = "program-libs/compressible", version = "0.5.0", default-features = false }
light-token-interface = { path = "program-libs/token-interface", version = "0.4.0" }
light-account-checks = { path = "program-libs/account-checks", version = "0.8.0", default-features = false }
Expand All @@ -233,7 +233,7 @@ light-token-types = { path = "sdk-libs/token-types", version = "0.20.0" }
light-token = { path = "sdk-libs/token-sdk", version = "0.20.0" }
light-token-pinocchio = { path = "sdk-libs/token-pinocchio", version = "0.20.0" }
light-compressed-token-sdk = { path = "sdk-libs/compressed-token-sdk", version = "0.20.0" }
light-token-client = { path = "sdk-libs/token-client", version = "0.20.0" }
light-token-client = { path = "sdk-libs/token-client", version = "0.21.0" }
light-system-program-anchor = { path = "anchor-programs/system", version = "2.0.0", features = [
"cpi",
] }
Expand All @@ -244,7 +244,7 @@ light-registry = { path = "programs/registry", version = "2.0.0", features = [
create-address-test-program = { path = "program-tests/create-address-test-program", version = "1.0.0", features = [
"cpi",
] }
light-program-test = { path = "sdk-libs/program-test", version = "0.20.0" }
light-program-test = { path = "sdk-libs/program-test", version = "0.21.0" }
light-instruction-decoder = { path = "sdk-libs/instruction-decoder", version = "0.20.0" }
light-instruction-decoder-derive = { path = "sdk-libs/instruction-decoder-derive", version = "0.2.0" }
light-batched-merkle-tree = { path = "program-libs/batched-merkle-tree", version = "0.10.0" }
Expand Down
2 changes: 1 addition & 1 deletion program-libs/compressed-account/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "light-compressed-account"
version = "0.10.0"
version = "0.10.1"
description = "Compressed account struct and common utility functions used in Light Protocol."
readme = "README.md"
repository = "https://github.com/Lightprotocol/light-protocol"
Expand Down
52 changes: 44 additions & 8 deletions scripts/release/check-dependents.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,56 @@
set -euo pipefail

# Check that all dependents of released packages are also being released
# Usage: ./scripts/release/check-dependents.sh <packages...>
# Arguments:
# packages: Space-separated list of package names being released
# Exits with 0 if all dependents are included, 1 if missing dependents
# Usage: ./scripts/release/check-dependents.sh [--base-ref <ref>] <packages...>
# Patch version bumps are semver-compatible and skip the dependents check.

BASE_REF="origin/main"
if [ "${1:-}" = "--base-ref" ]; then
BASE_REF="$2"
shift 2
fi

if [ $# -lt 1 ]; then
echo "Usage: $0 <package1> [package2] ..." >&2
echo "Usage: $0 [--base-ref <ref>] <package1> [package2] ..." >&2
exit 1
fi

PACKAGES=("$@")

# Scan directories
SCAN_DIRS="program-libs sdk-libs prover/client sparse-merkle-tree"

# Check if version bump is patch-only (0.x.y -> 0.x.z or 1.x.y -> 1.x.z)
is_patch_only() {
local old_ver="$1" new_ver="$2"
local old_major old_minor new_major new_minor
IFS='.' read -r old_major old_minor _ <<< "$old_ver"
IFS='.' read -r new_major new_minor _ <<< "$new_ver"
[ "$old_major" = "$new_major" ] && { [ "$old_major" != "0" ] || [ "$old_minor" = "$new_minor" ]; }
}

# Filter to packages with breaking changes only
BREAKING_PACKAGES=()
for pkg in "${PACKAGES[@]}"; do
cargo_toml=$(find $SCAN_DIRS -name "Cargo.toml" -exec grep -l "^name = \"$pkg\"" {} \; 2>/dev/null | head -1)
if [ -n "$cargo_toml" ]; then
versions=$(git diff "$BASE_REF" -- "$cargo_toml" 2>/dev/null | grep -E '^\+version|^-version' | grep -v '+++\|---' || true)
old_ver=$(echo "$versions" | grep '^-version' | head -1 | awk -F'"' '{print $2}')
new_ver=$(echo "$versions" | grep '^\+version' | head -1 | awk -F'"' '{print $2}')
if [ -n "$old_ver" ] && [ -n "$new_ver" ] && is_patch_only "$old_ver" "$new_ver"; then
continue
fi
fi
BREAKING_PACKAGES+=("$pkg")
done

if [ ${#BREAKING_PACKAGES[@]} -eq 0 ]; then
echo "All changes are patch-only - dependents check skipped"
exit 0
fi

# Packages to exclude from dependent checks (e.g., not published to crates.io)
EXCLUDED_PACKAGES="light-token-client"
EXCLUDED_PACKAGES=""

# Scan all lib directories
SCAN_DIRS="program-libs sdk-libs prover/client sparse-merkle-tree"
Expand Down Expand Up @@ -58,8 +94,8 @@ for cargo_toml in $CARGO_FILES; do
fi
done

# Check each released package for missing dependents
for pkg in "${PACKAGES[@]}"; do
# Check each package with breaking changes for missing dependents
for pkg in "${BREAKING_PACKAGES[@]}"; do
# Find all packages that depend on this package
if [ -s "$DEPS_FILE" ]; then
dependents=$(grep ":${pkg}$" "$DEPS_FILE" 2>/dev/null | cut -d: -f1 | sort -u || true)
Expand Down
2 changes: 1 addition & 1 deletion sdk-libs/client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "light-client"
version = "0.20.0"
version = "0.21.0"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/lightprotocol/light-protocol"
Expand Down
2 changes: 1 addition & 1 deletion sdk-libs/event/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "light-event"
version = "0.20.0"
version = "0.21.0"
description = "Event types and utilities for Light Protocol"
repository = "https://github.com/Lightprotocol/light-protocol"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion sdk-libs/program-test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "light-program-test"
version = "0.20.0"
version = "0.21.0"
description = "A fast local test environment for Solana programs using compressed accounts and tokens."
license = "MIT"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion sdk-libs/token-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "light-token-client"
version = "0.20.0"
version = "0.21.0"
description = "Client library for Light Tokens"
repository = "https://github.com/Lightprotocol/light-protocol"
license = "Apache-2.0"
Expand Down
Loading