3 ms·
When these things go wrong it often doesn't cause a compilation error; it can just cause inexplicable runtime behaviour. You may be lucky and be building a pur
by IshKebab 3y ago
When these things go wrong it often doesn't cause a compilation error; it can just cause inexplicable runtime behaviour.
You may be lucky and be building a pure or mostly pure Rust program, in which case it works pretty well. Throw in some C/C++ and it starts to degrade (though it's still better than with an actual C/C++ program because you aren't actually editing the C/C++ code generally).
And are you actually using remote caching/compilation? Because there's no way you can set that up in 5 minutes.
- goku12 3y ago> And are you actually using remote caching/compilation? Because there's no way you can set that up in 5 minutes. Who said anything about remote caching? You don't need it to benefit from it. It's useful if you build a lot of Rust code. A lot of packages turn up repeatedly as dependencies among several projects. > You may be lucky and be building a pure or mostly pure Rust program, in which case it works pretty well. Throw in some C/C++ and it starts to degrade You're making assumptions again. What is the issue with pure Rust code? Rust isn't like Python needing C or C++ support for process-intensive parts. And much of the C/C++ dependencies are dynamically-linked, with Rust wrappers. I haven't seen many projects that require Rust and C/C++ code to be built together and statically linked. Besides, I haven't heard anyone complain about sccache that much. How prevalent is the degradation anyway?
- sgammon 3y agoAfter using sccache and Gradle with Buildless for months, years, I have literally never seen these tools mixup or use the wrong binary objects. Knowing the internals of some of them, I’ve found that build cache clients are way more likely to miss with a cache key misalignment than they are to mixup two objects. I’m sure it’s possible, I’ve just never seen it happen in the wild, after extensive usage. Generally speaking these tools are very conservative about two inputs matching: an identical file at a different path will cause a cache key change in sccache.
- creer 3y agoI keep reading this "When these things go wrong" - which is necessarily very intermittent. What is it that goes wrong with these?
- dataangel 3y agoccache pretty aggressively scans for things like __DATE__ and has direct understanding of compiler flags so instances of bad caching are pretty rare, I think I've only had it happen twice in years of use and once was a GCC bug. Also since ccache supports s3 out of the box now remote caching is pretty fast to setup. Remote compilation is not handled by ccache at all. You need distcc or icecc for that.