)]}'
{
  "commit": "ed2035a3cc85d3c87c99c017608c7cf0f984ec7c",
  "tree": "7a312bc2efc3319507ebcee19b48e8739a018b52",
  "parents": [
    "24fc909c0da13ef641d5ae75e89b5a97f25e37aa"
  ],
  "author": {
    "name": "Conrad Burchert",
    "email": "conrad.burchert@gmail.com",
    "time": "Wed Apr 09 23:38:12 2025 +0200"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Apr 09 14:38:12 2025 -0700"
  },
  "message": "Bazel: Migrate to bzlmod (#1530)\n\nThis migrates the bazel integration to the new Bazel dependency system\n\"bzlmod\". bzlmod is becoming mandatory this year (see second sentence\nhere: https://bazel.build/external/migration).\n\nThis is a backwards incompatible migration, directly removing the old\nWORKSPACE based approach. Users will have to change how they depend on\nbzlmod, however I assume pretty much every user will be happy about it,\nbecause they are forced to use bzlmod anyway or add extra flags to\ncontinue to build with newer Bazel versions. Given that users normally\ndepend on specific git commits in the old system, they won\u0027t be hit with\nthis until they decide to upgrade emsdk.\n\nThe basic principle here is simple: I took everything that WORKSPACE did\nand searched an alternative in bzlmod. Some interesting bits:\n\n- We have less worries about multiple versions and people depending on\nemscripten multiple times in different ways. This is resolved by the new\nsystem: Bazel first iterates through the MODULE.bazel files recursively,\nthen finds the minimum version needed for each module and then executes\nthe module extensions that define repos exactly once at that version. So\nno more ifs needed to detect multiple inclusions.\n- A bunch of nodejs stuff moves to MODULE.bazel, because that is how the\nnodejs module works now. As their module extension gets executed only\nonce you need to declare everything that you could need before that in\nthe MODULE.bazel file. A side effect of that is that we have to make a\nfake repository when emscripten doesn\u0027t have an arm64 binary for linux,\nbecause we can\u0027t actually figure that out in MODULE.bazel, so we have to\ndeclare that it always exists and then create one in all cases.\n\nThere is a bunch of autoformatter changes in here as well, I could try\nto revert them if you prefer.\n\nCloses #1509",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f4c79902c5e9e3cd4b7b59bfda2a299d2f594bde",
      "old_mode": 33188,
      "old_path": ".circleci/config.yml",
      "new_id": "aebb7895e56a0e6cca570cd3519405403e846ba3",
      "new_mode": 33188,
      "new_path": ".circleci/config.yml"
    },
    {
      "type": "modify",
      "old_id": "cb3135ce02b1e3376069bc0bbd35b14e7d1827a5",
      "old_mode": 33188,
      "old_path": "bazel/BUILD",
      "new_id": "387dc669d5b58aa38bac4f25a04850ef4a8bd509",
      "new_mode": 33188,
      "new_path": "bazel/BUILD"
    },
    {
      "type": "modify",
      "old_id": "7f51cebf451c7dadbf694d843696b98f0f0f8eaf",
      "old_mode": 33188,
      "old_path": "bazel/MODULE.bazel",
      "new_id": "a2560fe747cf51c13e5e1ca9a4c3e8d3dfb3065f",
      "new_mode": 33188,
      "new_path": "bazel/MODULE.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "69ca244b7bf8bf61e8a289d0bc8eac84faaa92d3",
      "new_mode": 33188,
      "new_path": "bazel/MODULE.bazel.lock"
    },
    {
      "type": "modify",
      "old_id": "d650441308240d44a619254ecc8389c8924537a1",
      "old_mode": 33188,
      "old_path": "bazel/README.md",
      "new_id": "b53e6ece4e5d347773c5678c2783fe2a5d2edd0e",
      "new_mode": 33188,
      "new_path": "bazel/README.md"
    },
    {
      "type": "delete",
      "old_id": "bd5cce5b0eef849b42c164ab6f4b2113540c40b5",
      "old_mode": 33188,
      "old_path": "bazel/WORKSPACE",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "delete",
      "old_id": "7543565d80c888f0b567ff2338a8f564d9b05f3b",
      "old_mode": 33188,
      "old_path": "bazel/deps.bzl",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "0d7aff28ca543b3291620283416ae39f161eed74",
      "new_mode": 33188,
      "new_path": "bazel/emscripten_build_file.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "945c19c011902e41339d3e1de504153b3cc07393",
      "new_mode": 33188,
      "new_path": "bazel/emscripten_cache.bzl"
    },
    {
      "type": "modify",
      "old_id": "9d020bd44f6f6ca27f5d7819507f329a1f1d2617",
      "old_mode": 33188,
      "old_path": "bazel/emscripten_deps.bzl",
      "new_id": "79dca5279f62251f6c90b9d3cff89ef9cef064bf",
      "new_mode": 33188,
      "new_path": "bazel/emscripten_deps.bzl"
    },
    {
      "type": "modify",
      "old_id": "a98945072d13be97637138a5a69787a63fc72c36",
      "old_mode": 33188,
      "old_path": "bazel/emscripten_toolchain/BUILD.bazel",
      "new_id": "ebbc2e996f6f6069e3b3e36c51c8b8b2195a9043",
      "new_mode": 33188,
      "new_path": "bazel/emscripten_toolchain/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "b8e9125862e0428badd14adccac8f1aa41d290a5",
      "old_mode": 33188,
      "old_path": "bazel/emscripten_toolchain/emar.bat",
      "new_id": "c8068089f2ea5e1f3ea4131d1af753fe03c28895",
      "new_mode": 33188,
      "new_path": "bazel/emscripten_toolchain/emar.bat"
    },
    {
      "type": "modify",
      "old_id": "aba66f45d2ea57756b375775cb1ba921338355a8",
      "old_mode": 33188,
      "old_path": "bazel/emscripten_toolchain/emcc.bat",
      "new_id": "4088bc4ae3f1661a78152d4259535c0d01d62bfb",
      "new_mode": 33188,
      "new_path": "bazel/emscripten_toolchain/emcc.bat"
    },
    {
      "type": "modify",
      "old_id": "8e5a6eb1a97b1909957e048a5a0a1223bf78b714",
      "old_mode": 33188,
      "old_path": "bazel/emscripten_toolchain/emcc_link.bat",
      "new_id": "f49cb0d582c7634fbd7983c182a456dbe368f634",
      "new_mode": 33188,
      "new_path": "bazel/emscripten_toolchain/emcc_link.bat"
    },
    {
      "type": "modify",
      "old_id": "644519ebf04cdf44c98df600d246dfecc0f3d47c",
      "old_mode": 33188,
      "old_path": "bazel/emscripten_toolchain/env.bat",
      "new_id": "c791ff7710c5223bb65ed5b7ccd84220237e883e",
      "new_mode": 33188,
      "new_path": "bazel/emscripten_toolchain/env.bat"
    },
    {
      "type": "modify",
      "old_id": "c8cec07158104cbce64a4222cbc1690ff4b10fb2",
      "old_mode": 33188,
      "old_path": "bazel/emscripten_toolchain/toolchain.bzl",
      "new_id": "ae2939fff2b4676d84900d852599f1da80710a02",
      "new_mode": 33188,
      "new_path": "bazel/emscripten_toolchain/toolchain.bzl"
    },
    {
      "type": "modify",
      "old_id": "6ea4f127f08a9c3a80fa9979f65f93e93bcd812d",
      "old_mode": 33188,
      "old_path": "bazel/emscripten_toolchain/wasm_cc_binary.bzl",
      "new_id": "3cc60148589deaa04990346ae94aeaca9ab59e28",
      "new_mode": 33188,
      "new_path": "bazel/emscripten_toolchain/wasm_cc_binary.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "819a0480802de37495fee84869c03c0b3b538686",
      "new_mode": 33188,
      "new_path": "bazel/remote_emscripten_repository.bzl"
    },
    {
      "type": "modify",
      "old_id": "f91ca3ae59ff3ea9ad71c5144dfd916bab087af5",
      "old_mode": 33188,
      "old_path": "bazel/revisions.bzl",
      "new_id": "2a1e266aead591a66ab31b2a4cf5842917ee6ce5",
      "new_mode": 33188,
      "new_path": "bazel/revisions.bzl"
    },
    {
      "type": "modify",
      "old_id": "7f51cebf451c7dadbf694d843696b98f0f0f8eaf",
      "old_mode": 33188,
      "old_path": "bazel/test_external/MODULE.bazel",
      "new_id": "78fdaeb7da4e4df63501f17d6a66a7516b0ed3f1",
      "new_mode": 33188,
      "new_path": "bazel/test_external/MODULE.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f3742587c30bfe95b05762d54aa9103b6ce1bf0f",
      "new_mode": 33188,
      "new_path": "bazel/test_external/MODULE.bazel.lock"
    },
    {
      "type": "delete",
      "old_id": "03f07f5070c9876d1479425b4a3c3462bd98cd85",
      "old_mode": 33188,
      "old_path": "bazel/test_external/WORKSPACE",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "modify",
      "old_id": "7f51cebf451c7dadbf694d843696b98f0f0f8eaf",
      "old_mode": 33188,
      "old_path": "bazel/test_secondary_lto_cache/MODULE.bazel",
      "new_id": "0fabdc89e5b82e178cb2bd78f8c917d01a40886e",
      "new_mode": 33188,
      "new_path": "bazel/test_secondary_lto_cache/MODULE.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a340fd7b88abcfe6af7d7e87856f7985d4643f8d",
      "new_mode": 33188,
      "new_path": "bazel/test_secondary_lto_cache/MODULE.bazel.lock"
    },
    {
      "type": "delete",
      "old_id": "d9e554bb1a64e9c5788d412d7409b5b1e0ea4945",
      "old_mode": 33188,
      "old_path": "bazel/test_secondary_lto_cache/WORKSPACE",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "delete",
      "old_id": "caa1ba12676cf38d627fb7d681709902169bb720",
      "old_mode": 33188,
      "old_path": "bazel/toolchains.bzl",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "modify",
      "old_id": "d6ea540e0fe603426bfe61f15617128bd10f71a6",
      "old_mode": 33261,
      "old_path": "scripts/update_bazel_workspace.py",
      "new_id": "d451dbf5ffdab5f13df54b0e20041a7fa63b6607",
      "new_mode": 33261,
      "new_path": "scripts/update_bazel_workspace.py"
    },
    {
      "type": "modify",
      "old_id": "cf741b84a9e945242316927d00eb895ff5d8f731",
      "old_mode": 33261,
      "old_path": "test/test_bazel.sh",
      "new_id": "682866fd53efc3fed4a76fc9aa9e447f3340b8e3",
      "new_mode": 33261,
      "new_path": "test/test_bazel.sh"
    },
    {
      "type": "modify",
      "old_id": "2b596ee4f711e6cc782dc7444f51a77aa8efc860",
      "old_mode": 33261,
      "old_path": "test/test_bazel_mac.sh",
      "new_id": "e27c657daf2cf33f48650c4ec06911200ccdfe9e",
      "new_mode": 33261,
      "new_path": "test/test_bazel_mac.sh"
    }
  ]
}
