incr.comp.: Current serialization logic for Spans messes with fingerprint stability #46059
Labels
A-incr-comp
Area: Incremental compilation
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
At the moment, when we serialize a
Span
, we drop any macro expansion information, that is, we just keep thelo
andhi
fields and drop thectxt
field. Consequently, when we load something with aSpan
from disk (like a piece of MIR, for example), and thatSpan
in there had a non-zeroctxt
before being stored to disk, then we get a differentFingerprint
because we now have an emptyctxt
.I'm not sure whether this is harmless and could be ignored but it certainly messes with the otherwise very handy
-Zincremental-verify-ich
feature. I'd prefer if we found a way of making this completely accurate (e.g. by somehow serializing and then restoringSpan
expansion contexts).cc @nikomatsakis
The text was updated successfully, but these errors were encountered: