From fc0fd0fe291d0aa5af639ae275feea21ab99afe8 Mon Sep 17 00:00:00 2001 From: undefined Date: Mon, 17 Feb 2025 08:18:04 +0800 Subject: [PATCH] judge: cache: skip copyIn --- packages/hydrojudge/src/task.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/hydrojudge/src/task.ts b/packages/hydrojudge/src/task.ts index 56847f289..04cd1515f 100644 --- a/packages/hydrojudge/src/task.ts +++ b/packages/hydrojudge/src/task.ts @@ -223,9 +223,13 @@ export class JudgeTask { await Lock.acquire(this.folder); try { const loc = join(this.folder, `_${type}.cache`); + const newCopyIn = { ...result.copyIn, [result._cacheable]: { src: loc } }; + // compiled checker should no longer need header file + // delete this copyIn as it's shipped with hydrojudge and may disappear after upgrade + delete newCopyIn['testlib.h']; this.compileCache[type] = { execute: result.execute, - copyIn: { ...result.copyIn, [result._cacheable]: { src: loc } }, + copyIn: newCopyIn, }; await get((result.copyIn[result._cacheable] as PreparedFile).fileId, loc); const currEtag = await fs.readFile(join(this.folder, 'etags'), 'utf-8');