On Sat, 03 Jun 2023 at 23:39:29 +0200, Abou Al Montacir wrote:I've added support for on the fly converting .typelib files usingg-ir-generate.The normal workflow for GObject-Introspection is:C source code }} ---> GIR XML ---> binary typelibcompiled binaries } | || |v vstatic bindings dynamic bindings(Rust, C++, etc.) (Python, _javascript_, etc.)Decompiling the binary typelib to re-create the GIR XML is notsomething that is conventionally done, and until today I wasn't awarethat gobject-introspection even had a tool that could do this - I hadassumed that compiling the GIR XML into a binary typelib was a lossytransformation, similar to the way compiling C or Pascal code into objectfiles is a lossy transformation.
If you are writing a binding for Pascal (a compiled language analogousto C or Java), then I would expect it to read the GIR XML from the -devpackage, for example libharfbuzz-dev, and generate Pascal source codefrom that. That's how bindings for other statically-compiled languageslike Rust, C++, Java and Vala tend to work.
The binary typelibs in gir1.2-* are usually only used by bindings intodynamic languages like Python (PyGI), _javascript_ (gjs, seed) and Perl(Glib::Object::Introspection), as a faster and more disk-space-efficientway to generate bindings on-demand on end-user systems, without thespace consumption of installing the XML and the -dev package, and thecomputational overhead of parsing it.
However, when starting the conversion, g-ir-generate crashes with an error onHarfBuzz-0.0.I've raised a ticket [1]https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1035669 to that package, but I'm not sure it is an issue in HarfBuzz itself,and maybe it is in g-ir-generate itself.I don't know whether this is a bug in harfbuzz or GObject-Introspection.From the patch proposed, it looks like either:- a bug in g-ir-scanner (which is the component that parses C source code)for mis-parsing harfbuzz's header file; or- a bug in harfbuzz, for having GObject-Introspection bindings that includea header file, but then having content in that header file that a currentversion of g-ir-scanner will mis-parseEither way I don't think it's release-critical for either harfbuzz orgobject-introspection.
The reason I'm write to debian-devel is to know if we want to enforce the factthat typelib files shall be able to regenerate gir files for Bookworm.If this is the case, shall I raise severity to be release critical?No, this is not a release-critical bug. This looks to me like a bug ofnormal severity: the definition of normal severity used to mention "aproblem with a particular option", and this looks like a problem with aparticular constant in a particular header, which is conceptually similar.In particular, this is not a DFSG violation, because the compiled typelibsaren't source code, so there is certainly no particular requirement thatwe can reproduce other files from them.If we can load the compiled typelib into PyGI, gjs, etc., and the majorityof it works as intended, then the gir1.2-* package is usable.
--
Cheers, Abou Al Montacir
Attachment:
signature.asc
Description: This is a digitally signed message part