Re: [Vala] Vala compilation fails

2010-09-17 Thread Luca Bruno
On Fri, Sep 17, 2010 at 06:39:05PM -0700, Anatol Pomozov wrote:
> It seems that master is broken. I checked out 0.10 tag and now it compiles
> fine, although it fails on "make check" http://pastie.org/1166017

Expected if you don't have latest glib development installed. Tests target
glib 2.26 (unreleased).

-- 
http://www.debian.org - The Universal Operating System


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


Re: [Vala] Genie xmlrpc-c bindings test

2010-09-17 Thread Phil Daintree

Pancake,

I am trying to get values from the xml-rpc call that returns a struct - 
and have tried the struct_read_value and the struct_get_key_and_value 
calls which seem to be exactly what I am after. However,


# valac --pkg=xmlrpc --Xcc=-lxmlrpc_client xmlrpc-c_test.gs
/tmp/ccQFcfAa.o: In function `print_value':
xmlrpc-c_test.vala.c:(.text+0x66f): undefined reference to 
`xmlrpc_env_struct_read_value'
xmlrpc-c_test.vala.c:(.text+0x6f3): undefined reference to 
`xmlrpc_env_struct_read_value'

collect2: ld returned 1 exit status
error: cc exited with status 256
Compilation failed: 1 error(s), 0 warning(s)

However, on inspection of the vapi I note:

/* struct */
// TODO: move into StructValue

Did you ever get around to this?

If not then it looks like xml-rpc-c ain't gonna do it for me :-(

I did manage to replicate your test program in genie ok - after Jan and 
Evan's help - but if the values of the struct returned are not 
obtainable then I am back to libxml to parse the output of the libsoup 
xml-rpc call - which has also proven troublesome to this slow newbie to 
vala/genie! It's a shame as this xml-rpc-c library appears to have all 
the functions in it to do the job :-(


Perhaps I need to learn C to finish the job on these bindings and try to 
give a bit back!


Phil

On 15/09/10 04:54, Jan Hudec wrote:

On Tue, Sep 14, 2010 at 20:00:58 +1200, Phil Daintree wrote:

Thanks for taking a look Evan


If that is the case, then adding

[CCode (ref_function_void = true)]

to the class should do the trick/


I see a lot of these sorts of lines in the XML-RPC-C bindings of
pancake's and since there is no class in my genie code, I guess you
mean this code should go in here somewhere? Or do you mean inside
the xml-rpc-c code and recompile the library?

I fear I am too wet behind the ears to figure out what to do with
that line. I've pasted pancake's xmlrpc.vapi file below - maybe the
line

[CCode (cprefix="xmlrpc_value_", cname = "xmlrpc_value",
ref_function="xmlrpc_INCREF", unref_function="xmlrpc_DECREF",
free_function="")]

has something to do with it?


It sure does. the ref_function_voidtrue should just be added to the argument
list. So change the line to:

[CCode (cprefix="xmlrpc_value_", cname = "xmlrpc_value", ref_function="xmlrpc_INCREF", 
ref_function_void=true, unref_function="xmlrpc_DECREF", free_function="")]



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


[Vala] array concatenation not supported temporarily or permanently?

2010-09-17 Thread Nor Jaidi Tuah
I noticed the following git commit message:
"codegen: Report error on unsupported use of array concatenation",
and the following error message in the submitted code:
"Array concatenation not supported for public array variables".

Is this a temporary fix, or an unavoidable "feature"
of vala? It feels so uncool and so unvala.

hand
Nor Jaidi Tuah


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


Re: [Vala] Vala compilation fails

2010-09-17 Thread Anatol Pomozov
Hi

On Fri, Sep 17, 2010 at 6:01 PM, Anatol Pomozov wrote:

> Hi,
>
> I just started learning Vala. I cloned vala repo from git://
> git.gnome.org/vala and run ./autogem.sh  (See log here
> http://pastie.org/1165976).
>
> Everything looks fine, but when I run make - compilation fails
>
> anatol:vala $ make
> make  all-recursive
> make[1]: Entering directory
> `/usr/local/google/home/anatol/sources/opensource/vala/vala'
> Making all in gee
> make[2]: Entering directory
> `/usr/local/google/home/anatol/sources/opensource/vala/vala/gee'
>   VALAC  arraylist.vala collection.vala hashmap.vala hashset.vala
> iterable.vala iterator.vala list.vala map.vala set.vala
> **
> ERROR:valasemanticanalyzer.c:2886:vala_semantic_analyzer_get_actual_type:
> assertion failed: (instance_type != NULL)
> /bin/sh: line 1:   849 Aborted /usr/bin/valac
> --disable-version-header -C --vapidir ./../vapi --pkg gobject-2.0 -H
> valagee.h --library gee arraylist.vala collection.vala hashmap.vala
> hashset.vala iterable.vala iterator.vala list.vala map.vala set.vala
> make[2]: *** [gee.vala.stamp] Error 134
> make[2]: Leaving directory
> `/usr/local/google/home/anatol/sources/opensource/vala/vala/gee'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory
> `/usr/local/google/home/anatol/sources/opensource/vala/vala'
> make: *** [all] Error 2
>
>
> I really don't understand what does it mean. Can you help me to resolve it?
>

It seems that master is broken. I checked out 0.10 tag and now it compiles
fine, although it fails on "make check" http://pastie.org/1166017
___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Vala compilation fails

2010-09-17 Thread Anatol Pomozov
Hi,

I just started learning Vala. I cloned vala repo from git://
git.gnome.org/vala and run ./autogem.sh  (See log here
http://pastie.org/1165976).

Everything looks fine, but when I run make - compilation fails

anatol:vala $ make
make  all-recursive
make[1]: Entering directory
`/usr/local/google/home/anatol/sources/opensource/vala/vala'
Making all in gee
make[2]: Entering directory
`/usr/local/google/home/anatol/sources/opensource/vala/vala/gee'
  VALAC  arraylist.vala collection.vala hashmap.vala hashset.vala
iterable.vala iterator.vala list.vala map.vala set.vala
**
ERROR:valasemanticanalyzer.c:2886:vala_semantic_analyzer_get_actual_type:
assertion failed: (instance_type != NULL)
/bin/sh: line 1:   849 Aborted /usr/bin/valac
--disable-version-header -C --vapidir ./../vapi --pkg gobject-2.0 -H
valagee.h --library gee arraylist.vala collection.vala hashmap.vala
hashset.vala iterable.vala iterator.vala list.vala map.vala set.vala
make[2]: *** [gee.vala.stamp] Error 134
make[2]: Leaving directory
`/usr/local/google/home/anatol/sources/opensource/vala/vala/gee'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/usr/local/google/home/anatol/sources/opensource/vala/vala'
make: *** [all] Error 2


I really don't understand what does it mean. Can you help me to resolve it?
___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


[Vala] [ANNOUNCE] Vala 0.10.0 - Compiler for the GObject type system

2010-09-17 Thread Jürg Billeter
We are pleased to announce version 0.10.0 of Vala, a compiler for the
GObject type system.

Vala 0.9.8 is now available for download at:
   http://download.gnome.org/sources/vala/0.10/

Changes since 0.9.8
 * Port GIR parser and writer to GIR version 1.2.
 * Update GLib bindings to 2.26 branch.
 * Bug fixes.

Vala is a new programming language that aims to bring modern programming
language features to GNOME developers without imposing any additional
runtime requirements and without using a different ABI compared to
applications and libraries written in C.

valac, the Vala compiler, is a self-hosting compiler that translates
Vala source code into C source and header files. It uses the GObject
type system to create classes and interfaces declared in the Vala source
code.

The syntax of Vala is similar to C#, modified to better fit the GObject
type system. Vala supports modern language features as the following:

* Interfaces
* Properties
* Signals
* Foreach
* Lambda expressions
* Type inference for local variables
* Generics
* Non-null types
* Assisted memory management
* Exception handling

Vala is designed to allow access to existing C libraries, especially
GObject-based libraries, without the need for runtime bindings. All that
is needed to use a library with Vala is an API file, containing the class
and method declarations in Vala syntax. Vala currently comes with
bindings for GLib and GTK+. It's planned to provide generated bindings for
the full GNOME Platform at a later stage.

Using classes and methods written in Vala from an application written in
C is not difficult. The Vala library only has to install the generated
header files and C applications may then access the GObject-based API of
the Vala library as usual. It should also be easily possible to write a
bindings generator for access to Vala libraries from applications
written in e.g. C# as the Vala parser is written as a library, so that
all compile-time information is available when generating a binding.

More information about Vala is available at

http://www.vala-project.org/


Jürg Billeter

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