When I started blogging in the end of last year, I thought I would write much more frequently than I do: if only I had better marketing abilities, there would certainly be many more posts about what's going on the Ark, KDE's beloved archive manager, and KDE on FreeBSD fronts. At least I seem to be in good company in the occasional bloggers department. :)
Over the last few months (actually, for the last 1 or 2 release cycles at least), Ark has not received many feature additions (half of our open bug reports are wishlist items -- I'll never get tired of saying that many of them are quite easy to implement and are good junior jobs in case you are looking for a way to get into KDE development). Lack of time from both Harald (who, by the way, is finally getting his university degree one of these days) and me is not the only explanation, though: this may sound weird, but whenever I do have time for some KDE hacking, I prefer fixing bugs to implementing new features. :) The last weekends have been quite productive in this regard.
One of the most useful things for bug fixing (and also for preventing old bugs from showing up again) are unit tests. Ever since I started contributing to Ark's development, I thought it would be nice to have unit tests both for the code code (curiously called Kerfuffle) and the plugins, so that we can be more (even though not 100%) sure that the code behaves the way we want it to. I started writing some unit tests for Ark a few months ago, but they didn't look that nice and I stopped working on them shortly after starting. Two weekends ago I had some free time, so I started playing with them again. I wrote a dummy plugin which reads archive entries from a text file in order not to depend on the existing, real plugins, which may have bugs on their own. It lasted for only one week, as the next weekend I scrapped it in favour of a JSON-based format which lets one specify more archive properties in a concise way. Big kudos to the QJSON folks for their work (this also means that you need to have QJSON installed in order to compile Ark's unit tests). The total amount of tests written is still small, but I'm quite happy with them and hope to keep writing more of them as time permits. I can already say that the unit tests have helped me fix bug 225426, which was a regression that hopefully will be detected as soon as I write code while being distracted again.
Speaking of bugs, this Saturday I was able to close 3 bugs in a few hours (and mark 2 or 3 as duplicates too): bug 242071 prompted a cleanup of the RAR plugin (even though the RAR file format is unfortunately proprietary, unrar's source code is free (as in beer, though) and helped me understand what was going on), and bugs 241967 and 221551 were one-liners. The latter had many duplicates and seemed to be causing some headaches to users who were extracting many files at once (by the way, if you have a multi-volume archive, you do not need to select all of them in Dolphin to fully extract it, just select one of them).
We currently have 88 open Ark bug reports, 21 more than the 67 we had when I wrote my last post. The most serious ones, which are crashes related to closing Ark before finishing one operation (one of which has 90 votes and quite a number of duplicates), demand more free time to be fixed correctly, but it will certainly be easier to fix them as we progressively have more of our code covered by tests.
On a final note, if you want to help write and run our few unit tests, do not forget to pass -DKDE4_BUILD_TESTS:BOOL=ON to CMake when building Ark.