Explorer

definy.read-part-definitions

description
The definitions of the parts (the latest snapshots of the main branches) in the same order. none if there is no such part
type
Fn(
  part_ids: List<String>,
  then: Fn(definitions: List<Union{#none, #some(@core.expression)}>) -> @definy.service-io
) -> @definy.service-io
expression
fn(part_ids$0, then$1) =>
  @definy.read-snapshots(
    then: fn(commits$2) =>
      let parts$3 = @definy.snapshot-parts-flat(commits: @definy.latest-main-snapshots(commits: $2), index: 0);
      let hashes$4 = @core.list-map(
          T: String,
          U: Union{#none, #some(String)},
          f: fn(item$5) =>
            @definy.part-content-hash(parts: $3, part_id: $5, index: 0),
          xs: $0
        );
      @definy.read-definitions(
        content_hashes: @definy.some-strings(items: $4, index: 0, result: []),
        then: fn(definitions$6) =>
          $1(
            definitions: @core.list-map(
              T: Union{#none, #some(String)},
              U: Union{#none, #some(@core.expression)},
              f: fn(item$7) =>
                match $7 {
                  #some(hash$8) =>
                    @definy.definition-lookup(entries: $6, content_hash: $8),
                  #none(_) =>
                    #none
                },
              xs: $4
            )
          )
      )
  )
visibility
public
definy.read-part-definitions (project definy, branch release-time-compare, snapshot JJrRgQW_LZN6tN8CbYr1dN7HosqNTuIWWYx7ACbt1n0)
id: qzg2XIbduoXDg28s5CtgD78JuOOyT9XjESHUtq-Znhs
content hash: xgJD_jL1_NeE77VPkqewpDlY4oGSq3WjMdmwoYjZchs