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
 

Keep Current with Lucas Meijer

Lucas Meijer Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(