Skip to content

Turn StorePathMetadata into Metadata a #147

@sorki

Description

@sorki

Related to #146, allows us to extend various path types, motivation in #148.

Draft:

 -- | Metadata about a 'StorePath'
-data StorePathMetadata = StorePathMetadata
+data Metadata a = Metadata
   { -- | The path this metadata is about
-    path :: !StorePath
+    path :: !a
   , -- | The path to the derivation file that built this path, if any
     -- and known.
-    deriverPath :: !(Maybe StorePath)
+    deriverPath :: !(Maybe a)
   , -- TODO should this be optional?
     -- | The hash of the nar serialization of the path.
     narHash :: !SomeNamedDigest
   , -- | The paths that this path directly references
-    references :: !StorePathSet
+    references :: !(HashSet a)
   , -- | When was this path registered valid in the store?
     registrationTime :: !UTCTime
   , -- | The size of the nar serialization of the path, in bytes.
@@ -43,6 +43,8 @@ data StorePathMetadata = StorePathMetadata
     contentAddressableAddress :: !(Maybe ContentAddressableAddress)
   }
 
+type StorePathMetadata = Metadata StorePath

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