🐛 `:need_outgoing:` / `:need_incoming:` naming a need that does not exist raises a KeyError and stops the build
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- documentation
Research direction
Start by reading roles/need_ref.py, where the existence check (if need_id_main not in all_needs) and the "linked need … not found" warning already live. Then compare process_need_incoming in roles/need_incoming.py and process_need_outgoing in roles/need_outgoing.py, which index the view directly at all_needs[node["reftarget"]]. Add the same guard so a missing target emits a warning and the page still renders, and cover it with a test that builds a document referencing a nonexistent need id.
Written by the indexing model from the issue text.
Description
A :need_outgoing: or :need_incoming: role whose target id names no need (for example a need that was deleted)
raises KeyError in doctree-resolved, which ends the build, on a fresh build:
process_need_incoming (roles/need_incoming.py) and process_need_outgoing (roles/need_outgoing.py) index the needs view
with the role's target (all_needs[node["reftarget"]]) without checking it exists, and the view raises (views.py:164).
:need: checks first (roles/need_ref.py: if need_id_main not in all_needs) and warns "linked need … not found".
In an incremental build on master the page holding the role is not re-written, so the build stays green with a stale page;
the incremental-build pull request (precise dependency rules) re-writes that page, which then fails the same way a fresh build does.
Expected: a warning naming the missing id, as :need: gives, and the rest of the page rendered.
Related: #1437 (how these roles use Sphinx's reference machinery).
Found while reviewing the incremental-build branch (claude/vibrant-allen-o22lej-incremental), on master 8bd37988.
- Dominant language
- Python
- Stars
- 309
- Forks
- 103
- Avg merge
- 3h 37m
- Merged PRs (30d)
- 170
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from useblocks/sphinx-needs
-
enhancement pkg: sphinx-codelinks
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
useblocks/sphinx-needs#2457 ·
Maintainers usually reply within 1 day
-
bug pkg: workspace
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
useblocks/sphinx-needs#2438 ·
Maintainers usually reply within 1 day
-
🐛 sphinx-test-reports: editing tr_report_template re-reads nothing in an incremental buildPossibly taken A pull request linked to this issue is open or already merged. Openbug pkg: sphinx-test-reports
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
useblocks/sphinx-needs#2427 ·
Maintainers usually reply within 1 day
-
bug pkg: sphinx-test-reports
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
useblocks/sphinx-needs#2411 ·
Maintainers usually reply within 1 day
-
bug pkg: sphinx-needs
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
useblocks/sphinx-needs#2338 ·
Maintainers usually reply within 1 day
All issues in useblocks/sphinx-needs
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
micropython/micropython#19906 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
FinanceFlash/unvibecode#597 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
TomAnthony/YourOwnWeigh#21 ·
Maintainers usually reply within 1 day
-
[BUG]: Compliance rules never see Unity Catalog views as viewsPossibly taken @wagnercsantos claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
databrickslabs/ontos#1348 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days