[vala/staging] vala: Drop "explicit" from ValaSourceFile and use "from_commandline"



commit b083af081c7ecc4bb3f4e9544b30f4abce2560cf
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat Nov 3 14:38:21 2018 +0100

    vala: Drop "explicit" from ValaSourceFile and use "from_commandline"

 vala/valagirparser.vala  | 2 +-
 vala/valasourcefile.vala | 5 -----
 vapigen/valavapigen.vala | 4 ++--
 3 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 23958dbe9..b918395a9 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -1917,7 +1917,7 @@ public class Vala.GirParser : CodeVisitor {
                                if (context.has_package (pkg)) {
                                        // package already provided elsewhere, stop parsing this GIR
                                        // if it was not passed explicitly
-                                       if (!this.current_source_file.explicit) {
+                                       if (!this.current_source_file.from_commandline) {
                                                return;
                                        }
                                } else {
diff --git a/vala/valasourcefile.vala b/vala/valasourcefile.vala
index b056c0126..35eaf5f26 100644
--- a/vala/valasourcefile.vala
+++ b/vala/valasourcefile.vala
@@ -124,11 +124,6 @@ public class Vala.SourceFile {
         */
        public bool used { get; set; }
 
-       /**
-        * Whether this source-file was explicitly passed on the commandline.
-        */
-       public bool explicit { get; set; }
-
        private ArrayList<Comment> comments = new ArrayList<Comment> ();
 
        public List<UsingDirective> current_using_directives { get; set; default = new 
ArrayList<UsingDirective> (); }
diff --git a/vapigen/valavapigen.vala b/vapigen/valavapigen.vala
index f4ae9a50e..63205499d 100644
--- a/vapigen/valavapigen.vala
+++ b/vapigen/valavapigen.vala
@@ -132,7 +132,7 @@ class Vala.VAPIGen {
                foreach (string source in sources) {
                        if (FileUtils.test (source, FileTest.EXISTS)) {
                                var source_file = new SourceFile (context, SourceFileType.PACKAGE, source);
-                               source_file.explicit = true;
+                               source_file.from_commandline = true;
                                context.add_source_file (source_file);
                        } else {
                                Report.error (null, "%s not found".printf (source));
@@ -190,7 +190,7 @@ class Vala.VAPIGen {
                                                        }
                                                }
                                        }
-                                       if (file.explicit && file.package_name != null) {
+                                       if (file.from_commandline && file.package_name != null) {
                                                package_names += file.package_name;
                                        }
                                }


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