[vala/0.34] compiler: Warn if --gir is used without --library



commit c786e9d3bb055bfd377376e35519fa9357efded8
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat May 19 22:52:40 2018 +0200

    compiler: Warn if --gir is used without --library
    
    https://bugzilla.gnome.org/show_bug.cgi?id=708693

 compiler/valacompiler.vala |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/compiler/valacompiler.vala b/compiler/valacompiler.vala
index 2568d77..f0bed3e 100644
--- a/compiler/valacompiler.vala
+++ b/compiler/valacompiler.vala
@@ -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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]