]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
compiler: Warn if --gir is used without --library
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 19 May 2018 20:52:40 +0000 (22:52 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 21 May 2018 19:15:16 +0000 (21:15 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=708693

compiler/valacompiler.vala

index 2568d77f52d309ff692476a7fbaa41122641b5df..f0bed3eb15e6de7ff0171a838314dba283ac387e 100644 (file)
@@ -431,6 +431,11 @@ class Vala.Compiler {
                        }
 
                        library = null;
+               } else {
+                       if (gir != null) {
+                               Report.warning (null, "--gir has no effect without --library");
+                               gir = null;
+                       }
                }
 
                // The GIRWriter places the gir_namespace and gir_version into the top namespace, so write the vapi after that stage