Circular dependency causes problems for `bazel` users
envgap__Textualize__textual-6165
01 / FAILURE SIGNATURE
As reported upstream
ERROR: /home/tomnewton/.cache/bazel/_bazel_tomnewton/642c90ea3a7660fdc5c71f8bc8a33b6d/external/pip-svc_markdown_it_py/BUILD.bazel:5:20: in py_library rule @@pip-svc_markdown_it_py//:pkg: cycle in dependency graph:
Not a benchmark task.
- The project already builds and runs before the fix, so there is nothing to repair.
02 / ENVIRONMENT RECIPE
- Base commit
b801c15d580e9207f9482038073e30daa5b5bcf9- Manifest
pyproject.toml- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
Textualize/textual #6165 · read the original issue
## The bug
If I depend on `textual` in my `bazel` build it fails with
```
ERROR: /home/tomnewton/.cache/bazel/_bazel_tomnewton/642c90ea3a7660fdc5c71f8bc8a33b6d/external/pip-svc_markdown_it_py/BUILD.bazel:5:20: in py_library rule @@pip-svc_markdown_it_py//:pkg: cycle in dependency graph:
//<redacted>:test (50c4d2f151de9ad6b1f9f9aa93fd7a879beb1e101cafbdee129608b75954f822)
//<redacted>:test (41df9a4187a82e85de1ff1d4e0ac6efa51dd82272545174c6c15779c565129eb)
@@pip-svc//textual:pkg (41df9a4187a82e85de1ff1d4e0ac6efa51dd82272545174c6c15779c565129eb)
@@pip-svc_textual//:pkg (41df9a4187a82e85de1ff1d4e0ac6efa51dd82272545174c6c15779c565129eb)
@@pip-svc_rich//:pkg (41df9a4187a82e85de1ff1d4e0ac6efa51dd82272545174c6c15779c565129eb)
.-> @@pip-svc_markdown_it_py//:pkg (41df9a4187a82e85de1ff1d4e0ac6efa51dd82272545174c6c15779c565129eb)
| @@pip-svc_mdit_py_plugins//:pkg (41df9a4187a82e85de1ff1d4e0ac6efa51dd82272545174c6c15779c565129eb)
`-- @@pip-svc_markdown_it_py//:pkg (41df9a4187a82e85de1ff1d4e0ac6efa51dd82272545174c6c15779c565129eb)
```
This is because `textual` depends on `markdown-it-py["plugins"]` and the `plugins` option creates a cycle. Probably only `bazel` users care about this, but `bazel` needs to contruct an acyclic graph of dependencies to function, so for us its a blocker on using `textual` or any library that depends on `textual`.
With [this change](https://github.com/Textualize/textual/pull/6163/files) the dependenies are the same but there is no cycle, so it will make `bazel` users happy. Would you be willing to make such a change?04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]