KDevelop/Sprints/Vienna2012

From KDE Community Wiki
Revision as of 13:24, 12 December 2012 by Milian (talk | contribs) (→‎Kate/KDevelop October Sprint: What's new in KDevelop)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Kate/KDevelop October Sprint: What's new in KDevelop

This is the second part of the article on the joint Kate/KDevelop development sprint that took place in Vienna from the 23rd to 29th of October this year.

If you are interested in some background and what has happened in Kate-land during the sprint, make sure to read the first part of this article [1]. This issue will give an overview over the interesting changes in KDevelop.

Many thanks here once more to the KDE e.V., its sponsors and donors [2] and the Join The Game crowd [25] for funding the development sprint. Special thanks go to Joseph Wenninger [3] for not only organizing the sprint but also funding parts of it. And finally thanks again to Vivid Planet [4] for inviting all attending developers to a great dinner.

[1]: http://dot.kde.org/2012/11/24/katekdevelop-october-sprint-whats-new-kate [2] http://ev.kde.org/getinvolved/supporting-members.php [3] http://www.jowenn.net/ [4] http://www.vivid-planet.com/ [25]: http://jointhegame.kde.org/

What's new in KDevelop

The attending KDevelop hackers have been very busy and productive during the sprint. About 550 commits have been made in just one week. They address performance issues, fix bugs, polish our user interface or integrate new features. In the following you will read about most noteworthy changes that have been made.

Unit Test

While Miha Čančula sadly could not attend the development sprint, he worked quite hard in the months before. One thing he worked on was a framework for Unit Test integration for KDevelop. This allows you to quickly run and debug the unit tests of your projects directly from KDevelop. Make sure to read his report [5] on the new testing framework.

During the sprint we sat together and did a final review of ths work and merged the unit test support into our development branches. Afterwards, Niko and Aleix where busy polishing the newly merged code and greatly improved and stabilized it. As with the rest of the KDevelop codebase, this new framework is easily extensible through plugins. Currently we have support for CTest/QTestLib and PHPUnit, while support for Ruby's Test::Unit is in the works.

image: [1] title: Unit Test Integration

[5]: http://noughmad.com/2012/04/24/becoming-a-kdeveloper/

File/Project Templates

Unit test support was something that Miha worked on in his spare time. This year he was also a GSOC student [6] for KDevelop: He worked hard on an improved project templates support and - more importantly - wrote a new Grantlee based "file template" feature. This allows you to create snippets for new files which replaces and extends the existing "Create new Class" wizard we had in KDevelop up until now. Make sure to read his final GSOC report on the matter [7].

As usualy, you can create a new class, but there are now special templates for extended semantics and frameworks. This allows you for example to create C++ classes following the PIMPL idiom or which implement the Qt shared value semantics. But we also have file templates for GObject classes, PHP classes, CMake modules, etc. pp.

All this work was also finally merged into master during the sprint in Vienna. Aleix and Milian polished the implementation, while Alexander and Miquel created proper Ruby file templates. The good thing is that you can create your own templates [8] and share them with your colleagues or other KDevelop users. If you wrote a good general purpose template, you could also sent it to us and we'll include it with the rest of the existing examples.

image: [2] title: File Templates

[6]: http://www.google-melange.com/gsoc/proposal/review/google/gsoc2012/noughmad/37002 [7]: http://noughmad.com/2012/08/19/gsoc-templates-in-kdevelop-final-report/ [8]: http://techbase.kde.org/Projects/KDevelop4/File_template_specification

Python Support

While Sven did not only work on his pet project, the Python language support, he sure managed to improve it a lot. He concentrated on code optimizations, clean ups and most importantly bugfixes. This paved the way for the first beta release [9] of kdev-python 1.4. Just shortly after the sprint then he successfully released kdev-python 1.4 [10] which works together with KDevelop 4.4 and supports python 2.7. For KDevelop 4.5 he is already busily hacking away on kdev-python 1.5 which should then finally support Python 3.

image: [3] title: Python Language Support

[9]: http://scummos.blogspot.de/2012/10/vienna-kdevkate-sprint-first-kdev.html [10]: http://scummos.blogspot.de/2012/11/kdev-python-14-stable-released.html

Ruby Support

On the ruby front we also saw lots of improvement thanks to the hard work of Miquel and Alexander. Building on top of Miquel's work [11] during GSOC this year, they improved the Ruby plugin until it managed to successfully parse Alexanders large Ruby on Rails source projects. [12] While this work required lots of changes to the language plugin, they also worked on proper Ruby support for the new File Templates and Unit Testing features for KDevelop [13].

image: [4] title: Ruby Language Support

[11]: http://www.mssola.com/2012/08/gsoc-improving-kdevelop-ruby-support.html [12]: http://adymo.blogspot.de/2012/10/katekdevelop-sprint-new-ruby-language.html [13]: http://adymo.blogspot.de/2012/10/katekdevelop-sprint-more-progress-with.html

QML/JS Support

Aleix started a proof of concept language support plugin for both, JavaScript and QML for KDevelop [18]. He based it on the excellent work done by the QtCreator team in that regard. All that is required now, and which was somewhat started already by Milian, is to integrate the parser into a proper KDevelop language plugin.

If you are interested in helping out here, contact us on our development mailing list [19]. While writing language plugins is not easy, it is a very rewarding tasks that will teach you a lot about programming in general and C++, JavaScript and QML in particular.

image: [5] title: Basic JavaScript Language Support

[18]: http://milianw.de/blog/qmljavascript-language-plugin-for-kdevelop [19]: http://kdevelop.org/mailinglists

C++ Support

Besides working on shiny new language support plugins, our existing C++ language support was continuously improved as well during the sprint. Sven fixed a few annoying bugs in C++ code completion, while Olivier worked on a new "lookahead matching" code completion feature (see screenshot). He landed it in master shortly after the sprint and awaits feedback from our daring users: Is it useful? Is it fast enough? Can it be better? How to reduce noise?

image: [6] title: C++ Look-ahead code completion

Olivier also worked very hard on improving the template support in our C++ language support. He introduced a new template resolver which finally chooses the correct specializations in most places. He also managed to remove many useless instantiations (up to 75% in some cases) which results in smaller DUChain caches and faster performance in general.

Web Development

While it is sad, it is still a reality: Quanta is dead since we do not have enough man power. The bright side is that KDevelop is already a very good - in many parts even much superior - alternative to the Quanta you may know and love from KDE 3 times. Especially the excellent language support for PHP, Ruby and Python makes KDevelop users much more productive when writing code for the web. Still, people miss some of the neat little functionalities of Quanta.

There existed a so-called Quanta 4 port which was basically just an IDE on top of KDevplatform (just like KDevelop) with some additional web development plugins. But there was never a proper release of these already quite functional plugins. Thus Niko finally took some time during the sprint to create separate repositories for the plugins that used to live inside the Quanta repository [20]. Afterwards he ensured that the plugins work properly with a recent KDevelop version and created a first release for the SQL plugin [21], the XDebug PHP Debugger [22] and last but not least the Upload plugin [23]. There is also a quite nice CSS language support plugin. The other plugins are not in a good shape and will need some work, such as the XML/HTML language support, Crossfire debugger integration and a PHP source formatter plugin.

Anyhow, expect to see new stable releases of many of those plugins in the future, together with the KDevelop 4.5 release.

[20]: http://nikosams.blogspot.de/2012/11/quanta-update.html [21]: http://nikosams.blogspot.de/2012/10/execute-sql-kdevelop-plugin.html [22]: http://nikosams.blogspot.de/2012/10/kdevelop-xdebug-php-debugger-beta.html [23]: http://nikosams.blogspot.de/2012/11/kdevelop-upload-plugin-like-quanta- had.html

Polishing

We did not only spent time on new features though. Face to face discussion and pair programming enabled us to improve and polish many parts of our user interface. This is always a huge advantage of such hack sprints and just shows how important it is to regularly meet in person.

So what has changed? Sven and Aleix spent some time on beautifying our settings dialog [14] which meant adding nice icons here and there as well as restructuring the form layouts a bit.

image: [7] title: Beautified Configuration Dialog

Furthermore they once again worked on improving our launch configuration dialog [15]. Here they tried to simplify it as much as possible, to make it simpler for new comers to create custom launch configurations. The simpler UI is also much more visually appealing thanks to the reduced cruft and clutter.

image: [8] title: Polished Launch Configuration Dialog

[14]: http://scummos.blogspot.de/2012/10/vienna-kdevkate-sprint-kdevelop.html [15]: http://scummos.blogspot.de/2012/10/vienna-kdevkate-sprint-first-kdev.html

Besides such visual polish, the KDevelop source base saw lots of other smaller improvements over the week of the sprint. Milian further optimized the Quick Open feature for large projects with thousands of files. Furthermore he ensured that the results of the "Show Uses" action are now always shown in a toolview and never in a tooltip which could accidentally be closed. The "Open with" plugin also saw many improvements [16].

image: [9] title: Improved Open With

Aleix was busy further improving the CMake support in KDevelop. He also polished the Welcome Page which was added in KDevelop 4.4 [17], improved our "Pick Session" dialog and created a new Plasmoid launcher. Together with Milian he also created a new assistant which automatically renames a file if it contains a class which was renamed, i.e.: You have a class Foo in Foo.h and Foo.cpp and rename the class Foo to Bar. Now KDevelop offers you to automatically rename the files Foo.h and Foo.cpp to Bar.h and Bar.cpp respectively.

image: [10] title: Rename File Assistant

[16]: http://milianw.de/blog/random-new-stuff-from-the-kdevelop-sprint [17]: http://www.proli.net/2012/04/27/youre-welcome-to-kdevelop/

Niko spent some time on polishing and fixing bugs in the generic manager and our file system view [24]. He added a drag'n'drop context menu to our project menu, just as you know it from Dolphin and KMail for example. The file system now supports bookmarks thanks to him. Furthermore, he improved our Git integration and fixed some bugs in the GDB debugger support.

image: [11] title: Drag'n'Drop Context Menu

[24]: http://nikosams.blogspot.de/2012/10/kdevelop-project-and-filesystem-view.html

Finally, and this might be important for packagers, Olivier changed the location of our DUChain cache, from `~/.kdevduchain` to `$XDG_CACHE_HOME/kdevduchain`, which by default is `~/.cache/kdevduchain` but often remapped to some other location if your home directory lives on a network share. You can now also set a custom location using the new `$KDEV_DUCHAIN_DIR` environment variable if you wish to do so. Note: The old cache directory is not removed automatically, thus if you run KDevelop master, or KDevelop 4.5 in the future, make sure to remove `~/.kdevduchain`.

Conclusion

We can safely say that this years development sprint was a huge success. Many important new changes have landed and lots of bugs been fixed. In short: The KDevelop 4.5 release will be an exciting milestone.

But also from a social perspective, the sprint was an excellent experience. Especially that some new people attended was very welcome and we hope to see more in the future. And just like in the last years, having a joint sprint with the Kate developers was fun and productive. If you are interested in joining us in 2013, consider submitting your first patches to either KDevelop [26] or Kate [27].

Many again thanks to all supporters and donors. Thanks to Joseph for organizing the sprint. And a big applause for all the attendees and their excellent work on improving both Kate and KDevelop.

[26]: http://kdevelop.org/ [27]: http://kate-editor.org/