Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update v8 generation vars so that from scratch depends implies updating the metafile #26472

Merged
merged 4 commits into from
Apr 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tooling/v8-snapshot/src/doctor/determine-deferred.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ export async function determineDeferred (
deferredHash: currentHash,
}

if (!opts.nodeModulesOnly && process.env.V8_UPDATE_METAFILE && ['1', 'true'].includes(process.env.V8_UPDATE_METAFILE)) {
const updateMetafile = process.env.V8_UPDATE_METAFILE && ['1', 'true'].includes(process.env.V8_UPDATE_METAFILE)
const generateFromScratch = process.env.V8_SNAPSHOT_FROM_SCRATCH && ['1', 'true'].includes(process.env.V8_SNAPSHOT_FROM_SCRATCH)

// Only update the metafile if we are generating the full snapshot and we have either explicitly requested to update it or generating from scratch
if (!opts.nodeModulesOnly && (updateMetafile || generateFromScratch)) {
await fs.promises.writeFile(
jsonPath,
JSON.stringify(updatedMeta, null, 2),
Expand Down