Repository navigation
sphinx-needs 9.2; unique prefixes; no group with a document's target name - #35
Open
tobiaskaestner wants to merge 2 commits into
Open
tobiaskaestner wants to merge 2 commits into
tobiaskaestner wants to merge 2 commits into
Conversation
Move the engine pin (sphinx/requirements-doc.txt) and the CI pins
(doc/requirements-ci.txt) from sphinx-needs 8.3.0 to 9.2.0. 9.2 needs
two new packages, ub-needs-exchange 1.1.0 and ub-project 1.2.0; the
other CI pins are inside its ranges and stay as they are.
9.2 brings schema rules per need type and per link type, `status` as a
field with an enum (needs_statuses is deprecated), and hash fields.
One control test pinned the 8.3 defect that needs_config_state works
around: a new link type in the TOML crashed an incremental build. 9.2
reads the document again itself ("config changed ('needs_links')"), so
the control now pins that. A removed link type still crashes an
importing document without the extension; a second control pins that
case, which is why the extension stays.
Both unit suites pass with 9.2.0 (557 tests).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tobias Kaestner <tobias.kaestner@inovex.de>
… name Two registry mistakes passed validation and failed later: - Two documents with the same prefix in one link map. intersphinx_mapping and doxylink are dicts keyed by prefix, so one document replaced the other, without a message. The default prefix counts (ids my-doc and my_doc clash). A Sphinx and a Doxygen document may still share a prefix: they key different maps and roles. External and crossref: false documents are in no map. - A group id equal to the id of a document with the same builder. The group's <group>-<builder> aggregate and the document's own <id>-<builder> target had one name, and CMake stopped with a duplicate target error that did not name the registry. Both are now configure-time errors in docrefs._validate that name the documents (and the group). The registry schema, the registry explanation and the comment in doc/documents.yaml say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tobias Kaestner <tobias.kaestner@inovex.de>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #34
Independent of the other open PRs for #29, #25 and #26 (all based on
main); none of them needs sphinx-needs 9.2.What changed
build: sphinx-needs 9.2.0: the engine pin (sphinx/requirements-doc.txt) and the CI pins (doc/requirements-ci.txt) move from 8.3.0 to 9.2.0. 9.2 needs two new packages,ub-needs-exchange==1.1.0andub-project==1.2.0(added to the CI pins). All other CI pins are inside 9.2's ranges and stay as they are (pip install --dry-run -r doc/requirements-ci.txtresolves with only these three changes).needs_config_state: a new link type in the TOML crashed an incremental build. 9.2 re-reads the document itself (config changed ('needs_links')), so that control now pins the 9.2 behaviour. A removed link type still crashes an importing document without the extension, so a second control pins that case and the extension stays. Docstrings,zdocs_confand the consumer contract now describe it that way.feat: docrefs: unique prefixes, and no group with a document's target name: two configure-time checks indocrefs._validate, with messages that name the documents:sphinx/sphinx-externaldocuments (intersphinx_mapping) or twodoxygen/doxygen-externaldocuments (doxylink) with the same prefix. The default prefix counts too (my-docandmy_docclash). A Sphinx and a Doxygen document may still share a prefix, because they key different maps and different roles.externalandcrossref: falsedocuments are in no map.<group>-<builder>aggregate has the same name as a document's own target (themanual/manual-htmlcase fromdoc/documents.yaml). Before this, CMake stopped with a duplicate-target error that did not name the registry.prefix, groupid), the registry explanation, and the comment indoc/documents.yaml.Why
#34: the pin has been run against 9.2 without problems, and 9.2 adds per-type schema rules, a
statusenum and hash fields. Both mistakes above were documented as "not validated" and only failed later, if at all.How tested
test_docrefs_consistency.py(11 tests). Control: without thedocrefs.pychange, its 6 reject tests fail.zdocs-tests) against this branch with 9.2: 238 passed, 11 failed, 20 skipped. That is the same failure set asmainwith 8.3 in the same environment, so the bump adds no regression. The 11 failures come from the environment and are already there onmain: no LaTeX toolchain (latexmk stub), no SSH, the suite's own topology/test-manifest checks, and absolute-base_urllink assertions that predate ADR 0012. Run in a west workspace built for the suite underbuild/(zdocs as a worktree attools/zdocs, a 13 MB Zephyr subset). I added the fixture tagswidget/v2.3,handbook/v1.4andduties/v0.9locally;duties/v0.9is not in the README's list.doc/) build with 9.2:doc-checkOK, empty stage-2 logs.-W, sphinx-needs schemas) passescheck --allagainst this branch.Open question
🤖 Generated with Claude Code