From 5751740c38d525db178f5b414ae505cca0dc1043 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Corentin=20No=C3=ABl?= Date: Sat, 19 Jan 2019 15:05:48 +0100 Subject: [PATCH] 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 -- 2.47.2