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

track local changes with overlayfs #2806

Open
milahu opened this issue Aug 28, 2020 · 0 comments
Open

track local changes with overlayfs #2806

milahu opened this issue Aug 28, 2020 · 0 comments

Comments

@milahu
Copy link
Contributor

milahu commented Aug 28, 2020

feature request:
allow to change/edit/patch local package installs
by auto-mounting the original package with overlayfs

this should happen 'behind the scenes'
so when i start editing files, the original file is preserved somewhere

todo:
benchmark performance of overlayfs
when thousands of directories are mounted
(probably not a good idea)

expensive alternative:
write a custom filesystem driver (pnpmfs)
that listens to read/write requests
and only on a write request,
the overlayfs is mounted

cheap alternative:
mount the pnpm global store with overlayfs
so all user edits go to one overlay
= allow global edits while tracking changes
pnpm installs go to the lower layer of the overlay

background:
i want to patch installed packages
and keep track of changes
so i can generate a distributable patch file

https://github.com/ds300/patch-package
does this by downloading the original package from npm servers
and comparing original vs patched version

this re-download should be skippable
as long as it can be done in a performant way

also probably a challenge to do that on windows ....

slightly related, cos docker is using overlayfs
issue #1637 pnpm monorepo docker support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants