[Qbs] Donation to QBS developers/maintainers/contributes

Иван Комиссаров abbapoh at gmail.com
Tue May 14 16:17:41 CEST 2019


Good information, thanks.
Qbs itself has a huge dependency on a QtCore, but some stuff is present in standard library and can be easily changed to that (we still have enourmous amount of places where qlist is used instead of a qvector/std::vector and used inefficient); others are trickier but can be bootstrapped (like qfile) if needed.
But what about QtScript's dependency on the QtCore/other libs? My point was that it may depend on the qtlibs more than Qbs does and the biggest job is there, not in Qbs core.

Иван Комиссаров

> 14 мая 2019 г., в 14:08, Christian Gagneraud <chgans at gmail.com> написал(а):
> 
>> On Tue, 14 May 2019 at 23:35, Christian Gagneraud <chgans at gmail.com> wrote:
>> 
>>> On Tue, 14 May 2019 at 23:11, Christian Gagneraud <chgans at gmail.com> wrote:
>>> 
>>>> On Tue, 14 May 2019 at 22:51, Иван Комиссаров <abbapoh at gmail.com> wrote:
>>>> 
>>>> I wonder how hard is to implement pure c++ "declarative" library. Afaik, qtdeclarative originally used v8 JavaScript engine which got replaced with Qt-ish engine to avoid conversions to/from Qt types. Maybe, it's possible to go the opposite direction and remove Qt dependency in the first place?
>>>> Except for GUI and script module, I don't think there's a lot of Qt stuff.
>>> 
>>> chgans at chgans-pc:~/Projects/qt-creator/src/shared/qbs$ find src/ -name
>>> '*.[hc]*' | xargs sed -ne 's, *# *include *<\(Q[^/>.]*\)[/>].*$,\1,gp'
>>> | sort | uniq -c | sort -nr
>>>   673 QtCore
>>>     76 QtScript
>>>      7 QtGui
>>>      6 QtWidgets
>>>      5 QtNetwork
>>>      1 QtXml
>> 
>> The above is the number of #include in all cpp and h files, per Qt
>> module. As you can see dependency on QtCore is quite heavy.
>> 
>> And here is the number of cpp/h files using QtScript, per directory:
>> chgans at chgans-pc:~/Projects/qt-creator/src/shared/qbs$ git grep -l
>> QtScript src/ | egrep '.(cpp|h)' | xargs dirname | sort | uniq -c |
>> sort -nr
>>     17 src/lib/corelib/buildgraph
>>     14 src/lib/corelib/jsextensions
>>     12 src/lib/corelib/language
>>      3 src/lib/corelib/tools
>> 
>> Ideally you would like to see only jsextensions and language
> 
> Just in case someone follows my monologue... :)
> 
> QtSCript dependency of buildgraph:
> chgans at chgans-pc:~/Projects/qt-creator/src/shared/qbs$ git grep -h
> QtScript src/lib/corelib/buildgraph/ | sed -ne 's,^ *# *include
> *<QtScript/\([^>]*\)>.*$,\1,gp' | sort | uniq -c | sort -nr
>    10 qscriptvalue.h
>      3 qscriptengine.h
>      3 qscriptcontext.h
>      2 qscriptvalueiterator.h
>      2 qscriptclass.h
>      1 qscriptstring.h
>      1 qscriptprogram.h
>      1 qscriptclasspropertyiterator.h
> 
> I'm no expert at QtScript and Javascript, but this looks mostly like
> "core" classes (value, engine, context, program).
> 
> And here are the "offenders"
> chgans at chgans-pc:~/Projects/qt-creator/src/shared/qbs$ git grep -l
> QtScript src/lib/corelib/buildgraph/
> src/lib/corelib/buildgraph/artifactsscriptvalue.cpp
> src/lib/corelib/buildgraph/artifactsscriptvalue.h
> src/lib/corelib/buildgraph/buildgraph.cpp
> src/lib/corelib/buildgraph/buildgraph.h
> src/lib/corelib/buildgraph/dependencyparametersscriptvalue.h
> src/lib/corelib/buildgraph/depscanner.cpp
> src/lib/corelib/buildgraph/depscanner.h
> src/lib/corelib/buildgraph/processcommandexecutor.cpp
> src/lib/corelib/buildgraph/projectbuilddata.h
> src/lib/corelib/buildgraph/qtmocscanner.cpp
> src/lib/corelib/buildgraph/qtmocscanner.h
> src/lib/corelib/buildgraph/rulecommands.cpp
> src/lib/corelib/buildgraph/rulecommands.h
> src/lib/corelib/buildgraph/rulesapplicator.cpp
> src/lib/corelib/buildgraph/rulesapplicator.h
> src/lib/corelib/buildgraph/rulesevaluationcontext.h
> src/lib/corelib/buildgraph/scriptclasspropertyiterator.h
> 
> But this is without looking at leaks from langugage itself:
> chgans at chgans-pc:~/Projects/qt-creator/src/shared/qbs$ git grep -l
> QtScript src/lib/corelib/language/*.h
> src/lib/corelib/language/evaluationdata.h
> src/lib/corelib/language/evaluator.h
> src/lib/corelib/language/evaluatorscriptclass.h
> src/lib/corelib/language/language.h
> src/lib/corelib/language/scriptengine.h
> src/lib/corelib/language/scriptimporter.h
> 
> Is it worth the effort to remove QtScript from buildgraph and make
> language hermetic to QtScript?
> Versus: forking, maintaining (and improving?) QtScript.
> 
> Chris


More information about the Qbs mailing list