judge: spj: allow selecting sublanguage

This commit is contained in:
undefined committed 2021-07-07 20:16:31 +08:00
1 parent fe103d3594
commit cef1760076
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@hydrooj/hydrojudge",
"bin": "bin/hydrojudge.js",
"version": "2.8.15",
"version": "2.8.16",
"main": "package.json",
"author": "undefined <i@undefined.moe>",
"repository": "https://github.com/hydro-dev/Hydro.git",
+1 -1
View File
@@ -29,5 +29,5 @@ export async function compileChecker(getLang: Function, checkerType: string, che
if (checkerType === 'testlib') copyIn['testlib.h'] = { src: testlibSrc };
const file = await fs.readFile(checker);
// TODO cache compiled checker
return await compile(getLang(parseFilename(checker).split('.')[1]), file.toString(), 'checker', copyIn);
return await compile(getLang(parseFilename(checker).split('.')[1].replace('@', '.'), file.toString(), 'checker', copyIn);
}
+1 -1
View File
@@ -106,7 +106,7 @@ export const judge = async (ctx) => {
copyIn[parseFilename(file)] = { src: file };
}
return compile(
ctx.getLang(parseFilename(ctx.config.interactor).split('.')[1]),
ctx.getLang(parseFilename(ctx.config.interactor).split('.')[1].replace('@', '.')),
fs.readFileSync(ctx.config.interactor).toString(),
'interactor',
copyIn,