Bug 1398738 - VAPI bindings generated with vala 0.34.x can contain errors
Summary: VAPI bindings generated with vala 0.34.x can contain errors
Alias: None
Product: Fedora
Classification: Fedora
Component: vala
Version: 25
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Michel Alexandre Salim
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2016-11-25 17:58 UTC by Fabio Valentini
Modified: 2016-12-06 20:49 UTC (History)
6 users (show)

Fixed In Version: vala-0.34.3-2.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-12-05 21:44:25 UTC

Attachments (Terms of Use)

Description Fabio Valentini 2016-11-25 17:58:11 UTC
The vapi bindings generated during the build of other packages might contain errors if they were built / rebuilt since vala has been updated to 0.34.x:

Fixed-size arrays are not properly recognized as return types (anymore?), and sousing the "offending" functions obviously results in type mismatches.

For example, the
    public uint8 get_address ()
function in
    NM.IP6Address (part of libnm-util)
should have a return type of "uint8[]" instead of "uint8" from what I have been able to determine during "troubleshooting" with ricotz.

See commit https://git.gnome.org/browse/vala/commit/?h=0.34&id=7e76f75e42e7ac45c896e81e97955c8b2089d7e9 in the vala git for more info (the FIXME he added after our discussion).

Every vala release from the 0.34 branch has this error, and the newly released vala 0.34.3 doesn't fix the problem yet.

Every package that generates .vapi files (and exposes functions with a fixed-length array return type) will have to be rebuilt after a fix for this is available.

Comment 1 Kalev Lember 2016-12-02 09:46:57 UTC
Thanks, I've backported that patch to vala-0.34.3-2.fc25

Comment 2 Fedora Update System 2016-12-02 09:49:19 UTC
vala-0.34.3-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-54ecb08413

Comment 3 Fabio Valentini 2016-12-02 11:09:05 UTC
I can confirm that rebuilding NetworkManager with the patched vala version results in the correct info being in the .vapi file. Thanks for the quick fix, now I guess that a package rebuild for NetworkManager has to be triggered as well for the change to get into the f25 (and f26?) repos?

Comment 4 Kalev Lember 2016-12-02 11:18:56 UTC
Great, thanks for checking! The fixed vala versions should be in the build roots for both f25 and f26 so it should just be a straightforward rebuild for NetworkManager.

Comment 5 Fedora Update System 2016-12-03 04:37:17 UTC
vala-0.34.3-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-54ecb08413

Comment 6 Fedora Update System 2016-12-05 21:44:25 UTC
vala-0.34.3-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Thomas Haller 2016-12-06 20:49:31 UTC
NetworkManager also rebuild:


and a f25 update: 

Note You need to log in before you can comment on or make changes to this bug.