[gnome-builder] vala: ensure vala loads the mapped file before parsing
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vala: ensure vala loads the mapped file before parsing
- Date: Thu, 21 Apr 2016 00:22:10 +0000 (UTC)
commit a434f0585c636b557099e2fbc6ecfdaf0266f5b6
Author: Christian Hergert <christian hergert me>
Date: Wed Apr 20 17:22:03 2016 -0700
vala: ensure vala loads the mapped file before parsing
I've been seeing some warnings about g_mapped_file_get_length() having
a NULL mapped file. The error is in ValaSourceFile, so let's just force
it to load the mapped file upfront.
plugins/vala-pack/ide-vala-index.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/plugins/vala-pack/ide-vala-index.vala b/plugins/vala-pack/ide-vala-index.vala
index 7251541..b85ba3e 100644
--- a/plugins/vala-pack/ide-vala-index.vala
+++ b/plugins/vala-pack/ide-vala-index.vala
@@ -282,6 +282,10 @@ namespace Ide
if (!this.source_files.contains (file))
this.add_file (file);
+ /* Ensure vala has loaded the contents */
+ var source_file = this.source_files[file];
+ source_file.get_mapped_contents ();
+
this.apply_unsaved_files (unsaved_files_copy);
this.report.clear ();
this.reparse ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]