• Ephera@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    6 hours ago

    I’m currently at the other end of this, in that I’m trying to implement caching for a build tool. And yeah, I do expect to be in for a world of pain.

    Biggest problem is that you cannot do caching correctly, unless you know all the inputs upfront. If the user decides they’ll use the CPU temperature while building their distribution artifact without telling you about it, you’re fucked.
    Or well, the user is fucked. Because their CPU temp will not update and they’ll never be told about it.

    So, the user needs to tell you about every single input, which makes it extremely verbose. I guess, that’s why so many build tools have their own custom APIs rather than using file APIs from the stdlib, because it allows you to register e.g. paths as an input, wherever they’re created…