`g-ir-scanner` does not fail on fatal warnings when `--warn-all` is not specified
--warn-all
not only shows the warning messages but also makes the introspection data generation to fail.
I have noticed this after porting evince to meson. The port is still not complete due to a couple of issues. One of them related to the introspection data generation for one of its libraries libevince3
. I have also written an email to the gtk-app-deve-list extending my analysis about the issue.
After some extensive testing, I have reduced the command to this:
/usr/bin/g-ir-scanner --namespace=EvinceView --nsversion=3.0 --no-libtool --warn-all --output EvinceView-3.0.gir -I/home/imartinez/Development/gnome/evince/libview -I./. -I../. -I../libdocument/. -I./. -I../. ev-document-model.h ev-jobs.h ev-job-scheduler.h ev-print-operation.h ev-stock-icons.h ev-view.h ev-view-presentation.h ev-view-type-builtins.h ev-annotation-window.c ev-document-model.c ev-form-field-accessible.c ev-image-accessible.c ev-jobs.c ev-job-scheduler.c ev-link-accessible.c ev-page-accessible.c ev-page-cache.c ev-pixbuf-cache.c ev-print-operation.c ev-stock-icons.c ev-timeline.c ev-transition-animation.c ev-view.c ev-view-accessible.c ev-view-cursor.c ev-view-presentation.c ev-media-player.c --include=Gdk-3.0 --include=GdkPixbuf-2.0 --include=Gio-2.0 --include=GLib-2.0 --include=GObject-2.0 --include=Gtk-3.0 --include-uninstalled=../libdocument/EvinceDocument-3.0.gir --symbol-prefix=ev --identifier-prefix=Ev --pkg-export=evince-view-3.0 --cflags-begin -I./. -I../. -I../libdocument/. -DEVINCE_COMPILATION --cflags-end --add-include-path=/home/imartinez/Development/gnome/evince/libdocument --library evview3 -L/home/imartinez/Development/gnome/evince/libview/.libs --library evdocument3 -L/home/imartinez/Development/gnome/evince/libdocument/.libs
This causes the following two warning messages to be shown and the EvinceView-3.0.gir
file generation to fail:
ev-jobs.c:270: Warning: EvinceView: GObject-Introspection specific GTK-Doc tag "Rename to" has been deprecated, please use annotations on the identifier instead:
* Rename to: ev_job_failed
^
ev-document-model.h:33:
ev-document-model.h:57: Fatal: EvinceView: Namespace conflict for 'document_model_get_type'
ev-document-model.h:57: Fatal: EvinceView: Namespace conflict for 'document_model_get_type'
However, if --warn-all
is removed, the EvinceView-3.0.gir
files is generated.
--warn-all
is working properly as it causes a failure on fatal warnings. However, when --warn-all
is not specified, the failure is not triggered and the introspection data file is generated.