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 736038 - Generated C header redefines symbols
Generated C header redefines symbols
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: general
0.25.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2014-09-04 11:21 UTC by Tom Beckmann
Modified: 2018-05-22 15:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tom Beckmann 2014-09-04 11:21:29 UTC
The generated C header redefines all symbols that are already defined in the generated C files. This behavior is a major blocking point for me at the moment to port large projects to vala gradually, as some vala symbols may have to be called from C side and C symbols from vala side, resulting in the generated header being included in the generated C code.

A test case can be found here:
https://drive.google.com/file/d/0B_Ze8u-C0LF9dVQ3VnVOMERTdzQ/edit?usp=sharing (as tar)
http://bazaar.launchpad.net/~tombeckmann/+junk/circular-dependencies/files (as bzr branch)

Fixing this would help vala adoption in legacy project. I'm currently porting midori and preparing a series of blog posts about the whole process.

For reference, this is the WIP midori file port, it's about the midori/midori-browser.vala file https://code.launchpad.net/~elementary-apps/midori/browser-vala
There may be other problems in this branch, which I haven't noticed because of the abundance of errors generated by this problem.
Comment 1 Al Thomas 2016-03-08 17:28:04 UTC
Try the --use-header with valac.
Comment 2 Michael 'Mickey' Lauer 2018-02-26 08:24:06 UTC
Tom, does that fix your problem?
Comment 3 GNOME Infrastructure Team 2018-05-22 15:18:22 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/vala/issues/476.