| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| | |
Change-Id: I16c1373e21db71a47be45bfebaeca91084e1b067
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QDomDocument::setContent received new overloads which do not return a
bool, but a QDomDocument::ParseResult, which can be converted to bool.
Thus the static_cast is enough and shouldn't bother builds with Qt <
6.5.
Change-Id: I2ef334503b853adc6fe54fd739321b22a4ba6721
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
Most importantly, break the reverse dependency on ProjectTreeBuilder.
Change-Id: I9b6b7db684ed749eb6e82445b37b7e532e714ed2
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
===================
Problem description
===================
The ModuleLoader class as it exists before this patch has a number of
serious problems:
- It instantiates modules over and over again everywhere a
Depends item appears. The different instances are later
merged in a hopelessly obscure and error-prone way.
- It seriously pollutes the module scopes so that sloppily written
project files appear to work even though they shouldn't.
- Dependencies between products are handled twice: Once using the
normal module instantiation code (with the Export item
acting like a Module item), and also with a parallel mechanism
that does strange, seemingly redundant things especially regarding
transitive dependencies, which appear to introduce enormous
run-time overhead. It is also split up between ModuleLoader and
ProjectResolver, adding even more confusion.
- The code is messy, seriously under-documented and hardly
understood even by its original authors. It presents a huge obstacle
to potential contributors.
=================
Patch description
=================
- Each module is instantiated once per product. Property values are
merged on the fly. Special handling for dependencies between
products are kept to the absolutely required minimum.
- There are no more extra passes for establishing inter-product
dependencies. Instead, whenever an unhandled dependency is
encountered, processing the current product is paused and resumed
once the dependency is ready, with the product state getting saved
and restored in between so no work is done twice.
- The ModuleLoader class now really only locates and loads modules.
The new main class is called ProjectTreeBuilder, and we have split
off small, self-contained pieces wherever possible. This process
will be continued in follow-up patches (see next section).
=======
Outlook
=======
The ProjectTreeBuilder ist still too large and should be split up
further into small, easily digestible parts with clear responsibilities,
until the top-level code becomes tidy and self-documenting. In the end,
it can probably be merged with ProjectResolver and Loader.
However, this first requires the tight coupling between
ProjectTreeBuilder/ModuleProviderLoader/ProbesResolver/ProjectResolver
to be broken; otherwise we can't produce clean interfaces. As this would
involve touching a lot of otherwise unrelated code, it is out of scope
for this patch.
=================
Benchmarking data
=================
We first present wall-time clock results gathered by running
"qbs resolve --log-time" for qbs itself and Qt Creator on macOS
and Windows. The numbers are the average of several runs, with
outliers removed.
Then the same for a simple QML project using a static Qt on Linux
(this case is special because our current way of handling plugins
causes a huge amount of modules to be loaded).
Finally, we show the output of the qbs_benchmarker tool for
resolving qbs and Qt Creator on Linux.
The data shows a speed-up that is hardly noticeable for simple
projects, but increases sharply with project complexity.
This suggests that our new way of resolving does not suffer
anymore from the non-linear slowdown when the number
of dependencies gets large.
Resolving qbs on Windows:
Before this patch: ModuleLoader 3.6s, ProjectResolver 870ms
With this patch: ProjectTreeBuilder 3.6s, ProjectResolver 840ms
Resolving Qt Creator on Windows:
Before this patch: ModuleLoader 17s, ProjectResolver 6.8s
With this patch: ProjectTreeBuilder 10.0s, ProjectResolver 6.5s
Resolving qbs on macOS:
Before this patch: ModuleLoader 4.0s, ProjectResolver 2.3s
With this patch: ProjectTreeBuilder 4.0s, ProjectResolver 2.3s
Resolving Qt Creator on macOS:
Before this patch: ModuleLoader 32.0s, ProjectResolver 15.6s
With this patch: ProjectTreeBuilder 23.0s, ProjectResolver 15.3s
Note that the above numbers are for an initial resolve, so they include
the time for running Probes. The speed-up for re-resolving (with cached
Probes) is even higher, in particular on macOS, where Probes take
excessively long.
Resolving with static Qt on Linux (QBS-1521):
Before this patch: ModuleLoader 36s, ProjectResolver 18s
With this patch: ProjectTreeBuilder 1.5s, ProjectResolver 14s
Output of qbs_benchmarker for resolving qbs on Linux:
Old instruction count: 10029744668
New instruction count: 9079802661
Relative change: -10 %
Old peak memory usage: 69881840 Bytes
New peak memory usage: 82434624 Bytes
Relative change: +17 %
Output of qbs_benchmarker for resolving Qt Creator on Linux:
Old instruction count: 87364681688
New instruction count: 53634332869
Relative change: -39 %
Old peak memory usage: 578458840 Bytes
New peak memory usage: 567271960 Bytes
Relative change: -2 %
I don't know where the increased memory footprint for a small project
comes from, but since it goes away for larger projects, it doesn't seem
worth investigating.
Fixes: QBS-1037
Task-number: QBS-1521
Change-Id: Ieeebce8a7ff68cdffc15d645e2342ece2426fa94
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: I8356c049251d49b3d51526a32d43842a4644c8cb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It seems that mingw is broken and produces invalid
binaries when using cpp.minimumWindowsVersion >= 6.3.
Also, update minimumSystemVersion test to use 6.2
aka Windows 8.
Task-number: QBS-1724
Change-Id: Icea9b21ce6c3b7709495a28114a8c933a88b4647
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Task-number: QBS-1722
Change-Id: Ia6bc6dc4397a613956f27f70ba522c89f7fdbc3e
Reviewed-by: Leon Buckel <leon.buckel@clausmark.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ibdc2e764a5db8c4ab8b0afe9aa24c476f1dea1be
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Should be the other way around.
Change-Id: I4658cd197be51dedd4dcc8eac8ed9c9b86bc8544
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |
| |
| |
| |
| |
| | |
Fixes: QBS-1722
Change-Id: Ib4d08aaf325a0a0e803b9adaa949a026ad4413ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When cross compiling the qmake binary pointed to by the pkg-config-file
might contain the wrong qmake. For simplicity just deactivate setting up
Qt when cross compiling.
Fixes: QBS-1717
Change-Id: I1f856b1f8f918ea09b3280c2f672d0f7db2b8f5f
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
|\ \
| |/
| |
| | |
Change-Id: Iaedd4ecbe9e93b06e9613f2b332f393e234afd16
|
| |
| |
| |
| |
| | |
Change-Id: I9c758dcc77aac7cd9e47e75a8c99d41b6f82afaa
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| | |
Change-Id: Id28155e06744e53f99fdbcdc9f5bf5231a3f511e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This module does not have an explicit dependency on the Qt module, so
there should be no "Qt" identifier in scope.
Change-Id: Iafa7e95bdf53e873bb37c9408a1ed93e0b42dc20
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| | |
Change-Id: I7c952ea53b009e0ce29c6e4824b5238f9ba70a41
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
|\ \
| |/
| |
| | |
Change-Id: I5ec89e4f1260c8d8b669eeb94bb1fefcea9de01b
|
| |
| |
| |
| |
| |
| |
| | |
The generated code makes use of it these days.
Change-Id: I90460a15630cfb55f274da3484d59bf6f1a2e4ec
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| | |
Change-Id: I224ace97588400f540f155eed68495345f1d55a9
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
It's not relevant anymore without QtScript.
Change-Id: Iafb56f71764f8334a1e983cdb83014ac847deed3
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
|\ \
| |/
| |
| | |
Change-Id: Iba50a151f8e5f74d6f58dbe5ae6c596fe72d13f5
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
"name" is a built-in property of the Module item that must not be set by
users. Astonishingly, this has worked so far due to the way the
ModuleLoader code was written.
Change-Id: I959bc0bba6b7c17a420fc6201031ab0bf4449292
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
As requested by our macOS CI machines.
Change-Id: Ic5ef011585bf89da1f04162a26682308b9291c38
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Qt6ToolsToolsTargets.cmake provides a Qt6::qdoc target, so there is
no need to guess qdoc path based on qmake path. It is the same file
where Qt6::qhelpgenerator is defined, which we use here too.
This fixes build on Debian where we moved Qt6::qmake into a different
path to help with cross-building, leaving Qt6::qdoc where it was.
Change-Id: I9e66ffafc8aeb18edc1fe2b27608caa4ee90c3f7
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
|\ \
| |/
| |
| | |
Change-Id: If8cf6ccf0bb3bc57f8589d5b742a26a6c85dbc1c
|
| |
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-111558
Change-Id: I728c69635b3946db8a9019fa2fecf076d72d8468
Reviewed-by: Raphaël Cotty <raphael.cotty@gmail.com>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As opposed to QtScript, such values cannot be re-used in QuickJS. This
was overlooked in 087c22e17721f37490dd2048a567b6a58065d939.
I assume this is the culprit for seemingly random crashes and "not a
function" messages we have been seeing sometimes when building with Qt
Creator.
Change-Id: Ia4e7aed0cda97439ac75db5ecfbf08ff096a02b2
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Sample warning:
Building CXX object src\shared\qbs\src\shared\json\CMakeFiles\qbsjson.dir\json.cpp.obj
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\ostream(378): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\ostream(371): note: while compiling class template member function 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(unsigned __int64)'
F:\Projects\qt-creator\qt-creator\src\shared\qbs\src\shared\json\json.cpp(4142): note: see reference to function template instantiation 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(unsigned __int64)' being compiled
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\ostream(671): note: see reference to class template instantiation 'std::basic_ostream<char,std::char_traits<char>>' being compiled
Change-Id: I404cdeb5e447fe880998aaec4c576c0ed6dd3507
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- install latest vs2019 compiler
- install latest win10 SDK
- add vswhere to simplify searching VS
- update Qt to 6.2.4
- update Qbs to 1.24.0
- drop support for 32-bit packages in choco
Change-Id: I0a57baf160307b84e62fea5c56687efcce7fe42c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Amends e3522f42773cfbb9a980e859c906457b3571fa1f.
Change-Id: If51576f080ee5c01eeae493934cf646403594965
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
contains -> includes
Change-Id: Id893c2ea0659d9bded4f5cec1a3160ccd802118b
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add docker image focal-android-642 and corresponding github action.
Add workaround QTBUG-111713 to correct Qt 6.4.2 android armv7 package.
Change-Id: I8f7c5fd566237d4c490fb6014b0a4efbb6f04a53
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
|\ \
| |/
| |
| | |
Change-Id: Idf83ba9726fa11b1ed3cd2cba0b7fe8d4aa25a43
|
| |
| |
| |
| |
| |
| |
| | |
... and make use of that in the CI.
Change-Id: I7e246e265a311ba24ebd6cde808445039d4c3e93
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
String.{starts,ends}With() are part of ECMAScript 6 and supported
directly by QuickJS.
{String,Array}.contains() are superseded by ECMAScript's includes().
Deprecating them would needlessly annoy users, but we shouldn't
encourage their use either.
Change-Id: Ie0828ba0f78b0235e4b0a3127e56dc8fc2cc46dd
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
contains -> includes
Change-Id: I330b1ee3319399d6c59ce5a4efaf14c642ad361e
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| | |
Change-Id: Ie3b62927baf9009666e4f69ef87a0205a1e512f2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I78ca74c27ccea64331a0995a0e611b8c79411fcb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
According to the doc, Win 7 was dropped in 6.0
https://doc.qt.io/archives/qt-6.0/supported-platforms.html
Change-Id: I34f7501b7348bb658998b713b1ee08e53e91cb95
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The installation directory for mingw 9.0 was detected incorrectly
which lead to the fact we used the wrong compiler in CI.
Change-Id: I4635dde0cf68eacc8436e6393609162e15add418
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The hostOS property was taken out of the qbs module and replaced by the
os property of the Host service. The whole bullet point is no longer
valid.
Change-Id: Ia35a51dffc7b7593e896b754f741cf12aab71db3
Fixes: QBS-1716
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I710c6ec4f12a3335a13c7e3f0dae90cafbb5680f
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
|\ \
| |/
| |
| | |
Change-Id: I7c59b6c7dc914f8af295457babbcb8b2b2685546
|
| |
| |
| |
| |
| |
| | |
Change-Id: Ie1981dd23ca5a4d35a9f63d84efce30c5eed01f4
Reviewed-by: Maximilian Hrabowski <maximilian.hrabowski@bee360.com>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| | |
Change-Id: I68424e794138982f71c3340cc4aba8227403abb8
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| | |
Change-Id: Icaa492b0fee01d37a4cf1940e6d8f456b532abbc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|/
|
|
|
| |
Change-Id: If93dc493a982247ed20c93df90ffebbc05bb64d5
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Newer clang versions seem to expose serious bugs in QtScript, whose
complexity makes it difficult to track them down.
We therefore switch to the more light-weight QuickJS, which offers all
the features we need (most notably property access interception), as
well as good performance.
To save some porting effort, we removed the long-deprecated loadFile()
and loadExtension() functions.
During the porting procedure, we noticed and fixed thread safety issues
in artifact access from JS commands.
We consider this change important enough to bump the major version, so
the next release will be 2.0.
Detailed benchmarking data is below. In summary, we see a modest speed-
up at the cost of a similarly modest increase in memory consumption
(with the exception of project resolving on macOS, which has become a
bit slower). Importantly, the increase does not rise with project size,
as the comparison of qbs vs Qt Creator shows.
Output of qbs_benchmarker on Linux with qbs as test project:
========== Performance data for Resolving ==========
Old instruction count: 12870602895
New instruction count: 11923459780
Relative change: -8 %
Old peak memory usage: 61775848 Bytes
New peak memory usage: 67583424 Bytes
Relative change: +9 %
========== Performance data for Rule Execution ==========
Old instruction count: 4074062223
New instruction count: 3887473574
Relative change: -5 %
Old peak memory usage: 35123704 Bytes
New peak memory usage: 38398392 Bytes
Relative change: +9 %
========== Performance data for Null Build ==========
Old instruction count: 1104417596
New instruction count: 1011033948
Relative change: -9 %
Old peak memory usage: 24461824 Bytes
New peak memory usage: 25325920 Bytes
Relative change: +3 %
Output of qbs_benchmarker on Linux with Qt Creator as test project:
========== Performance data for Resolving ==========
Old instruction count: 67166450352
New instruction count: 60772791018
Relative change: -10 %
Old peak memory usage: 327011616 Bytes
New peak memory usage: 343724176 Bytes
Relative change: +5 %
========== Performance data for Rule Execution ==========
Old instruction count: 71684351183
New instruction count: 67051936965
Relative change: -7 %
Old peak memory usage: 374913688 Bytes
New peak memory usage: 387790992 Bytes
Relative change: +3 %
========== Performance data for Null Build ==========
Old instruction count: 8383156078
New instruction count: 7930705668
Relative change: -6 %
Old peak memory usage: 180468360 Bytes
New peak memory usage: 182490384 Bytes
Relative change: +1 %
Real-world data building Qt Creator (using qbs --log-time, several runs,
removing outliers):
macOS:
Resolving: 43s -> 47s
Rule execution: 17s -> 14s
Windows:
Resolving: 18s -> 16s
Rule execution: 22s -> 17s
Fixes: QBS-913
Fixes: QBS-1103
Fixes: QBS-1126
Fixes: QBS-1227
Fixes: QBS-1684
Change-Id: Ie5088155026e85bbd1e303f1c67addb15810a3cb
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
|
|
|
| |
Change-Id: Ib98b51305b491f3c1b54af2bf03738df08c5f789
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|\
| |
| |
| | |
Change-Id: I2414c0eaf431386e3d529d03fff19f2a589a2aa4
|