nix-community / crate2nix

rebuild only changed crates in CI with crate2nix and nix
https://nix-community.github.io/crate2nix/
Apache License 2.0
354 stars 83 forks source link

clarify "Compare that to docker layers" #221

Open milahu opened 2 years ago

milahu commented 2 years ago

readme says

Smart caching: It uses smart crate by crate caching so that nix rebuilds exactly the crates that need to be rebuilt. Compare that to docker layers...

please clarify "Compare that to docker layers..."

this can be misunderstood as "our SMART caching is better than these stupid docker layers"

but i guess it should mean something like "this feature is similar to docker layers"

ners commented 2 years ago

Actually, I fully expect that it means the former. Nix caching is not similar to Docker layers, which have a linear dependency chain (based on where in the stack the layer appears), rather than a graph. Docker layers are deltas that linearly depend on each other, and as such are fairly less powerful in their caching capability.