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
I'm quite new in the monorepos landscape, and I didn't use Nx yet (I like to master more basic tools before jumping into more powerful ones, to avoid situations where half my stack feels like black magic).
One of the problems I faced is ensuring that I can reuse docker builder cache layers as most as possible in the presence of "shared/global" lockfiles (as it happens when using yarn workspaces, where there's a single global yarn.lock file). As you might already know/imagine, this is a problem because some parts of the lockfile can change without affecting the real behavior of the build, but because its checksum changes, the cache layer associated to it has to be invalidated.
Because of this, I wrote a small (experimental) tool: https://github.com/Coder-Spirit/lock-distill , that takes care of creating "distilled" lockfiles that can be mounted/copied during the build process, minimising the amount of caches invalidation.
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
-
Hello,
I'm quite new in the monorepos landscape, and I didn't use Nx yet (I like to master more basic tools before jumping into more powerful ones, to avoid situations where half my stack feels like black magic).
One of the problems I faced is ensuring that I can reuse docker builder cache layers as most as possible in the presence of "shared/global" lockfiles (as it happens when using
yarn workspaces
, where there's a single globalyarn.lock
file). As you might already know/imagine, this is a problem because some parts of the lockfile can change without affecting the real behavior of the build, but because its checksum changes, the cache layer associated to it has to be invalidated.Because of this, I wrote a small (experimental) tool: https://github.com/Coder-Spirit/lock-distill , that takes care of creating "distilled" lockfiles that can be mounted/copied during the build process, minimising the amount of caches invalidation.
I discussed this with a colleague, and he pointed out the existence of the
prune
command inturborepo
( https://turborepo.org/docs/reference/command-line-reference#--docker ), that does basically the "same"... but at a much greater scale.How does Nx and its docker-related plugins deal with this case?
Beta Was this translation helpful? Give feedback.
All reactions