• Re: Add -W option to sphinx-build? (Re: ddp build failed)

    From Paul Gevers@21:1/5 to All on Sun Jun 15 14:00:02 2025
    Copy: [email protected] (Richard Lewis)

    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------i6nbF055QnMo9wn9rnrQP0wG
    Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64

    SGksDQoNCk9uIDE1LTA2LTIwMjUgMTM6MjUsIEhvbGdlciBXYW5zaW5nIHdyb3RlOg0KPiBT bywgZG8gd2Ugd2FudCB0aGlzIGNoYW5nZT8NCg0KDQpJIHRoaW5rIHNvLg0KDQpQYXVsDQo=


    --------------i6nbF055QnMo9wn9rnrQP0wG--

    -----BEGIN PGP SIGNATURE-----

    wsC7BAABCABvBYJoTrOiCRCcXJnrBb11CkcUAAAAAAAeACBzYWx0QG5vdGF0aW9u cy5zZXF1b2lhLXBncC5vcmePB3HmOWGuV3zUQLr9W5nv1sg52y5SuyCdhsyNV1hO cBYhBFi2bUhza+k7BS3mcpxcmesFvXUKAAAzMQgAmWm2z8NPiTIBA6Vuwmm7Nas+ JCjnt9NWp7tO1BfbCkLfUJwXGXJe0dE1t87t5LmTIXWUQxMnYQzuOiixFCBV9jGE lKQaSLLDbQlLu3kCYV6MG0AO0YxhOS8lTKB6FxRTrLh0lpaqHOKbEmQ3sSAz9fH5 vYH/hxuKQ28zaU0B/mwLL0XmTwbilSIiDzzuYmMi3yuesqb1swZJFUPYaEYqJtlL 6qMx+9wf1KQNC2v8YaPSzlM1VnyOX3qisGkrHzBhKuXkm1cDdMOiws+sC4FXKKcb qsBYPhJZaqqiPrOrqxF8/q/9ZZm5LEOo7p0kVc3s8bd4iuOp7YE98UHdePgj4w==
    =Qvj9
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Holger Wansing@21:1/5 to Richard Lewis on Sun Jun 15 13:30:02 2025
    This is a multi-part message in MIME format.

    Hi,

    Richard Lewis <[email protected]> wrote (Sat, 31 May 2025 22:19:47 +0100):
    Holger Wansing <[email protected]> writes:

    /srv/www.debian.org/release-notes/release-notes/source/issues.rst:: ERROR: Anonymous hyperlink mismatch: 1 references but 0 targets.

    I think this is line 27 which should have `...` around the url (although it's odd that the pipeines never failed for this?)

    And: I think the pipeline did not fail, because this is just a warning (even if it's shown above as an ERROR).

    I have no idea, if this error/warning handling can be adapted ...

    It looks like the -W option to sphinx-build turns warnings into errors, so maybe doing

    make html SPHINXOPTS="-W"

    in .gitlab-ci.yml might work (untested)

    Adding -W to all sphinx-build commands in Makefile seems to work
    (see diff attached).
    A test with an typo like the one mentioned above stops the build with error.

    And in fact, building all languages with the -W option uncovers an until now unvisible error in both chinese langs (zh_CN and zh_TW).

    By -W, translators would be made aware of such typos as well, when they test-build their translation.



    So, do we want this change? Any disadvantages to expect?


    Holger



    --
    Holger Wansing <[email protected]>
    PGP-Fingerprint: 496A C6E8 1442 4B34 8508 3529 59F1 87CA 156E B076

    diff --git a/Makefile b/Makefile
    index e45cc726..d76025a3 100644
    --- a/Makefile
    +++ b/Makefile
    @@ -90,7 +90,7 @@ text: $(TEXT_FILES)
    # Somehow -M doesn't work well, so use -b
    $(BUILD_DIR)/%/text/$(PACKAGE).txt: $(SOURCE_FILES)
    rm -f $@
    - $(SPHINX) -b text -D language=$* -d $(BUILD_DIR)/$* $(SOURCE_DIR) $(@D) + $(SPHINX) -W -b text -D language=$* -d $(BUILD_DIR)/$* $(SOURCE_DIR) $(@D)
    # Make $(PACKAGE).txt
    cp $(@D)/index.txt $@
    set -e; \
    @@ -107,7 +107,7 @@ pdf: $(PDF_FILES)
    # Somehow -M doesn't work well, so use -b
    $(BUILD_DIR)/%/pdf/$(PACKAGE).pdf: $(SOURCE_FILES)
    echo "* Starting pdf build for: $*"
    - $(SPHINX) -b latex -D language=$* -d $(BUILD_DIR)/$* $(SOURCE_DIR) $(@D)
    + $(SPHINX) -W -b latex -D language=$* -d $(BUILD_DIR)/$* $(SOURCE_DIR) $(@D)
    echo "Starting: $(MAKE) -C $(@D)"
    $(MAKE) -C $(@D)

    @@ -131,7 +131,7 @@ epub: $(EPUB_FILES)

    # Somehow -M doesn't work well, so use -b
    $(BUILD_DIR)/%/epub/$(PACKAGE).epub: $(SOURCE_FILES)
    - $(SPHINX) -b epub -D language=$* -d $(BUILD_DIR)/$* $(SOURCE_DIR) $(@D) + $(SPHINX) -W
  • From Holger Wansing@21:1/5 to Paul Gevers on Sun Jun 15 21:50:01 2025
    Hi,

    Paul Gevers <[email protected]> wrote (Sun, 15 Jun 2025 13:50:58 +0200):
    Hi,

    On 15-06-2025 13:25, Holger Wansing wrote:
    So, do we want this change?


    I think so.

    Ok, just pushed to git.


    --
    Holger Wansing <[email protected]>
    PGP-Fingerprint: 496A C6E8 1442 4B34 8508 3529 59F1 87CA 156E B076

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)