News for hackers. Stuff that matters.
Re:Experiment: The costs of slow build times by substation13 on Friday December 09, 2022 @04:37AM (#33919440)
The solution is a build system that scales by caching between runs - most PRs only change a few files, after all.
Re:Experiment: The costs of slow build times by carreau on Friday December 09, 2022 @04:47AM (#33919500)
As I replied to the sibling comment, yes, I agree, but caching is not magic. You need to know what to invalidate, and you need to be allowed to spend time making test group that run depending on what have changed. So without policy and having devs being allowed to work on optimizing CI/reducing time, you can list plenty of strategies to make it faster but it will likely not happen.
Re:Experiment: The costs of slow build times by ohgodplsno on Friday December 09, 2022 @07:03AM (#33920365)
Caching is pretty damn simple with any sensible build tool that simply stores hashes of files and modules. Caching in the JVM ecosystem is pretty much free, for example.
Re:Experiment: The costs of slow build times by carreau on Friday December 09, 2022 @07:16AM (#33920434)
Sure, but you seem to be read this blog post in the narrow view of building as only "compiling an artifact" and not running the test suite across many platforms/condition, or any other work. I mean the author even points out that building the kernel is only a use-case that takes time for measurement purposes. For some projects I work on the compilation itself takes maybe 1/10 max of the total build and test. So even with infinite agressive compilation caching I would not gain much.
Re:Experiment: The costs of slow build times by ohgodplsno on Friday December 09, 2022 @08:33AM (#33921028)
Nope, our Android app has caching, both for building APKs/AABs, but also for test suites. PRs run the entire test suite (on too many variants, even, I forgot to remove some unneeded stuff), what hasn't changed or hasn't been impacted by said changes simply gets a FROM-CACHE and isn't reran.
Re:Experiment: The costs of slow build times by ninkendo on Friday December 09, 2022 @09:39AM (#33921632)
That's great for your android app, and you're lucky you have such a thing. But your experience is not generally applicable to all of software development. There are many, many, many build systems out there in the wild that do not support the ability to know what unit tests are affected by what code changes. I'd wager something like 99% of them.
Re:Experiment: The costs of slow build times by substation13 on Friday December 09, 2022 @08:01AM (#33920748)
You can cache tests too if you properly capture the inputs
Re:Experiment: The costs of slow build times by Jochim on Friday December 09, 2022 @05:46AM (#33919910)
Caching can often cause more issues than it solves.

While largely fixed now, older C# projects suffered from separating dll references from the reference to the package that provided them.

This lead to the situation where you may be referencing a package that hasn't been downloaded. Due to the package cache, the solution would typically build on a "dirty" environment like the developer's machine or anything that had previously built the project but would fail on any fresh environment.

Re:Experiment: The costs of slow build times by alkonaut on Friday December 09, 2022 @05:45AM (#33919903)
i build a large app where every output of around 100 (dlls) are tagged with a version number which also contains the git commit SHA etc.

It's great for keeping things tidy and not having to break the whole thing up in modules like "UI 21.0.12.11 needs Backend 12.2.1.11 or greater". Instead everything builds more or less into a monolith. But it does have one drawback: making a commit invalidates every bit of the build output immediately.