)]}'
{
  "commit": "be950f9c2448f85332322fd4f7918b940bf45bfd",
  "tree": "b7d065d7db7fa6cab18c49e5b66780e202d239dc",
  "parents": [
    "e3c940681a38131a491263d721f14bd8fe528273"
  ],
  "author": {
    "name": "Ignas Anikevicius",
    "email": "240938+aignas@users.noreply.github.com",
    "time": "Mon Dec 23 21:44:54 2024 +0900"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Dec 23 12:44:54 2024 +0000"
  },
  "message": "refactor(pypi): A better error message when the wheel select hits no_match (#2519)\n\nWith this change we get the current values of the python configuration\nvalues printed in addition to the message printed previously. This\nshould help us advise users who don\u0027t have their builds configured\ncorrectly.\n\nWe are adding an extra `build_setting` which we can set in order to get\nan error message instead of a `DEBUG` warning. This has been documented\nas part of our config settings and in the `no_match_error` in the\n`select` statement.\n\nExample output now\n```console\n$ bazel cquery --@rules_python//python/config_settings:python_version\u003d3.12 @dev_pip//sphinx\nDEBUG: /home/aignas/src/github/aignas/rules_python/python/private/config_settings.bzl:193:14: The current configuration rules_python config flags is:\n    @@//python/config_settings:pip_whl: \"auto\"\n    @@//python/config_settings:pip_whl_glibc_version: \"\"\n    @@//python/config_settings:pip_whl_muslc_version: \"\"\n    @@//python/config_settings:pip_whl_osx_arch: \"arch\"\n    @@//python/config_settings:pip_whl_osx_version: \"\"\n    @@//python/config_settings:py_freethreaded: \"no\"\n    @@//python/config_settings:py_linux_libc: \"glibc\"\n    @@//python/config_settings:python_version: \"3.12\"\n\nIf the value is missing, then the default value is being used, see documentation:\nhttps://rules-python.readthedocs.io/en/latest/api/rules_python/python/config_settings\nERROR: /home/aignas/.cache/bazel/_bazel_aignas/6f0de8c9128ee8d5dbf27ba6dcc48bdd/external/+pip+dev_pip/sphinx/BUILD.bazel:6:12: configurable attribute \"actual\" in @@+pip+dev_pip//sphinx:_no_matching_repository doesn\u0027t match this configuration: No matching wheel for current configuration\u0027s Python version.\n\nThe current build configuration\u0027s Python version doesn\u0027t match any of the Python\nwheels available for this distribution. This distribution supports the following Python\nconfiguration settings:\n    //_config:is_cp3.11_py3_none_any\n    //_config:is_cp3.13_py3_none_any\n\nTo determine the current configuration\u0027s Python version, run:\n    `bazel config \u003cconfig id\u003e` (shown further below)\n\nFor the current configuration value see the debug message above that is\nprinting the current flag values. If you can\u0027t see the message, then re-run the\nbuild to make it a failure instead by running the build with:\n    --@@//python/config_settings:current_config\u003dfail\n\nHowever, the command above will hide the `bazel config \u003cconfig id\u003e` message.\n\nThis instance of @@+pip+dev_pip//sphinx:_no_matching_repository has configuration identifier 29ffcf8. To inspect its configuration, run: bazel config 29ffcf8.\n\nFor more help, see https://bazel.build/docs/configurable-attributes#faq-select-choose-condition.\n\nERROR: Analysis of target \u0027@@+pip+dev_pip//sphinx:sphinx\u0027 failed; build aborted: Analysis failed\nINFO: Elapsed time: 0.112s\nINFO: 0 processes.\nERROR: Build did NOT complete successfully\n```\n\nFixes #2466\n\n---------\n\nCo-authored-by: Richard Levasseur \u003crichardlev@gmail.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9976d2027c90faa172e1e85b53433ad162b332c4",
      "old_mode": 33188,
      "old_path": "CHANGELOG.md",
      "new_id": "9a3436487e138e8d8b0a07d28da29453c4c274a3",
      "new_mode": 33188,
      "new_path": "CHANGELOG.md"
    },
    {
      "type": "modify",
      "old_id": "ef829bab769bda58b0bfbc3e8568828649265d1f",
      "old_mode": 33188,
      "old_path": "docs/api/rules_python/python/config_settings/index.md",
      "new_id": "793f6e08fdf0079e0b376cb7132e5cd510520eeb",
      "new_mode": 33188,
      "new_path": "docs/api/rules_python/python/config_settings/index.md"
    },
    {
      "type": "modify",
      "old_id": "5455f5aef7acc6151bc2b7cc9be880a73e5bbe0c",
      "old_mode": 33188,
      "old_path": "python/config_settings/BUILD.bazel",
      "new_id": "fcebcd76dc41205694decd7ac1497e674d5e7628",
      "new_mode": 33188,
      "new_path": "python/config_settings/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "10b4d686a759563a61bc55a62442764cd90e79ad",
      "old_mode": 33188,
      "old_path": "python/private/config_settings.bzl",
      "new_id": "e5f9d865d15b64031f7b1ee660a40a3140385eed",
      "new_mode": 33188,
      "new_path": "python/private/config_settings.bzl"
    },
    {
      "type": "modify",
      "old_id": "a6872fdce9733b29030227a84ece07119bcc3756",
      "old_mode": 33188,
      "old_path": "python/private/pypi/pkg_aliases.bzl",
      "new_id": "980921b474947fe108c89a9febf44114170fe688",
      "new_mode": 33188,
      "new_path": "python/private/pypi/pkg_aliases.bzl"
    },
    {
      "type": "modify",
      "old_id": "23a0f01db94c9132b831d7b9c0e5bd61ade0b819",
      "old_mode": 33188,
      "old_path": "tests/pypi/pkg_aliases/pkg_aliases_test.bzl",
      "new_id": "f13b62f13df588b3a7a675fc38f8d8dcab48dc82",
      "new_mode": 33188,
      "new_path": "tests/pypi/pkg_aliases/pkg_aliases_test.bzl"
    }
  ]
}
