no vala autocompletion

Bug #340506 reported by Nicolò Chieffo
50
This bug affects 11 people
Affects Status Importance Assigned to Milestone
monodevelop
Unknown
Medium
monodevelop-vala (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: monodevelop-vala

There's no code autocompletion in vala projects, also CTRL-SPACE does nothing

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: monodevelop-vala 1.9.2-0ubuntu1
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=it_IT.UTF-8
 SHELL=/bin/bash
SourcePackage: monodevelop-vala
Uname: Linux 2.6.28-8-generic i686

Revision history for this message
Nicolò Chieffo (yelo3) wrote :
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

It seems to depends on libafrodite from vala toys for gedit.

Revision history for this message
Leonardo Robol (leo.robol) wrote :

I think this is still present in oneiric. Now monodevelop-vala installs libafrodite, but if I try to write some code I get this traceback in monodevelop:

System.EntryPointNotFoundException: afrodite_completion_engine_try_acquire_ast
  at (wrapper managed-to-native) MonoDevelop.ValaBinding.Parser.Afrodite.CompletionEngine:afrodite_completion_engine_try_acquire_ast (intptr,intptr&,int)
  at MonoDevelop.ValaBinding.Parser.Afrodite.CompletionEngine.TryAcquireAst () [0x00000] in <filename unknown>:0
  at MonoDevelop.ValaBinding.Parser.ProjectInformation.GetSymbolsForFile (System.String file, IEnumerable`1 desiredTypes) [0x00000] in <filename unknown>:0
  at MonoDevelop.ValaBinding.Parser.ProjectInformation.GetClassesForFile (System.String file) [0x00000] in <filename unknown>:0
  at MonoDevelop.ValaBinding.Parser.ProjectInformation.GetTypesVisibleFrom (System.String filename, Int32 line, Int32 column, MonoDevelop.ValaBinding.ValaCompletionDataList results) [0x00000] in <filename unknown>:0
  at MonoDevelop.ValaBinding.Parser.ProjectInformation.GetSymbolsVisibleFrom (System.String filename, Int32 line, Int32 column, MonoDevelop.ValaBinding.ValaCompletionDataList results) [0x00000] in <filename unknown>:0
  at MonoDevelop.ValaBinding.ValaTextEditorExtension+<GlobalComplete>c__AnonStorey5.<>m__5 (System.Object ) [0x00000] in <filename unknown>:0

It seem that it cannot call afrodite_completion_engine_try_acquire_ast() that has been removed from libafrodite... maybe the vala module needs to be updated to reflect the changes in the library?

Changed in monodevelop-vala (Ubuntu):
status: New → Confirmed
Revision history for this message
In , tuxxxy (0xf777) wrote :

Ubuntu 11.04 32-bit, MonoDevelop - 2.6 beta 3, Vala plugin version 2.6
I can compile inside IDE and see output, but debugging is not available, you could only run Vala programs
It's known, that in previous versions of MonoDevelop (2.2), this function was fine
also, code completion seems to not functional too

at least, debugging functionality is very important and Vala support is useless since debugging not available

Revision history for this message
In , Severin H (severinh) wrote :

I can confirm that this problem still exists in the latest MonoDevelop code, even after the changeset cd5506e015cf1e3eff295ebef5719757f7f8a523 ([Vala] Move to vala 0.12.).

The problem is that libafrodite's API still seems to be evolving. The function 'afrodite_completion_engine_get_ast' does not exist anymore in vtg-0.12.1 (only in the betas of vtg-0.12.0). The following stacktrace is produced:

System.EntryPointNotFoundException: afrodite_completion_engine_get_ast
  at (wrapper managed-to-native) MonoDevelop.ValaBinding.Parser.Afrodite.CompletionEngine:afrodite_completion_engine_get_ast (intptr)
  at MonoDevelop.ValaBinding.Parser.Afrodite.CompletionEngine.TryAcquireAst () [0x00000] in /home/.../monodevelop/extras/ValaBinding/Parser/Afrodite.cs:74
  [...]

When using vtg-0.12.0_beta5, the following stack trace is produced instead:

FATAL ERROR [2011-09-10 16:25:48Z]: Unhandled Exception
System.NullReferenceException: Object reference not set to an instance of an object
  at MonoDevelop.ValaBinding.Parser.ProjectInformation.GetTypesVisibleFrom (System.String filename, Int32 line, Int32 column, MonoDevelop.ValaBinding.ValaCompletionDataList results) [0x000f6] in /home/.../monodevelop/extras/ValaBinding/Parser/ProjectInformation.cs:309
  [...]

I guess the only way to resolve this problem is to update MonoDevelop's ValaBinding. In the meantime, can you tell me what vtg version/revision the current code targets? I wonder whether the NullPointerException I get with vtg-0.12.0_beta5 is due to not using the right version of vtg or something different.

Changed in monodevelop:
importance: Unknown → High
status: Unknown → Confirmed
Revision history for this message
In , Severin H (severinh) wrote :

The following fork fixes the System.EntryPointNotFoundException: https://github.com/severinh/monodevelop-vala-afrodite-update
It takes into account all API changes between vtg-0.12.0_beta5 and vtg-0.12.1.

Now the execution results in a NullReferenceException in MonoDevelop.ValaBinding.Parser.ProjectInformation:309 like the original code did in combination with vtg-0.12.0_beta5.

Revision history for this message
In , Severin H (severinh) wrote :

The reason for the NullReferenceException is that in my case (Ubuntu 11.10 Beta 1), Afrodite.Utils.GetPackagePaths fails to retrieve the package paths for glib-2.0 and gtk+-3.0, because the corresponding VAPI files are located in /usr/share/vala-0.14/vapi rather than /usr/share/vala/vapi.

One can work around it by creating appropriate symlinks. I'm not exactly sure whether this is MonoDevelop's, Afrodite's or the distribution's fault. Nonetheless, Vala autocompletion in MonoDevelop finally works!

Revision history for this message
In , tuxxxy (0xf777) wrote :

Please, explain what I should do to fix both problems: debugging and autocompletion? Step by step...
I have skill of building Mono and MonoDevelop from sources, I have Mono 2.10.4 from PPA. I hope this problem is only MonoDevelop/Vala plugin related?

I'll try to use your https://github.com/severinh/monodevelop-vala-afrodite-update repository...
I understand about symlinks, but how about debugging?

P.S.
I want to introduce Vala language into my company and write programs in this language in MonoDevelop IDE... I need build (it's ok), autocomplete and debugger to make this possible...

Changed in monodevelop:
importance: High → Medium
Revision history for this message
In , Levi Bard (taktaktaktaktaktaktaktaktaktak) wrote :

Debugging should just work, provided that you have the gdb debugger backend (monodevelop-debugger-gdb on ubuntu). Are you able to debug C programs from MD?

Changed in monodevelop-vala (Ubuntu):
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package monodevelop-vala - 2.8.6.3-2

---------------
monodevelop-vala (2.8.6.3-2) unstable; urgency=low

  * [5758ed1] wrap-and-sort debian folder
  * [05d8eb3] add use-vala-0.14.patch (Closes: #663326, LP: #914824)
  * [2e1f680] minor dep-5 fixes to debian/copyright
  * [db70b72] add libafrodite-0.12-compat.patch (LP: #340506, #716422)

 -- Julian Taylor <email address hidden> Sun, 22 Apr 2012 18:07:48 +0200

Changed in monodevelop-vala (Ubuntu):
status: Confirmed → Fix Released
Changed in monodevelop:
status: Confirmed → Won't Fix
Changed in monodevelop:
status: Won't Fix → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.