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 708693 - valac with --gir and no --library silently fails to create .gir
valac with --gir and no --library silently fails to create .gir
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: 0.42
Assigned To: Vala maintainers
Vala maintainers
: 648429 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-09-24 17:00 UTC by Travis Reitter
Modified: 2018-05-19 21:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
compiler: Warn if --gir is used without --library (851 bytes, patch)
2018-05-19 20:57 UTC, Rico Tzschichholz
committed Details | Review

Description Travis Reitter 2013-09-24 17:00:45 UTC
If you run valac with the --gir argument but no --library argument, it will run without creating the .gir file.

Obviously, it doesn't make sense to create a .gir for an executable but this was a library (no main(), etc.) that I simply failed to include --library for.

The best solution is to probably just issue a warning for the combination of: --gir: exists; --library: missing, because otherwise an autotools setup can continue along and g-i-compiler will try to generate the .typelib, fail to find a .gir, and break the build. It's obvious that the .gir is missing, but it's not obvious why, at that point.
Comment 1 Rico Tzschichholz 2018-05-19 20:57:15 UTC
Created attachment 372226 [details] [review]
compiler: Warn if --gir is used without --library
Comment 2 Rico Tzschichholz 2018-05-19 20:58:38 UTC
*** Bug 648429 has been marked as a duplicate of this bug. ***
Comment 3 Rico Tzschichholz 2018-05-19 21:24:59 UTC
Attachment 372226 [details] pushed as 6f5b40f - compiler: Warn if --gir is used without --library