incr.comp.: x.py --incremental can cause too big cache directories

c0cc067
Opened by Michael Woerister at 2019-03-29 14:15:52

In particular, sometimes there are two cache subdirectories for a given crate in stage0-incremental, e.g. two rustc_trans-xxxxxxx directories. They have different crate disambiguators (otherwise there'd only be one directory). The disambiguator is set by the build system, either cargo or x.py. It's not clear yet whether this is a problem in rustc (somehow handling disambiguators or directory names wrongly) or cargo or x.py.

Note that it can be normal to have multiple directories for crates with the same name but different disambiguators, e.g. if there are two different versions of the same crate in the crate graph or if there is a library and an executable with the same name (as is the case with "rustc").

  1. @michaelwoerister out of curiosity, would you expect things to break if one were to blindly delete some of these directories before initiating a rustbuild?

    Or does the incremental compilation system just recognize that some of the files it wants are missing, and fall back on a full compilation?

    Felix S Klock II at 2019-03-29 13:39:01

  2. You can always just delete anything within the various incremental directories. The compiler will just compile from scratch if it doesn't find anything in the cache.

    Michael Woerister at 2019-03-29 14:15:52