Explorer

core.part-reference-violations

description
The references of part to the part IDs from index that cannot be referenced (core.check-reference-visibility). Parts in the snapshot are found before environment; unknown parts are left to the type checker
type
Fn(
  project_name: String,
  committed_index: List<List<@core.visibility-checked-part>>,
  environment_index: List<List<@core.visibility-target>>,
  part: @core.visibility-checked-part,
  ids: List<String>,
  index: Number
) -> List<@core.visibility-violation>
expression
fn(project_name$0, committed_index$1, environment_index$2, part$3, ids$4, index$5) =>
  match @core.list-get(list: $4, index: $5) {
    #none(_) =>
      [],
    #some(item$1010) =>
      let id$6 = $1010;
      @core.list-concat(
        left: match match @core.list-hash-index-find(index: $1, field: "id", value: $6) {
            #some(found$7) =>
              #some({
                id: $7.id,
                name: $7.name,
                module_name: $7.module_name,
                project_name: $0,
                visibility: $7.visibility,
                module_visibility: $7.module_visibility
              }),
            #none(_) =>
              @core.list-hash-index-find(index: $2, field: "id", value: $6)
          } {
          #none(_) =>
            [],
          #some(target$8) =>
            match @core.reference-violation(project_name: $0, module_name: $3.module_name, target: $8) {
              #none(_) =>
                [],
              #some(reason$9) =>
                [{part_name: $3.name, target_name: $8.name, reason: $9}]
            }
        },
        right: @core.part-reference-violations(
          project_name: $0,
          committed_index: $1,
          environment_index: $2,
          part: $3,
          ids: $4,
          index: @core.plus(left: $5, right: 1)
        )
      )
  }
visibility
public
core.part-reference-violations (project definy, branch main, snapshot CfIAXM725tR74SWd4aoTUz4-JJQfqnllblZbQ2Sv204)
id: 9pl__rj13OK-gcfDZXFrwhMWD-_mQCUWkgM0_U0az4Y
content hash: zC-tHapLnydmO96SklEecgzjAstHGcljP9qW0sdd7cQ