Sometimes I write things, sometimes I don't.

To content | To menu | To search

GIR for java-gnome: update week 32

The status of the java-gnome compilation process of last week reported about 250 errors. There are now 6 errors left to fix. That is a pretty good progress that I have done during the week. The commit that I just did few minutes ago summarize the work that I have done quite well.

So how is the code generate fed in my java-gnome "introspection" branch?

  1. First it needs to pass the configure step. This step will check that the .gir files (containing XML data) are available on the system. Andrew is working on a patch so we can give a --gir=/directory/containing/gir/files to the Perl configure script.
  2. The second step of the process takes all .gir files and parse them thanks to the IntrospectionParser class. The parser loads a whitelist of types that we can use to avoid the parsing and code generation for types that we don't need (GRand for example).
  3. The following step will take .defs data that can be found in the src/overriders directory. This .defs data will be used by the code generator to add data or to redefine the data take from the Introspection files.
  4. Once all the previous steps are done, the translation layer and JNI layer are generated.
  5. Finally the make process try to build everything and this is at this time that we can see if the public API matches with generated code.
To be able to do all of this process I had to modify several part of the existing classes by adding methods to get information about a Block object (the corresponding C name, the object it belongs to and if it represents a constructor or not. A Block is a data structure that the code generator uses to represents a type, a method, a constructor or anything else.

The XML parser still needs some polishing to handle the throws attribute and to make it more beautiful to read and maintain.

Sunday I had a meeting with Andrew to talk about my progress and what we are going to do next. We agreed that it would be interesting to start merging some code into java-gnome official repository. We also talked about having regular Google Hangout so we can continue to discuss. Since the progress on using Introspection data to fed the code generator is quite good, we talked about trying to add coverage for an another GNOME library to add some value to the work that I have done so far.