Sometimes I write things, sometimes I don't.

To content | To menu | To search

GIR for java-gnome: update week 35

I am a little late on this report due to the end of the holidays and the start of a new university year.

Only 3 weeks left for this GSoC so it is time to polish everything and document the work that has been done. This is why the week 35 has seen the latest big changes in the code so I can now focus on details. There was polishing of course such as code optimization but also pretty big changes such as the followings:

  • All the GIR data are now loaded in memory before the parsing. Actually the code now starts to parse all the XML data and keep references to the whole <repository> elements in an IntrospectionRepository object. This object contains references to <namespace> elements and headers files to include in the generated C code. A list of C identifier prefixes is also built when scanning all the repositories. The IntrospectionParser is now fed with IntrospectionRepository objects and parse each namespace contained in each repository. This change allowed to remove the hard coded list of C identifiers prefixes which make the code more flexible.
  • The combined whitelist and blacklist format for the types.list file has been changed to XML. Since that we know how to parse and use XML data properly in java-gnome now, it was a obvious step to take. The XML based format is a lot more flexible than the previous format and allows us to include more information in it. A small summary of the format to respect is provided at the beginning of the file so the contributors can easily understand how it works.
  • Due to the change of format for the types.list file it was possible to include the Java classes names overrides and the Java packages names overrides in the same file. So now the build is depending on only one file which is a lot better when you want to add, remove or change something in java-gnome.
  • To prevent the java-gnome build process from failing, The org.gnome.glib.File class was made public. This change was not meant to be definitive since we do not use this File outside the package. So I changed this class scope back to default and I added to the blacklisted the functions that were relying on it. We have a well working File class in Java we do not need another one.
  • The rest of the work was polishing, removing useless code, updating comments and email writing.

Week 36 and 37 goal is to add the coverage of another library thanks to the new Introspection based parser and write a simple how-to about it. After that the GSoC will be almost over.