Skip to content

Commit 91076ab

Browse files
ci: capture healthy launching.prefs mid-session for baseline
1 parent 2910915 commit 91076ab

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

.github/workflows/repro-issue18.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ jobs:
7070
{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"get_diagnostics","arguments":{"filePath":"/tmp/proj/child_project/src/main/java/com/playground/ConfigReader.java"}}}'
7171
7272
echo "=== launching product (java.home = SDKMAN Corretto) ==="
73+
# Capture the launching prefs mid-session (before the launcher's shutdown hook
74+
# cleans the workspace) so we can compare a healthy prefs file against the reporter's.
75+
( for i in $(seq 1 120); do
76+
find /tmp/ws -name "org.eclipse.jdt.launching.prefs" -exec cp {} /tmp/healthy.prefs \; 2>/dev/null
77+
sleep 0.5
78+
done ) &
79+
CAP_PID=$!
80+
7381
# GitHub Actions sets CI=true, which suppresses JDT's DetectVMInstallationsJob.
7482
# The reporter's machine has no CI var, so that async VM-detection/reconciliation job
7583
# DOES run. Force it on (property=false bypasses the CI check) to match his environment.
@@ -87,14 +95,9 @@ jobs:
8795
echo "=== stdout (MCP responses) ==="
8896
echo "$OUT"
8997
90-
echo "=== workspace survival + prefs baseline (healthy run) ==="
91-
echo "--- contents of /tmp/ws after exit ---"
92-
ls -la /tmp/ws 2>/dev/null || echo "(no /tmp/ws)"
93-
echo "--- any launching prefs files found ---"
94-
find /tmp/ws -name "org.eclipse.jdt.launching.prefs" 2>/dev/null | while read -r f; do
95-
echo ">>> $f"; cat "$f"; echo
96-
done
97-
find /tmp/ws -path "*org.eclipse.jdt.launching*" 2>/dev/null | head -20
98+
kill "$CAP_PID" 2>/dev/null || true
99+
echo "=== healthy launching.prefs captured mid-session ==="
100+
if [ -f /tmp/healthy.prefs ]; then cat /tmp/healthy.prefs; echo; else echo "(prefs never appeared on disk during the session)"; fi
98101
99102
echo "=== verdict ==="
100103
if echo "$OUT" | grep -q 'java.lang.Object cannot be resolved'; then

0 commit comments

Comments
 (0)