Page MenuHomePhorge

only update cache file if something changed
ClosedPublic

Authored by avivey on Oct 5 2023, 12:27.
Tags
None
Referenced Files
F2947434: D25446.1738470982.diff
Sat, Feb 1, 04:36
F2947433: D25446.1738470896.diff
Sat, Feb 1, 04:34
F2943346: D25446.1738182133.diff
Tue, Jan 28, 20:22
F2936206: D25446.1737909181.diff
Sat, Jan 25, 16:33
F2935084: D25446.1737818876.diff
Fri, Jan 24, 15:27
F2933471: D25446.1737770659.diff
Fri, Jan 24, 02:04
F2889012: D25446.1737198166.diff
Fri, Jan 17, 11:02
F2877769: D25446.1737007808.diff
Wed, Jan 15, 06:10

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
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 859
Build 859: arc lint + arc unit

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.