[vala/staging: 2/2] libvaladoc: Build backing Vala.SourceFile for GIRs processed by importer



commit 2b86cba8c92226f3b0b6b6d504217952732a0d3a
Author: Corentin Noël <corentin elementary io>
Date:   Sat Jan 19 15:05:48 2019 +0100

    libvaladoc: Build backing Vala.SourceFile for GIRs processed by importer
    
    This fixes criticals when reporting errors and warnings
    
    Fixes https://gitlab.gnome.org/GNOME/vala/issues/738

 libvaladoc/importer/girdocumentationimporter.vala | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/libvaladoc/importer/girdocumentationimporter.vala 
b/libvaladoc/importer/girdocumentationimporter.vala
index 8e4b6d4c0..2b02798ad 100644
--- a/libvaladoc/importer/girdocumentationimporter.vala
+++ b/libvaladoc/importer/girdocumentationimporter.vala
@@ -63,8 +63,9 @@ public class Valadoc.Importer.GirDocumentationImporter : DocumentationImporter {
        }
 
        public override void process (string source_file) {
+               var data = new Vala.SourceFile (tree.context, Vala.SourceFileType.PACKAGE, Path.get_basename 
(source_file));
                this.file = new Api.SourceFile (new Api.Package (Path.get_basename (source_file), true, null),
-                                                                               source_file, null, null);
+                                                                               source_file, null, data);
                this.reader = new Vala.MarkupReader (source_file);
 
                // xml prolog


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