Page MenuHomePhorge

only update cache file if something changed

Authored by avivey on Oct 5 2023, 12:27.
Referenced Files
Unknown Object (File)
Sat, Feb 24, 08:28
Unknown Object (File)
Tue, Feb 20, 22:49
Unknown Object (File)
Mon, Feb 19, 11:45
Unknown Object (File)
Mon, Feb 19, 11:00
Unknown Object (File)
Mon, Feb 19, 10:35
Unknown Object (File)
Thu, Feb 8, 20:38
Unknown Object (File)
Tue, Feb 6, 01:18
Unknown Object (File)
Mon, Feb 5, 21:31



See Q77. When installing in a read-only location, updating the file is both redundant (nothing changed) and fails.

Make sure to only save the updated file if anything changed.

Test Plan

Run arc lint somewhere, make .phutil_module_cache and src/ read-only, run arc lint again - it should avoid crashing.

Diff Detail

rARC Arcanist
Lint Not Applicable
Tests Not Applicable

Event Timeline

avivey requested review of this revision.Oct 5 2023, 12:27

Tested before/after, thanks :)

Just to clarify the test plan, is the file .phutil_module_cache supposed to be in /src?

This revision is now accepted and ready to land.Oct 11 2023, 05:28

Yeah, the first run of arc lint creates the file, and subsequent runs do not update it.