gtk-rs / gir

Tool to generate rust bindings and user API for glib-based libraries
https://gtk-rs.org/gir/book/
MIT License
236 stars 107 forks source link

Unexpected element <doc-deprecated> #803

Closed psnszsn closed 5 years ago

psnszsn commented 5 years ago

When generating the sys crate from this gir file I get the following error:

GirXml: /home/vlad/downloads/vala-girs/gir-1.0/GLib-2.0.gir at line 133:6: Unexpected element <doc-deprecated>
EPashkin commented 5 years ago

Thanks for reporting

real-felix commented 5 years ago

Hi, it still fails in this line, from Gio-2.0.gir:

    <interface name="DesktopAppInfoLookup"
               c:symbol-prefix="desktop_app_info_lookup"
               c:type="GDesktopAppInfoLookup"
               deprecated="1"
               deprecated-version="2.28"
               glib:type-name="GDesktopAppInfoLookup"
               glib:get-type="g_desktop_app_info_lookup_get_type"
               glib:type-struct="DesktopAppInfoLookupIface">
      <doc xml:space="preserve"
           filename="checkout/gobject-introspection/gir/gio-2.0.c"
           line="1484">#GDesktopAppInfoLookup is an opaque data structure and can only be accessed
using the following functions.</doc>
      <doc-deprecated xml:space="preserve">The #GDesktopAppInfoLookup interface is deprecated and
   unused by GIO.</doc-deprecated>
      <source-position filename="install/include/gio-unix-2.0/gio/gdesktopappinfo.h"
                       line="142"/>

When it's inside another tag (constant, method, etc.) the parser doesn't complain, but inside an interface, the tag isn't recognized. Not sure if that difference matters, though.

EPashkin commented 5 years ago

Again thanks for reporting 😉