After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794418 - Missing nullable annotation on the return value of gio_volume_get_mount
Missing nullable annotation on the return value of gio_volume_get_mount
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2018-03-17 09:33 UTC by Arthur Nieuwland
Modified: 2018-05-24 20:17 UTC
See Also:
GNOME target: ---
GNOME version: 3.25/3.26


Attachments
gio: Add missing (nullable) annotations to GDrive, GMount, GVolume (5.01 KB, patch)
2018-03-21 15:19 UTC, Philip Withnall
none Details | Review

Description Arthur Nieuwland 2018-03-17 09:33:27 UTC
When calling gio's gio_volume_get_mount through the Haskell bindings haskell-gi, Haskell complained of receiving a null which it shouldn't, according to the introspection data. As garetxe described it on the haskell-gi bugtracker:

> The issue was that the C function was returning NULL, but the introspection data said that that was not a possibility. In these cases haskell-gi checks anyway, and raises the exception you saw if NULL is returned when it is not expected. It cannot do much else, since it is not possible to build a valid Gio.Mount out of NULL. For nullable values, the right representation is Maybe Gio.Mount instead, with NULL -> Nothing.

[1] https://github.com/haskell-gi/haskell-gi/issues/139 bug report for haskell-gi
Comment 1 Philip Withnall 2018-03-21 15:19:47 UTC
Created attachment 369967 [details] [review]
gio: Add missing (nullable) annotations to GDrive, GMount, GVolume

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Comment 2 GNOME Infrastructure Team 2018-05-24 20:17:47 UTC
-- 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/glib/issues/1354.