You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pnpm uses hardlinks, but I looked up and hardlinks are supported by tar, so I don't understand why it's not able to restore the cache correctly 🤔
It's important for us to cache both the store and the node_modules, as it allows for near-instant dependencies restoration instead of waiting for ~40s per job for pnpm to recreate the node_modules hierarchy if we only cache the store.
We don't want to switch to node-linker=hoisted as it will erase most of the benefits of pnpm.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey 👋,
We're trying to migrate our monorepo from yarn to pnpm, and we have one last blocker: the caching story in the CI.
Our action is quite simple:
The cache saving does work:
/usr/bin/tar --posix -cf cache.tzst --exclude cache.tzst -P -C /home/runner/work/snaplet/snaplet --files-from manifest.txt --use-compress-program zstdmt Cache Size: ~530 MB (555679482 B) Cache saved successfully Cache saved with key: Linux-pnpm-f79d92af2bdd42e612381ad72adf9da1e03aa2d7c04802bd0b8dc4760eb3707c
But the restoration is broken: https://gist.github.com/jgoux/f85685b3b9ad513115a0897331e9ef6f
pnpm uses hardlinks, but I looked up and hardlinks are supported by
tar
, so I don't understand why it's not able to restore the cache correctly 🤔It's important for us to cache both the store and the node_modules, as it allows for near-instant dependencies restoration instead of waiting for ~40s per job for
pnpm
to recreate the node_modules hierarchy if we only cache the store.We don't want to switch to
node-linker=hoisted
as it will erase most of the benefits of pnpm.Beta Was this translation helpful? Give feedback.
All reactions