Skip to content

Commit b10ae0b

Browse files
authored
fix: probabilistic trigger v8 crash (#1032)
There is a probability of triggering a v8 crash when running the `yarn list --prod --json` command. Related discussion: nodejs/node#51555 This issue does not always occur. When we build `vscode-reh-linux-arm64` in the Dockerfile, there is more than a 50% chance of failure. If this PR is merged, the code related to DISABLE_V8_COMPILE_CACHE in vscode can also be removed (https://github.com/search?q=repo%3Amicrosoft%2Fvscode%20DISABLE_V8_COMPILE_CACHE&type=code). Globally setting `DISABLE_V8_COMPILE_CACHE=1` will increase the entire build time by 3 to 5 minutes. Signed-off-by: Kevin Cui <[email protected]>
1 parent cf0bc32 commit b10ae0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/npm.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ async function getYarnProductionDependencies(cwd: string, packagedDependencies?:
158158
const raw = await new Promise<string>((c, e) =>
159159
cp.exec(
160160
'yarn list --prod --json',
161-
{ cwd, encoding: 'utf8', env: { ...process.env }, maxBuffer: 5000 * 1024 },
161+
{ cwd, encoding: 'utf8', env: { DISABLE_V8_COMPILE_CACHE: "1", ...process.env }, maxBuffer: 5000 * 1024 },
162162
(err, stdout) => (err ? e(err) : c(stdout))
163163
)
164164
);

0 commit comments

Comments
 (0)