Skip to content

Fingerprint reformed enum inputs by a stable module name #785

Backlog

Description

@MaxGhenis

The flat-file fingerprint in #733 hashes an enum input's module name. It swaps in the variable's stable module_name only when the enum and the variable class share a module (add_enum).

Core loads each variable file under a module name built from id(system) and hash(abspath), which changes between systems and between processes. When a reform replaces a variable with update_variable, the variable class comes from the reform's module while its enum can stay in the original variable file. The fingerprint then hashes a process-specific name, so the same file and reform can give different fingerprints in two runs and miss the cache.

Fix: when the enum's module is a Core-generated name, hash the variable's module_name with enum.__qualname__ and the member names. Add a test with an enum whose module carries a generated name.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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