PlatformIO Community

Force platformio to use modification time comparisons for determining whether a file changed

Since PlatformIO uses SCons under the hood, I was affected by this SCons bug:

MD5-timestamp decider does no longer follow symlinks

So with SCons, the build system determines whether a file has changed (and thus need to be rebuilt) by computing its MD5sum and comparing it to the last value, by default.

To be honest, I wasn’t aware of that SCons feature. And even if it would work properly, I consider it as an anti-feature, because I work an systems with properly synchronized clocks and filesystems that support high-precision timestamps. I never ran into any issues with build systems that ‘just’ are comparing the file modification time (mtime) for determing which files need to be rebuilt.

On my Fedora 35 system I’m still on a buggy SCons version that is imported by platformio and thus I’m very interested in a workaound. That means to find a way to explicitly tell platformio to never use MD5sum comparisons but only timestamp ones.

SCons documentation describes how to do that with standard SCons:


But I have no idea how to translate that into a platformio.ini configuration or even a platformio patch.

Any ideas how to use the timestamp-newer SCons decider with platformio?

Somethig like that would likely have to be written in the SCons builder scripts that PlatformIO uses (example), or in the core. Can you open an issue at Issues · platformio/platformio-core · GitHub?

Sure, I’ve just created an issue there: PlatformIO not rebuilding symlinked changed files · Issue #4316 · platformio/platformio-core · GitHub

1 Like