Skip to content

Commit e87f406

Browse files
committed
interop/tinkerpop: bound downloads, build classpath from deps.lock
fetch-deps.sh: each curl attempt gets --connect-timeout 20 --max-time 120, so a stalled transfer times out and the retry loop advances instead of eating the job's time limit. The final count reads deps.lock, not lib/. run.sh: the classpath is built from the jars pinned in deps.lock, never a lib/ wildcard, so a stale jar left in lib/ cannot shadow a pinned one. A missing pinned jar fails with a pointer to fetch-deps.sh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AhMhXd2gDhYzTgwKeHaWHB
1 parent c3a6d42 commit e87f406

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

‎interop/tinkerpop/fetch-deps.sh‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ grep -v '^#' deps.lock | while read -r coord sum; do
1313
# Maven Central answers 429 under bursts; back off and retry a few times.
1414
for delay in 0 2 4 8 16; do
1515
sleep "$delay"
16-
if curl -fsS -o "$jar.part" "$url"; then break; fi
16+
# Bound each attempt: a stalled transfer must time out so the loop advances.
17+
if curl -fsS --connect-timeout 20 --max-time 120 -o "$jar.part" "$url"; then break; fi
1718
done
1819
mv "$jar.part" "$jar"
1920
fi
2021
echo "$sum $jar" | sha256sum -c --quiet - || { echo "checksum mismatch: $jar" >&2; rm -f "$jar"; exit 1; }
2122
done
22-
echo "deps ok: $(ls lib/*.jar | wc -l) jars"
23+
echo "deps ok: $(grep -cv -e '^#' -e '^$' deps.lock) jars"

‎interop/tinkerpop/run.sh‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@ J="${LGJ_JDK:-/opt/jdks/jdk-28}/bin"
1010
SO="$root/native/lgj-abi/target/release/liblgj_abi.so"
1111
out="$here/out"
1212
rm -rf "$out" && mkdir -p "$out"
13-
cp="$(ls "$here"/lib/*.jar | tr '\n' ':')"
13+
# The classpath is exactly the jars pinned in deps.lock, never a lib/ wildcard:
14+
# a stale jar left in lib/ must not shadow a pinned one.
15+
cp=""
16+
while read -r coord _; do
17+
[ -z "$coord" ] && continue
18+
IFS=: read -r _ a v <<<"$coord"
19+
jar="$here/lib/$a-$v.jar"
20+
[ -f "$jar" ] || { echo "missing $jar; run ./fetch-deps.sh" >&2; exit 1; }
21+
cp="$cp$jar:"
22+
done < <(grep -v '^#' "$here/deps.lock")
1423
if ! "$J/javac" --release 28 --enable-preview -d "$out" -cp "$cp" \
1524
$(find "$root/java/src/main" "$root/java/src/test" "$root/consumers/graph/src/main" "$here/src" -name '*.java') \
1625
>"$out/javac.log" 2>&1; then

0 commit comments

Comments
 (0)