spent some time lately adding a fun feature to our buildsystem: leaf input caching. 1/n
instead of hashing let's say objectfiles to see if you can get a cachehit on your link result, we statically find all versioned files that could possibly affect the build, 2/n
if those hit, we download from the cache the final link, and don't do any compilation, code generation 3/n
and since downloading compilers and linkers are part of our buildgraph, it will even skip those. you can just download the final binary for a platform without even downloading the sdk for that platform.
main usecase is scenarios where you expect builds to happen where there are 0 changes to a build CI has built before. like our buildfarm, when we change an android cpp file, but build a windows player 5/n
but for unity users in the future, also a scenario of a game artist wanting to make a PS4 build. if she didn't modify any code (common for artist workflows), unity is going to just download the final ps4 binary for the game. not do any c# compilation,not run any burst, 6/n
not run il2cpp, not compile il2cpp output. just download the already-built binary, deploy, and ready to go.
surprisingly hard, as always, was dealing with c++. In this setup, it's not allowed to have a file be #included 7/n
exclusively by generated files. Because we need to do the leaf input hashing before building anything, those generated files do not exist yet so we cannot scan them. A ton of the work was in writing the safety mechasism that enforces you have no 8/n
files included exclusively by generated files. all other include statements are fine, because we can find all header files that could possibly contribute to the build purely from the versioned files. this has been / is a fun project 9/n
• • •
Missing some Tweet in this thread? You can try to
force a refresh