Bug 162879 - changing helpcontent2/helpers/xmlhelp.dtd does not trigger a build
Summary: changing helpcontent2/helpers/xmlhelp.dtd does not trigger a build
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-09 05:58 UTC by fpy
Modified: 2024-09-09 14:18 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fpy 2024-09-09 05:58:32 UTC
to reproduce : 
- echo "--with-help=html" > autogen.input
- make
- touch (or even rm) helpcontent2/helpers/xmlhelp.dtd
- make

Actual :

make -j 2  -rs -f /export/home/fpy/git/core/Makefile.gbuild build  
[ECH] CustomTarget/instsetoo_native/setup/setuprc
[ECH] CustomTarget/instsetoo_native/setup/versionrc
 ...
[LOC] top level modules: libreoffice
[CUS] instsetoo_native/setup
[PKG] instsetoo_native_setup
[BIN] instsetoo_native
[MOD] instsetoo_native
[MOD] libreoffice
[BIN] top level modules: libreoffice
[ALL] top level modules: build-non-l10n-only build-l10n-only

(real	0m50.070s)

Expected :
 CustomTarget/helpcontent2 ... fails somewhere
Comment 1 Olivier Hallot 2024-09-09 10:54:33 UTC
This is working as designed. The DTD is not checked in the build.

The xmllint DTD checking done on ~2500 files times ~70 languages will make the build very slow.

Therefore the DTD checking is done at the gerrit level, once the patch is submitted. You get a "-1" if the patch does not comply with the DTD, and information on the offending file.
Comment 2 fpy 2024-09-09 13:24:41 UTC
(In reply to Olivier Hallot from comment #1)
... 
> The xmllint DTD checking done on ~2500 files times ~70 languages will make
> the build very slow.

1 run would be enough.
for the record :
% time find source/ -name '*.xhp' -exec xmllint --noout --dtdvalid helpers/xmlhelp.dtd {} \;
real	0m13.888s
user	0m2.743s
sys	0m5.246s

but would just need to check on couple of files.


> Therefore the DTD checking is done at the gerrit level, once the patch is
> submitted.

this bugzilla is about the DTD itself. 
if you corrupt it, your local make won't complain, jenkins won't complain.
it will only fail on the next .xhp change.


should be 1 line somewhere like CustomTarget_html.mk.
I suggest to REOPEN, and I'll fix it when I get more familiar with this .mk machinery, or someone already knowlegeable does it.
Comment 3 Buovjaga 2024-09-09 13:35:26 UTC
Comment from Cloph:

It is not really a matter of time needed, at least not on linux - but Olivier is also correct in that the file is not used in a build/that checking all languages would be much slower (esp. on Windows).

Also the file isn't really meant to be edited constantly. And people editing helpfiles also don't necessarily build LibreOffice themselves, so even if a build would use it, any error in the xhp files would still only be discovered by jenkins
Comment 4 Buovjaga 2024-09-09 13:36:43 UTC
In case of a build time check, xmllint would also then be a new dependency.
Comment 5 fpy 2024-09-09 13:43:44 UTC
(In reply to Buovjaga from comment #4)

thanx for the feedback.

The build using xsltproc, I guess xmllint is not a huge gap. 
I suggest at least to have jenkins to check couple of XHPs when the dtd is changed

Again, REOPEN doest not make it higher priority. just a reminder.
Meanwhile, I'll try to consolidate that in wiki.
Comment 6 Buovjaga 2024-09-09 14:18:29 UTC
(In reply to fpy from comment #5)
> (In reply to Buovjaga from comment #4)
> 
> thanx for the feedback.
> 
> The build using xsltproc, I guess xmllint is not a huge gap. 
> I suggest at least to have jenkins to check couple of XHPs when the dtd is
> changed
> 
> Again, REOPEN doest not make it higher priority. just a reminder.
> Meanwhile, I'll try to consolidate that in wiki.

As mentioned in comment 1, xmllint is run by the continuous integration for help patches.