Skip to content

Proposal - manifest.References should differentiate between blobs and manifests #3401

Open

Description

@msg555

Without it I believe manifest.References() cannot be used effectively; it requires specific knowledge about the manifest type to know which references are blobs and which and manifests. For example if I wanted to write a tool to iterate through all blobs/manifests in a repository I couldn't rely on manifest.References() and would need to add my own schema specific logic for each manifest I was interested.

This also would help fix #3178 as now the garbage collector has enough information to do a proper transitive closure of the reachable set (unless we have a reason not to do this).

I imagine this could take the form of either splitting References() into two methods, e.g. ManifestReferences() and BlobReferences() (or perhaps just Manifests() and Blobs()) or just adding a boolean field to differentiate between blobs and manifests in the Descriptor struct.

Would be happy to make a PR for this if it sounds reasonable

Activity

  1. msg555 commented on Apr 25, 2021

    @msg555
    Author

    Created #3402 to demonstrate this change and the GC fix (closing #3178)

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions