Page MenuHomePhorge

only update cache file if something changed
ClosedPublic

Authored by avivey on Oct 5 2023, 12:27.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 10, 00:15
Unknown Object (File)
Fri, May 10, 00:15
Unknown Object (File)
Wed, May 8, 06:12
Unknown Object (File)
Wed, May 8, 05:56
Unknown Object (File)
Tue, May 7, 22:54
Unknown Object (File)
Tue, May 7, 11:17
Unknown Object (File)
Fri, May 3, 17:23
Unknown Object (File)
Fri, May 3, 17:23

Details

Summary

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

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
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.