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



commit 00474cef1473015df9fc681cd8930a51bb29ca6f
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 63a567e..203dc66 100644
--- a/compiler/valacompiler.vala
+++ b/compiler/valacompiler.vala
@@ -452,6 +452,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]