)]}'
{
  "commit": "084865d1a92f1b699a20d3535d7b5c6e3d4a6833",
  "tree": "e7d8f1f503f86666bcdaa067f7e346fd70811a3c",
  "parents": [
    "d5a595c6f2b95b5174b1373ed09b3be2740ce869"
  ],
  "author": {
    "name": "Ben Dunkin",
    "email": "chewygumbal@gmail.com",
    "time": "Sun Dec 01 04:56:53 2024 -0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Sun Dec 01 12:56:53 2024 +0000"
  },
  "message": "fix: dependency resolver on windows only works when --enable_runfiles and --windows_enable_symlinks is used (#2457)\n\n`compile_pip_requirements` doesn\u0027t work as expected on Windows unless\nboth `--enable_runfiles` and `--windows_enable_symlinks` are used. Both\noptions default to off on Windows because the filesystem on Windows\nmakes setting up the runfiles directories with actual files very slow.\nThis means that anyone on Windows with a default set up has to search\naround the Github issues to try and figure out why things don\u0027t work as\nadvertised.\n\nThe `dependency_resolver.py` doesn\u0027t inherently require these options,\nit just had two bugs that prevented it from working.\n\n1. calling pip_compile exits the whole program so it never gets to run\nthe code that should copy the output to the source tree. Things just\nhappen to work on linux because the runfiles are symlinks, and it does\nnot need to copy anything.\n2. it assumed the `runfiles` resolved file would be in the runfiles\ntree, but on Windows, when `--enable_runfiles` is not set, it actually\ngets resolved to a file in the source tree.\n\nBefore:\n```sh\nbazel run //third_party/python:requirements.update\nStarting local Bazel server and connecting to it...\nINFO: Invocation ID: 8aa3e832-78ce-4999-912b-c43e7ca3212b\nINFO: Analyzed target //third_party/python:requirements.update (129 packages loaded, 9563 targets configured).\nINFO: Found 1 target...\nTarget //third_party/python:requirements.update up-to-date:\n  bazel-bin/third_party/python/requirements.update.zip\n  bazel-bin/third_party/python/requirements.update.exe\nINFO: Elapsed time: 60.964s, Critical Path: 0.77s\nINFO: 8 processes: 2 remote cache hit, 6 internal.\nINFO: Build completed successfully, 8 total actions\nINFO: Running command line: bazel-bin/third_party/python/requirements.update.exe \u0027--src\u003d_main/third_party/python/requirements.txt\u0027 _main/third_party/python/requirements_lock.txt //third_party/python:requirements.update \u0027--resolver\u003dbacktracking\u0027 --allow-unsafe --generate-hashes \u0027--requirements-windows\u003d_main/third_party/python/requirements_windows.txt\u0027 --strip-extras\nUpdating third_party/python/requirements_windows.txt\nError: Could not open file \u0027third_party/python/requirements_windows.txt\u0027: No such file or directory\n```\n\nAfter:\n```sh\nbazel run //third_party/python:requirements.update\nINFO: Invocation ID: 39f999a0-6c1d-4b2c-a1be-3d71e838916a\nINFO: Analyzed target //third_party/python:requirements.update (5 packages loaded, 45 targets configured).\nINFO: Found 1 target...\nTarget //third_party/python:requirements.update up-to-date:\n  bazel-bin/third_party/python/requirements.update.zip\n  bazel-bin/third_party/python/requirements.update.exe\nINFO: Elapsed time: 5.410s, Critical Path: 4.79s\nINFO: 2 processes: 1 internal, 1 local.\nINFO: Build completed successfully, 2 total actions\nINFO: Running command line: bazel-bin/third_party/python/requirements.update.exe \u0027--src\u003d_main/third_party/python/requirements.txt\u0027 _main/third_party/python/requirements_lock.txt //third_party/python:requirements.update \u0027--resolver\u003dbacktracking\u0027 --allow-unsafe --generate-hashes \u0027--requirements-windows\u003d_main/third_party/python/requirements_windows.txt\u0027 --strip-extras\nUpdating third_party/python/requirements_windows.txt\n#\n# This file is autogenerated by pip-compile with Python 3.13\n# by the following command:\n#\n#    bazel run //third_party/python:requirements.update\n#\nmpmath\u003d\u003d1.3.0 \\\n    --hash\u003dsha256:7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f \\\n    --hash\u003dsha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c\n    # via sympy\nsympy\u003d\u003d1.13.3 \\\n    --hash\u003dsha256:54612cf55a62755ee71824ce692986f23c88ffa77207b30c1368eda4a7060f73 \\\n    --hash\u003dsha256:b27fd2c6530e0ab39e275fc9b683895367e51d5da91baa8d3d64db2565fec4d9\n    # via -r G:/projects/bedrock-engine/third_party/python/requirements.txt\n```\nAnd `//third_part/python:requirements_windows.txt` is updated.\n\nFixes #1943 \nFixes #1431\n\n---------\n\nCo-authored-by: Ignas Anikevicius \u003c240938+aignas@users.noreply.github.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "37a9e710a1e1bafe88c7e69e4424bb0125fee708",
      "old_mode": 33188,
      "old_path": "CHANGELOG.md",
      "new_id": "1fa047b47d1c46789e3006ff77f9bf3789cccb5f",
      "new_mode": 33188,
      "new_path": "CHANGELOG.md"
    },
    {
      "type": "modify",
      "old_id": "0ff9b2fb7c23f71940a2c070cf71f9a62e19c121",
      "old_mode": 33188,
      "old_path": "python/private/pypi/dependency_resolver/dependency_resolver.py",
      "new_id": "293377dc6dca887b8d3819b2d453b42be8f1f437",
      "new_mode": 33188,
      "new_path": "python/private/pypi/dependency_resolver/dependency_resolver.py"
    }
  ]
}
