Re: [anjuta-devel] using symbol-db session packages



Hi,
                 في ث، 20-07-2010 عند 21:27 +0200 ، كتب Johannes Schmid:
Hi!

The problem is that Vala doesn't have such 'import' statements. There
are only 'using' statements which are optional (you can just use fully
qualified names) and there is no easy way to map namespaces to packages
(although can try guessing e.g. for namespace Anjuta, we try looking for
regex "(lib)?anjuta-\d.\d"). Gir namespaces map more accurately to Vala,
but they are still not widely used and have some incompatibilities.

OK, didn't know that. Well, I can move some of the non-language-specific
parts to libanjuta (the pkg-config-chooser is already there). It will
basically allow you to get dependencies of a package and the
corresponding include directories. The latter is probably not that
interesting for vala is it has to look up the vapi/gir files.
It's been a long time since Vala invented its own "system" for getting
packages dependencies (the .deps files installed along .vapi files).
Sure it's nicer to use pkg-config directly, but not very urgent.


Stay tuned. But for now you can just use get_packages() and add the
other stuff later. Should be rather easy.
I've been using get_packages since the beginning, the problem for now is
that "local" packages aren't included in the list (e.g. libanjuta-1.0
for language-support-vala) and the fact that vapi files aren't always
installed system-wide. Ideally, I'd parse the VALAFLAGS for --pkg and
--vapidir but I don't know how to get that from the project manager and
I guess it wouldn't work for anything but automake with vala support
(but this shouldn't be a problem since get_packages itself only works
with automake AFAICT).

Btw, I got lots of warnings
when I tried the vala plugin last time, maybe you can have a look at
that too.
It's the consequence of not doing any error handling at all. I'll do it
as part of the above.

btw, how do I get all the sources that make up the target to which a
given file belongs? (the project manager uses GFile everywhere so I'm a
bit lost).

Abderrahim




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