{
  "schema_version": 1,
  "source_revision": "ac22ee6c77417a66c82f059948dd2df575ff558b",
  "compiler_sha256": "27e23bffc2d2b8752231c5a536f6b66134828de3e01cda1fa27dba77612b0ec9",
  "completed": true,
  "scope": "Vada context clauses: private with is accepted; limited with is accepted where it forms no cycle; a cycle through limited with is B1006. Varc shares the same context handling.",
  "support_source": "package Values is\n   type Count is range 1 .. 10;\nend Values;\n",
  "records": [
    {
      "case": "private",
      "source": "private with Values;\npackage Example is\n   X : Values.Count := 1;\nend Example;\n",
      "command": [
        "veradic",
        "--diagnostics",
        "json",
        "check",
        "<scratch>/example.vads",
        "<scratch>/values.vads"
      ],
      "expected_exit": 0,
      "actual_exit": 0,
      "passed": true,
      "stdout": "[]\n",
      "stderr": ""
    },
    {
      "case": "limited",
      "source": "limited with Values;\npackage Example is\n   X : Values.Count := 1;\nend Example;\n",
      "command": [
        "veradic",
        "--diagnostics",
        "json",
        "check",
        "<scratch>/example.vads",
        "<scratch>/values.vads"
      ],
      "expected_exit": 0,
      "actual_exit": 0,
      "passed": true,
      "stdout": "[]\n",
      "stderr": ""
    },
    {
      "case": "limited-cycle",
      "source": "limited with Values;\npackage Example is\n   X : Values.Count := 1;\nend Example;\n",
      "command": [
        "veradic",
        "--diagnostics",
        "json",
        "check",
        "<scratch>/example.vads",
        "<scratch>/values.vads"
      ],
      "expected_exit": 1,
      "actual_exit": 1,
      "passed": true,
      "stdout": "[{\"advice\":null,\"code\":\"B1006\",\"counterexample\":null,\"fixes\":[],\"instance\":null,\"message\":\"these units depend on each other: Example -> Values -> Example\",\"name\":\"circular-dependency\",\"notes\":[{\"span\":null,\"text\":\"Ada RM 10.1.1: the specifications named in with clauses must not form a cycle; move the shared declarations to a third package (Verada does not yet give `limited with` the limited view that lets units name each other: T35)\"}],\"phase\":\"driver\",\"primary\":{\"label\":\"this context clause closes the cycle\",\"span\":{\"column\":14,\"end\":19,\"endColumn\":20,\"endLine\":1,\"file\":\"<scratch>/example.vads\",\"line\":1,\"start\":13}},\"secondary\":[],\"severity\":\"error\"}]\n",
      "stderr": "",
      "support_source": "limited with Example;\npackage Values is\n   type Count is range 1 .. 10;\nend Values;\n"
    }
  ]
}
