mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-10-26 16:55:08 +00:00
fix(build): raise Host compiler heap limit to 8 GiB
This commit is contained in:
1 parent
92f6c1320b
commit
0ce33089d9
5 files changed
+16
-6
No files matched your search
+1
-1
@@ -24,7 +24,7 @@
|
||||
"build:bench": "npm run build:native-system && npm run build:lib && tsdown --config-loader native --config benchmarks/tsdown.config.ts",
|
||||
"build:official": "tsx scripts/build.ts --profile official",
|
||||
"build:lib": "pnpm run build:lib:host && pnpm run build:lib:client",
|
||||
"build:lib:host": "tsx scripts/compile-referenced-projects.ts host-libraries && node --max-old-space-size=4096 ./node_modules/typescript/bin/tsc -p tsconfig.host.json && pnpm --filter @deepseek-ai/dsh-desktop run bundle",
|
||||
"build:lib:host": "tsx scripts/compile-referenced-projects.ts host-libraries && node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc -p tsconfig.host.json && pnpm --filter @deepseek-ai/dsh-desktop run bundle",
|
||||
"build:lib:client": "tsc -b tsconfig.client.json && tsdown --config-loader native --env.DSH_BUILD_FACE client",
|
||||
"build:web": "pnpm --filter @deepseek-ai/dsh-web-frontend run build",
|
||||
"build:desktop": "pnpm --filter @deepseek-ai/dsh-desktop run build",
|
||||
|
||||
@@ -60,6 +60,16 @@ describe('repository build CLI', () => {
|
||||
})
|
||||
|
||||
describe('repository build steps', () => {
|
||||
it.each(['complete', 'check', 'typecheck'] as const)('gives Host compilers an 8 GiB heap in %s scope', (scope) => {
|
||||
const gates = buildGates(root, scope)
|
||||
for (const gate of gates.filter(gate => gate.id === 'host-src' || gate.id === 'host-check')) {
|
||||
expect(gate.args[0]).toBe('--max-old-space-size=8192')
|
||||
}
|
||||
for (const gate of gates.filter(gate => gate.id === 'client-src' || gate.id === 'client-check')) {
|
||||
expect(gate.args.some(arg => arg.startsWith('--max-old-space-size'))).toBe(false)
|
||||
}
|
||||
})
|
||||
|
||||
it('keeps artifact steps in serial dependency order', () => {
|
||||
expect(graph(buildGates(root, 'artifacts'))).toEqual(artifactGraph)
|
||||
})
|
||||
|
||||
@@ -143,7 +143,7 @@ describe('CI workflow', () => {
|
||||
const scripts = JSON.parse(readFileSync(resolve(root, 'package.json'), 'utf8')) as { scripts: Record<string, string> }
|
||||
const hostSteps = scripts.scripts['build:lib:host']!.split(' && ')
|
||||
expect(hostSteps[0]).toBe('tsx scripts/compile-referenced-projects.ts host-libraries')
|
||||
expect(hostSteps).toContain('node --max-old-space-size=4096 ./node_modules/typescript/bin/tsc -p tsconfig.host.json')
|
||||
expect(hostSteps).toContain('node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc -p tsconfig.host.json')
|
||||
expect(hostSteps.at(-1)).toBe('pnpm --filter @deepseek-ai/dsh-desktop run bundle')
|
||||
expect(scripts.scripts['build:lib:client']).toContain('tsc -b tsconfig.client.json')
|
||||
expect(scripts.scripts.typecheck).toBe('tsx scripts/build.ts --scope typecheck')
|
||||
@@ -738,7 +738,7 @@ describe('CI workflow', () => {
|
||||
'wine_node "$scratch/logs/host-references.log" --import tsx/esm scripts/compile-referenced-projects.ts host',
|
||||
)
|
||||
const aggregate = wineGates.indexOf(
|
||||
'wine_node "$scratch/logs/host-tsc.log" --max-old-space-size=4096 "$tsc_js" -p tsconfig.host.json --pretty false',
|
||||
'wine_node "$scratch/logs/host-tsc.log" --max-old-space-size=8192 "$tsc_js" -p tsconfig.host.json --pretty false',
|
||||
)
|
||||
const metadata = wineGates.indexOf('wine_node "$scratch/logs/host-typert.log" --import tsx/esm scripts/generate-typert.ts')
|
||||
expect(metadata).toBeGreaterThan(-1)
|
||||
|
||||
@@ -48,7 +48,7 @@ export function runPnpmCommand(root: string, args: readonly string[]): void {
|
||||
* @param root - Repository root containing the aggregate tsconfig.
|
||||
* @param face - Independent compiler face whose package projects are emitted.
|
||||
* @param mode - Check package types by default; benchmark emission defers diagnostics to required full builds.
|
||||
* @returns Arguments for `process.execPath`, including the heap limit the Host face needs.
|
||||
* @returns Arguments for `process.execPath`, including an 8 GiB old-space heap limit for the Host face.
|
||||
* @throws If the aggregate configuration is invalid, has no references, or can emit files.
|
||||
*/
|
||||
export function referencedProjectsCompilerArgs(
|
||||
@@ -109,7 +109,7 @@ export function aggregateBuildArgs(face: 'host' | 'client'): string[] {
|
||||
}
|
||||
|
||||
function hostHeapArgs(face: 'host' | 'client'): string[] {
|
||||
return face === 'host' ? ['--max-old-space-size=4096'] : []
|
||||
return face === 'host' ? ['--max-old-space-size=8192'] : []
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -253,7 +253,7 @@ grep -q '^smoke: win32 x64' "$scratch/logs/smoke.log" || { echo 'wine-windows-ga
|
||||
build_gate() {
|
||||
wine_node "$scratch/logs/host-typert.log" --import tsx/esm scripts/generate-typert.ts || return $?
|
||||
wine_node "$scratch/logs/host-references.log" --import tsx/esm scripts/compile-referenced-projects.ts host || return $?
|
||||
wine_node "$scratch/logs/host-tsc.log" --max-old-space-size=4096 "$tsc_js" -p tsconfig.host.json --pretty false || return $?
|
||||
wine_node "$scratch/logs/host-tsc.log" --max-old-space-size=8192 "$tsc_js" -p tsconfig.host.json --pretty false || return $?
|
||||
wine_node "$scratch/logs/host-tsdown.log" "$tsdown_js" --env.DSH_BUILD_FACE host || return $?
|
||||
(cd apps/desktop && wine_node "$scratch/logs/desktop-tsdown.log" "../../$tsdown_js") || return $?
|
||||
wine_node "$scratch/logs/client-tsc.log" "$tsc_js" -b tsconfig.client.json --pretty false || return $?
|
||||
|
||||
Reference in new issue
Block a user