[QBS] New item ProductFolder

Jochen Becher jochen_becher at gmx.de
Sun Jun 2 16:22:07 CEST 2013


the largest projects we want to organize with qbs in our company
contains about 90 single projects. Currently we use Visual Studio and
the solution uses virtual solution folders organizing the projects in
architectural layers and some technical properties.

As I understand QBS is currently not able to provide a similar thing. So
I started to implement a new Item "ProductFolder" which is a virtual
folder / group between Project and Product. So one can write:

Project {
	name: "Project Name"
	ProjectFolder {
		name: "Client View"
		Product { name: "My Client" }
		references: "client_library.qbs"

Of course ProjectFolders can nest. The project still may contain
references and Products directly. If you ask why such an extension is
needed to Qbs: I believe it makes much sense in IDEs, not so much in
pure console driven development environment.

Is such a language extension welcome to the project? I am not yet ready
to submit it to gerrit but I may soon.

One question about an implementation detail: Currently ResolvedProject
stores a list of ResolvedProduct and a list of ResolvedProjectFolder in
parallel. Should I remove the ResolvedProduct list and replace it with
one dummy ResolvedProjectFolder? This would save a few conditional
expressions in handling project and products (as parent context of
product will always be a ResolvedProjectFolder) or should I stay with
both for compatibility reasons (I am not sure if introduction of dummy
ResolvedProjectFolder may break compatibility to some existing qbs

(I plan to extend the QBS API as well and implement the ProductFolders
in QtCreator's Qbs plugin.)

Regards, Jochen

More information about the Qbs mailing list