Skip to content

incr.comp.: Current serialization logic for Spans messes with fingerprint stability #46059

Closed
@michaelwoerister

Description

@michaelwoerister

At the moment, when we serialize a Span, we drop any macro expansion information, that is, we just keep the lo and hi fields and drop the ctxt field. Consequently, when we load something with a Span from disk (like a piece of MIR, for example), and that Span in there had a non-zero ctxt before being stored to disk, then we get a different Fingerprint because we now have an empty ctxt.

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 restoring Span expansion contexts).

cc @nikomatsakis

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions