Skip to content

strict version hash (SVH) incorporates hidden implementation artifacts #14132

Closed
@pnkfelix

Description

@pnkfelix

Spawned off of investigation from PR #13948 (but really is a long-standing known issue).

If you look at the comments on svh.rs you see that our current strict version hash (SVH) scheme is too fine-grained: the hash computation is using details of the ast and attributes that should be irrelevant to the hash.

Worse still, @alexcrichton discovered while looking at problems with PR #13948 that the hash is even incorporating implementation artifacts like the order in which identifiers are interned. This means that the order in which one passes command line flags like --cfg stage1 affects the SVH value. That is bad.

This may be easy to fix, depending on how far we want to go with it. It seems like one reason we have not yet fixed this is because we haven't decided how simple we want this hash computation to be, as discussed on Issue #10208.

See also Issue #10207 for the original motivation for SVH, PR #12533, which has some discussion (including even of the --cfg problem mentioned above).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions