Re: [Vala] valac can read a typelib in place of a vapi binding

2011-04-02 Thread Jürg Billeter
Hi Adam,

On Fri, 2011-04-01 at 13:07 -0700, Adam Dingle wrote:
 I realized to my surprise today that valac (0.11.7) can read a GObject 
 introspection type library in place of a VAPI file!  For example, I can 
 specify '--pkg PeasGtk-1.0' on the command line and valac will read 
 types from /usr/lib/girepository-1.0/PeasGtk-1.0.typelib, which lets me 
 use libpeas types even though there is no libpeas.vapi anywhere.
 
 1. Is this documented somewhere?  How long has this cool feature existed 
 without my knowing about it?  :)

It was added a long time ago. In the beginning there were lots of issues
and it is still a work in progress. However, it is usable nowadays for
certain libraries and more improvements are waiting in a branch.

 2. Is there a long-term plan to deprecate .vapi files in favor of type 
 libraries?  Can type libraries express everything that .vapi files can?

GIR files (vala doesn't read typelibs, it reads the xml versions) cannot
express everything that .vapi files can and probably never will. They
are focused on GObject-based libraries while .vapi can also handle quite
a few other libraries reasonably well.

The plan is to replace our .gi files (old gobject-introspection) by .gir
files (new gobject-introspection) as soon as possible, while still
shipping generated .vapi files.

Jürg

___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] valac can read a typelib in place of a vapi binding

2011-04-02 Thread Adam Dingle

On 04/02/2011 07:21 AM, Jürg Billeter wrote:

Hi Adam,

...

2. Is there a long-term plan to deprecate .vapi files in favor of type
libraries?  Can type libraries express everything that .vapi files can?

GIR files (vala doesn't read typelibs, it reads the xml versions) cannot
express everything that .vapi files can and probably never will. They
are focused on GObject-based libraries while .vapi can also handle quite
a few other libraries reasonably well.


Aha - now I see this was my mistake.  When I compiled with '--pkg 
PeasGtk-1.0', I thought Vala was reading


/usr/lib/girepository-1.0/PeasGtk-1.0.typelib

But actually it was reading this .gir file:

/usr/share/gir-1.0/PeasGtk-1.0.gir


The plan is to replace our .gi files (old gobject-introspection) by .gir
files (new gobject-introspection) as soon as possible, while still
shipping generated .vapi files.


Good to know.

adam

___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


[Vala] valac can read a typelib in place of a vapi binding

2011-04-01 Thread Adam Dingle
I realized to my surprise today that valac (0.11.7) can read a GObject 
introspection type library in place of a VAPI file!  For example, I can 
specify '--pkg PeasGtk-1.0' on the command line and valac will read 
types from /usr/lib/girepository-1.0/PeasGtk-1.0.typelib, which lets me 
use libpeas types even though there is no libpeas.vapi anywhere.


1. Is this documented somewhere?  How long has this cool feature existed 
without my knowing about it?  :)


2. Is there a long-term plan to deprecate .vapi files in favor of type 
libraries?  Can type libraries express everything that .vapi files can?


adam

___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] valac can read a typelib in place of a vapi binding

2011-04-01 Thread Aleksander Wabik
INAVD (I'm not a Vala developer ;))

I realized to my surprise today that valac (0.11.7) can read a GObject 
introspection type library in place of a VAPI file!  For example, I can 
specify '--pkg PeasGtk-1.0' on the command line and valac will read 
types from /usr/lib/girepository-1.0/PeasGtk-1.0.typelib, which lets me 
use libpeas types even though there is no libpeas.vapi anywhere.

Cool!

1. Is this documented somewhere?  How long has this cool feature existed 
without my knowing about it?  :)

2. Is there a long-term plan to deprecate .vapi files in favor of type 
libraries?  Can type libraries express everything that .vapi files can?

I guess it will never happen. You can't loose possibility of creating
bindings to non-gobject libraries, it's far more cool than the whole
gobject type system.

best regards,
AW.

adam

___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


-- 
Mój klucz publiczny o identyfikatorze 1024D/E12C5A4C znajduje się na
serwerze hkp://keys.gnupg.net

My public key with signature 1024D/E12C5A4C is on the server
hkp://keys.gnupg.net


signature.asc
Description: PGP signature
___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list