[QBS] What is the suggested way to do deeply nested projects?
acossette at gmail.com
Tue Aug 12 15:07:23 CEST 2014
The limitation of not being able to use dots in project *names* (they do
currently work fine in targetNames) in Qbs is actually a big annoyance here
at my workplace.
We are developing a modular C++/Qml product that needs to be assembled
differently according to the needs of different projects we are deploying.
Thus, our codebase is structured as a vast toolbox of loosely coupled
components and projects (currently 62 projects) needs to be well structured
and named so one can easily get around. A few years ago, we started using
structured DLL names (ex: company.product.some_module.submodule.dll) and
adopted strict conventions about project names, namespaces, type names, and
such. This improved discoverability and friendliness of our code base quite
Thus, "the company.product.some_module.submodule.dll" lib exposes:
- Qml types in the "company.product.some_module.submodule" Qml module (ex:
import company.product.some_module.submodule 1.0)
- IDL types in the "company.product.some_module.submodule" namespace
- C++ types in the "company::product::some_module::submodule" namespace
- Headers in the company/product/some_module/submodule/ path
However, project names have stayed awkward to this day; both with Qmake and
Qbs (our current build system is Qmake, but we maintain scripts that parse
our .pro files and generate .qbs so we can track progress on Qbs). The best
we've found yet is to use underscore in project names. But it becomes super
awkward for some of our modules that already include underscores in their
names (we end up with project "company_product_some_module_submodule"). It
would be nice and natural of we could have project contain nice dots in
there (or do you have a better separator than '_' to propose?). And yes, we
do also have some .NET projects here and it is nice to follow similar
naming conventions :).
Else, we're overall very happy about how Qbs is shaping up. It's a great
step up for us from qmake, in terms of raw power of customizing our build
process, in terms of performance and in terms of usability.
Keep up the good work!
On Tue, Aug 12, 2014 at 2:11 AM, Jake Petroules <
jake.petroules at petroules.com> wrote:
> On 2014-08-12, at 02:05 AM, Thomas Epting <thomas.epting.stryker at gmail.com>
> > > We simply don't support dots in target names. I don't think this
> > > is a serious limitation.
> > There *are* structured DLL names out there, like
> "vendor.component.subcomponent.dll" in several commercial libraries. Even
> some of the DLLs created in our company use several dots (but for other
> reasons). And maybe there are even more valid use cases. So I think there
> should be no such limitation for target names in a build system. Just my 2
> Yeah. Also, the entire .NET framework and many third party .NET assemblies
> as well. So this limitation won't fly long term; let's find a different way
> to solve this problem. How about using \0 as a separator? :)
> > Regards,
> > Thomas
> > _______________________________________________
> > QBS mailing list
> > QBS at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/qbs
> Jake Petroules - jake.petroules at petroules.com
> Chief Technology Officer - Petroules Corporation
> QBS mailing list
> QBS at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qbs