Automatic snapshots
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.8k
- Forks
- 279
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Description
Now that snapshots have been merged, Corepack should leverage them to decrease the package managers boot times - similar to how we currently use v8-compile-cache.
The way I imagine it, instead of running yarn.js, we would check whether yarn-${process.version}.blob exists. If it doesn't, create it (by calling the process.execPath binary with the --build-snapshot flag). Otherwise, spawn the blob.
Package managers will need some explicit support for this to work, as they'll need to embed their CLI logic within setDeserializeMainFunction.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the current yarn.js launch path and the Node.js V8 startup snapshot documentation, especially setDeserializeMainFunction. Investigate how process.execPath could build or spawn a versioned yarn-${process.version}.blob, and confirm what package-manager support is required; done means package-manager boot times are reduced without breaking startup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- cli, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100