MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / compile

Method compile

packages/hydrojudge/src/task.ts:210–219  ·  view source on GitHub ↗
(lang: string, code: CopyInFile)

Source from the content-addressed store, hash-verified

208 }
209
210 async compile(lang: string, code: CopyInFile) {
211 using compileSpan = this.startChildSpan('judge.compile', { lang });
212 const copyIn = Object.fromEntries(
213 (this.config.user_extra_files || []).map((i) => [basename(i), { src: i }]),
214 ) as CopyIn;
215 const result = await compile(this.session.getLang(lang), code, copyIn, this.next);
216 compileSpan.setStatus({ code: SpanStatusCode.OK });
217 await this.pushClean(result.clean);
218 return result;
219 }
220
221 async compileLocalFile(
222 type: 'interactor' | 'validator' | 'checker' | 'generator' | 'manager' | 'std',

Callers 7

config.tsFile · 0.80
runFlowFunction · 0.80
judgeFunction · 0.80
judgeFunction · 0.80
judgeFunction · 0.80
judgeFunction · 0.80
judgeFunction · 0.80

Calls 5

startChildSpanMethod · 0.95
pushCleanMethod · 0.95
compileFunction · 0.85
setStatusMethod · 0.80
getLangMethod · 0.45

Tested by

no test coverage detected