Commit 27132bd
Fix docs build broken by sphinx-argparse commands domain (microsoft#2551)
## Describe your changes
sphinx-argparse 0.6.0 registers a `commands` domain (`ArgParseDomain`)
that does not implement the standard Sphinx `Domain.resolve_any_xref`
API. MyST falls back to calling the domain's `resolve_xref` for every
markdown cross-reference, and that method logs `Error, no command xref
target from ...` for each target it doesn't own, including links that
already resolve via doc/std resolution. Under `-W`, this flood of
warnings fails the docs build.
This adds a `resolve_any_xref` implementation to `ArgParseDomain` in
`docs/source/conf.py`, supplying the API the extension omits so MyST
resolves real command targets and skips the noisy fallback. This also
removes the `myst.domains` legacy-domain warning, so the earlier
`suppress_warnings` entry for it is dropped. No version pin is added to
`docs/requirements.txt`.
The rendered HTML is byte-identical to before; only the spurious
warnings are gone. The `sphinx-build -W` build passes.
## Checklist before requesting a review
- [ ] Add unit tests for this change.
- [x] Make sure all tests can pass.
- [x] Update documents if necessary.
- [ ] Lint and apply fixes to your code by running `lintrunner -a`
- [ ] Is this a user-facing change? If yes, give a description of this
change to be included in the release notes.
## (Optional) Issue link
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 2bf92ed commit 27132bd
1 file changed
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
68 | 100 | | |
69 | 101 | | |
70 | 102 | | |
| |||
0 commit comments