Re:Caching is an Abstraction, not an Optimization
by throwaway150 on Thursday July 03, 2025 @06:24PM
(#44459653)
> Think about all those times your program isn't building and `make clean` fixes it.
I don't think that's a good example. I've worked with more than 20 different build tools by now, and I cannot recall a single instance where the problem actually came down to cache invalidation. Every time I dug into it, the real cause was something else: a mistake in the build script, an incorrectly declared dependency, or something similar.
So when you say "think about all those times", not a single such time comes to my mind!
Re:Caching is an Abstraction, not an Optimization
by degamad on Thursday July 03, 2025 @09:50PM
(#44460506)
I think the idea is that if make clean allows the build to complete correctly, then the underlying issue is that the "mistake in the build script, incorrectly declared dependency, or similar" was causing the cached build results to not be invalidated when they should have.
Re:Caching is an Abstraction, not an Optimization
by IshKebab on Friday July 04, 2025 @06:59AM
(#44463400)
> an incorrectly declared dependency
That literally IS cache invalidation. Incremental build systems are caching previous artefacts. They're supposed to invalidate the artefact if a dependency changes. But you forgot to declare the dependency... so it doesn't get invalidated when it should.
Think about all those times your program isn't building and `make clean` fixes it.