Aller au contenu
login
arrow_backRetour aux issues
codechefPesuecc/CodeChef-PESUECC-Chapter #148

Compilation-error detail always lost on graded submit (shows bare 'Compilation failed.')

ecoDébutant good first issue

descriptionDescription

**Severity:** Medium On a compilation error the engine returns an **empty** `test_results` and puts the message in `compile_output`. But `src/server/judge.ts:94` reads it from `result.test_case_results?.[0]?.stderr`, so users always see the fallback `"Compilation failed."` with no compiler output. The `/api/run` path already handles this correctly (`src/app/api/run/route.ts:108`). **Where** - `src/server/judge.ts:94` (graded submit) - `src/app/api/monstr/contests/[id]/run/route.ts:187` (same bug in the Monstr run route) **Fix** `const firstError = result.compile_output || result.test_case_results?.[0]?.stderr || "Compilation failed.";` Mirror the same fallback in the Monstr run route. **Acceptance:** a program with a syntax error shows the real compiler message.
codeOuvre sur GitHub