Skip to content

Commit 47c6087

Browse files
sjarmakclaude
andcommitted
fix: vscode test.sh drop src/tsconfig OOM check + fix RELEVANT_COUNT bug
- Remove src/tsconfig.json type-check (covers all 300k+ VS Code TS lines, causes OOM/segfault inside 2GB container; extension-level check is sufficient) - Fix RELEVANT_COUNT using wc -l instead of grep -c (avoids double-output "0\n0" when grep exits 1 with no matches, causing integer expression error) - Fix fallback tsconfig condition (remove src/tsconfig.json guard clause) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 68f6d3c commit 47c6087

File tree

1 file changed

+5
-11
lines changed
  • benchmarks/ccb_feature/vscode-stale-diagnostics-feat-001/tests

1 file changed

+5
-11
lines changed

benchmarks/ccb_feature/vscode-stale-diagnostics-feat-001/tests/test.sh

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,12 @@ if [ -f "extensions/typescript-language-features/tsconfig.json" ]; then
9191
fi
9292
fi
9393

94-
# Also check src/ if a tsconfig exists there
95-
if [ -f "src/tsconfig.json" ]; then
96-
./node_modules/.bin/tsc --noEmit -p src/tsconfig.json 2>>/logs/verifier/typecheck_errors.txt && TSC_RC=0 || TSC_RC=$?
97-
if [ "$TSC_RC" -ne 0 ]; then
98-
echo "FAIL: TypeScript type-check failed for src/"
99-
TYPE_CHECK_OK=0
100-
fi
101-
fi
94+
# Note: src/tsconfig.json covers all of VS Code (>300k TS lines) and OOMs in
95+
# the container; we only need the extension-level check for this task.
10296

10397
# Fallback: if no specific tsconfig was found, do a syntax-only check on
10498
# modified .ts files using tsc --noEmit --isolatedModules
105-
if [ "$TYPE_CHECK_OK" -eq 1 ] && [ ! -f "extensions/typescript-language-features/tsconfig.json" ] && [ ! -f "src/tsconfig.json" ]; then
99+
if [ "$TYPE_CHECK_OK" -eq 1 ] && [ ! -f "extensions/typescript-language-features/tsconfig.json" ]; then
106100
# Collect modified .ts files (committed + unstaged + staged)
107101
MODIFIED_TS=""
108102
if [ -n "$ORIGIN_REF" ]; then
@@ -174,8 +168,8 @@ CHANGED_FILES="$CHANGED_FILES
174168
$(git diff --name-only 2>/dev/null)
175169
$(git diff --cached --name-only 2>/dev/null)"
176170

177-
RELEVANT_FILES=$(echo "$CHANGED_FILES" | grep -E "(diagnostics|extension)" | sort -u)
178-
RELEVANT_COUNT=$(echo "$RELEVANT_FILES" | grep -c . 2>/dev/null || echo 0)
171+
RELEVANT_FILES=$(echo "$CHANGED_FILES" | grep -E "(diagnostics|extension)" | sort -u || true)
172+
RELEVANT_COUNT=$(echo "$RELEVANT_FILES" | grep -v '^$' | wc -l)
179173
if [ "$RELEVANT_COUNT" -ge 2 ]; then
180174
echo "[x] Diagnostics-related files modified ($RELEVANT_COUNT files)"
181175
echo "$RELEVANT_FILES" | head -5

0 commit comments

Comments
 (0)