diff --git a/app/javascript/components/editor/ClientSideTestRunner/kernel/Kernel.ts b/app/javascript/components/editor/ClientSideTestRunner/kernel/Kernel.ts index 223dc5360f..c2b8fb339f 100644 --- a/app/javascript/components/editor/ClientSideTestRunner/kernel/Kernel.ts +++ b/app/javascript/components/editor/ClientSideTestRunner/kernel/Kernel.ts @@ -104,8 +104,9 @@ export class Kernel { } }) - const { env, preload, licence } = self.config - await self.#client.boot(entry.sysroot, toEnv(env), preload, licence) + const { env, licence } = self.config + const precompile = self.config.precompile ?? self.config.preload ?? [] + await self.#client.boot(entry.sysroot, toEnv(env), precompile, licence) // The sysroot carries the language's tools but not the runner itself, so // /opt/test-runner is untarred on top of it. Part of boot rather than of a diff --git a/app/javascript/components/editor/ClientSideTestRunner/kernel/kernelClient.ts b/app/javascript/components/editor/ClientSideTestRunner/kernel/kernelClient.ts index bac1e16236..c4cdae857d 100644 --- a/app/javascript/components/editor/ClientSideTestRunner/kernel/kernelClient.ts +++ b/app/javascript/components/editor/ClientSideTestRunner/kernel/kernelClient.ts @@ -39,7 +39,7 @@ export interface KernelClient { boot( sysroot: string, env: string[], - preload: string[], + precompile: string[], licence?: Licence[] ): Request untar(path: string, data: ArrayBuffer): Request @@ -62,6 +62,8 @@ export type KernelClientConstructor = new (options: { /** The kernel's boot.json, served beside sysroot.tar. */ export type BootConfig = { env: Record - preload: string[] + precompile?: string[] + // The old name for precompile. Remove once every boot.json uses precompile. + preload?: string[] licence?: Licence[] }