Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix semantics of Record equality #1105

Merged
merged 4 commits into from
Mar 8, 2023

Commits on Feb 26, 2023

  1. Configuration menu
    Copy the full SHA
    ec257a6 View commit details
    Browse the repository at this point in the history
  2. Fix Attachment.iter_source_filenames

    It should return the both the alt-specific and the fallback .lr
    filenames (in addition to the attachment filename.)
    dairiki committed Feb 26, 2023
    Configuration menu
    Copy the full SHA
    b32120f View commit details
    Browse the repository at this point in the history
  3. SourceObject subclasses should all implement .iter_source_filenames

    The SourceObject.source_filename property now just returns the first
    of the filenames returned by the iter_source_filenames method.
    dairiki committed Feb 26, 2023
    Configuration menu
    Copy the full SHA
    2189084 View commit details
    Browse the repository at this point in the history
  4. Make the identity key (source, alt) explicit for VirtualSourceObjects

    Both Records and VirtualSourceObjects are described by the identity
    key (path, alt, pad).  That is, if
    
       obj2 = pad.get(obj.path, alt=obj.path)
    
    then
    
       obj2 == obj
    
    Records already had __eq__ and __hash__ methods which made this
    explicit.  Here we add those methods for VirtualSourceObjects.
    
    Note this allows us to convert Context.referenced_virtual_dependencies
    from a dict to a set.  (The key was only being used as an identity key
    for the VirtualSourceObjects.)
    dairiki committed Feb 26, 2023
    Configuration menu
    Copy the full SHA
    a1bdd9c View commit details
    Browse the repository at this point in the history