)]}'
{
  "commit": "6152425d599996573e1d0c5236198c689db68152",
  "tree": "bbfe4c616db9686151eba50b74c2449911e1495b",
  "parents": [
    "bc884e14f16ab7d1f6729a0485dfc281239d16a5"
  ],
  "author": {
    "name": "brandjon",
    "email": "brandjon@google.com",
    "time": "Fri May 22 10:47:46 2020 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Fri May 22 10:49:04 2020 -0700"
  },
  "message": "Do .bzl load cycle detection by key instead of label\n\nThe inlining code path for StarlarkImportLookupFunction does its own cycle detection since it doesn\u0027t use Skyframe. This CL changes it to look for cycles over the graph of bzl key dependencies, instead of their projection onto their labels. This allows two distinct keys that happen to have the same label to not spuriously trigger cycle detection when inlining.\n\nThis is likely not a current problem in practice, because there doesn\u0027t seem to be a way to construct a non-cyclic path of load()s where any labels are repeated. Package bzl keys can\u0027t produce workspace keys and vice versa, even though the same .bzl file may be used for both. Likewise, I do not believe it\u0027s possible for the same label to be loaded in a cycle with distinct workspace chunking info, though I\u0027m not 100% sure. When the new @builtins pseudo-repository is added, it may conflict with a proper external repo that happens to be named \"@builtins\", but even then the two shouldn\u0027t be able to load each other.\n\nAll the same, let\u0027s cycle check the proper object in case any of these assumptions change in the future. It also brings the inlining case\u0027s cycle check in-line (ha-ha) with ordinary Skyframe evaluation\u0027s cycle check.\n\nThis is refactoring work toward adding a new kind of .bzl loading context, for Bazel-internal .bzl files.\n\nWork toward #11437.\n\nRELNOTES: None\nPiperOrigin-RevId: 312842293\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "cb270118eedae65f1b3006d1251109e01b196175",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/skyframe/StarlarkImportLookupFunction.java",
      "new_id": "16acbe7327e58213ab9013ac06256929fc893683",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/skyframe/StarlarkImportLookupFunction.java"
    }
  ]
}
