GNOME Bugzilla – Bug 671322
scanner should warn about enum values with numeric names
Last modified: 2018-02-08 12:14:15 UTC
spinoff from bug 671025 When the scanner outputs something like <member name="2button_press" value="5" c:identifier="GDK_2BUTTON_PRESS" glib:nick="2button-press"/> it should print a warning, unless the enum also has another member with the same value and a usable name.
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
Created attachment 367392 [details] [review] Emit a warning for enum values starting with a number Not all languages allow identifiers to start with a number, so we should emit a warning, to catch cases like: GDK_2BUTTON_PRESS mapping to: Gdk.EventType.2BUTTON_PRESS
Detecting replacements is kind of hard to achieve; some enumerations may add identical values, but others may deprecate the symbol entirely and replace it. I'd stick to warning, even if it introduces spurious messages for older libraries that decide to keep unusable values around. It's not like those libraries have no warnings to begin with.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gobject-introspection/issues/65.