Re: [PATCH 2/2] docs: meson.build: Generate HTML files directly by meson

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 12, 2020 at 16:28:35 +0200, Peter Krempa wrote:
> Our HTML file generation has two steps:
> 
> 1) XSL transformation
> 
>   This applies headers/footers and various other bits.
> 
> 2) xmllint reformat
> 
>   To fix indentation and to look like a proper XML/XHTML.
> 
> Historically these were done in a pipeline. The meson conversion
> attempted to do the same by adding 'scripts/meson-html-gen.py' which
> tried to pipeline them.
> 
> Unfortunately this hid errors from 'xsltproc' as return value was not
> checked and the stderr was piped into xmllints stdin. The result was
> that any invalid input file would result into an empty output file.
> 
> Since the script's only purpose was to prevent additional temporary
> files being created at the cost of compexity and obscurity (by hiding
> the commands used to process the XMLs and their arguments being weirdly
> passed through positional arguments) we can remove it if we accept extra
> temporary files in the directory.
> 
> Moving the generation directly into the meson definition makes it more
> obvious what's happening and saves readers from having to parse what's
> going on. A free bonus is that errors are now properly caught and
> reported.
> 
> Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
> ---
>  docs/meson.build          | 39 +++++++++++++++++++++++++--------------
>  scripts/meson-html-gen.py | 37 -------------------------------------

Sigh.

Self-NACK. I didn't commit the deletion of meson-html-gen.py when
testing and didn't notice that we've copy-pasted the same pattern into
subdirectories. So much for reusability :(




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux