| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Fixes: QBS-1735
Change-Id: Ide0800d397c5c45c9b4129b732bd27d0d374b7b2
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In qbs, values of list properties specified in a project file are merged
with those from the profile.
As of fb52fed84a1510a7de0172e643d6fd66a780e2e8, this is also true for
the special multiplexing properties ("qbs.architectures",
"qbs.buildVariants" etc). This means it can now happen that we end up
with duplicate entries in these lists implicitly. Therefore, it no longer
makes sense to throw an error when such duplicates are encountered, as
they were not necessarily specified verbatim. Instead, we simply ignore
the duplicate value and carry on normally.
Change-Id: Ie4fed2081bebd2b0dd62aa873cafed769b308e97
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On macOS, Info.plist can (rarely) contain binary data which is parsed
into a QByteArray. However, since byte arrays were discarded when
converting from variant, such keys were lost e.g. when doing plist
merging.
Fix that by converting QByteArray to a JS ArrayBuffer object.
Using such types is a bit awkward as seen in the testcase, but conforms
JS type system.
Change-Id: I7a680aa7943ba3bde1ddf4ac84e3485fb0ba01d8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
These should never be matched by Depends.productTypes.
This amends fb52fed84a1510a7de0172e643d6fd66a780e2e8. The problem was that
Depends.productTypes now considers Module.additionalProductTypes, which
may come in via exported dependencies from the main product, which the
shadow product has a dependency on.
Change-Id: I73080949b3cb80642e28851517b58fd6a70affca
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... and propagate_const from KDAB tools.
The propagate_const class fixes the issue that d-pointer in const-methods
is not const.
Such Pimpl class has several advantages over the raw pointer.
- the d-tor is trivial and removes the burden for the author/reviewer to
remember to check if pointer is deleted correctly.
- constness is now propageted correctly to the d-pointer in const
methods.
- makes the intention clear that we're using the PIMPL idiom
Change-Id: Ibc42cdaeb6d3303fea81ac6edd63bea0da2ac08d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
| |
It was just an unnecessary indirection in the end.
Change-Id: I956ed4858dcc2b528be1e1fce9ab24862b99ff62
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
|
|
|
|
|
|
|
| |
It's silly to run the ProjectTreeBuilder elsewhere and forward the
result to ProjectResolver when that's the only place it is needed.
Change-Id: If6ce01be57e2f144bdc6a1409b8f1057eaa5218e
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
|
|
|
|
|
|
| |
... into SetupProjectParameters, where it belongs.
Change-Id: I5cae2842200a053827739b947d1cd06e1bbe5ef9
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
|
|
|
|
| |
Change-Id: Ia4a8c144431c413701707c024185ca54f49b0829
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
|
|
|
|
| |
Change-Id: I67cea02050a21dc83c702116732dfeb46e828af1
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
|
|
|
|
|
|
|
| |
Project loading functionality is implemented in various source files
these days, so it makes sense to group them together.
Change-Id: Iba42b0246c40610d2a03bf6cc7ed7d3bec9d5536
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
|\
| |
| |
| | |
Change-Id: I521dd5baab4b4374f9221a163ba8e83531edf8bb
|
| |
| |
| |
| |
| |
| | |
Fixes: QBS-1730
Change-Id: I83324b7d859412580213dc4eb9f1f60e0f9063f2
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Originally, provider added paths to the reader and they were
reseted to project state deeper in the recursion.
We lookup modules in the clean state so we do not pollute
the search paths added by providers, otherwise existingModulePathCache
is polluted with search paths from previous invocations of the fallback
module provider.
This amends fb52fed84a1510a7de0172e643d6fd66a780e2e8.
Change-Id: I35ebe7987a0d1421a4b3753c7da2dae072a86542
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We forgot a member, which manifested itself when using module properties
whose value referred to "original" on the group level.
Also fix a check in Evaluator that prevented us from even trying to
evaluate such properties.
Amends fb52fed84a1510a7de0172e643d6fd66a780e2e8.
Change-Id: I73cae5e6d9603f277862a1ccc8ea8f676d6a5ab1
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
Amends fb52fed84a1510a7de0172e643d6fd66a780e2e8.
Change-Id: I5eb92e515dae3059b9ba3b118a683e0aedb97ddb
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These were only kept for temporary bug compatibility with the QtScript-
based implementation.
Apart from being more correct, this also yields a small, but consistent
speed-up of about 2%.
Change-Id: I857fed3bd64eb68ce5e1ded80647e46593f410b4
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It's probably not worth adding an extra export macro for that, so just
enable QBS_AUTOTEST_EXPORT if any tests are enabled.
Amends b3509323a4552eb1c4a43218cb715904400d0d62.
Change-Id: I3573ae59de98f192d6ae3630b973857f911b3eaa
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| | |
Change-Id: I14621ffa3102d24518db0360eb71d37f2b517d60
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
That's where it belongs, and now it is possible to put it there.
Change-Id: I2bd041dcf2e1e8e1be804f4b31c72c2859615017
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
ProductContext is no longer used elsewhere.
Change-Id: I6bf158d61153c9a05c4963bacd64801b3f0309ec
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
This property must only be set internally.
Change-Id: I4232a734b34fc2a99d692e58afeba3026d28bb1f
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Most importantly, get rid of the reverse dependency on
ProjectTreeBuilder.
Change-Id: I1ad657767f9a083cdbd4c18779de15a4c5f2fbd5
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
|\ \
| |/
| |
| | |
Change-Id: I483d3e0b7076c1df50594356da989d86fc0ec451
|
| |
| |
| |
| |
| | |
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: 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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Change-Id: Ie1981dd23ca5a4d35a9f63d84efce30c5eed01f4
Reviewed-by: Maximilian Hrabowski <maximilian.hrabowski@bee360.com>
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>
|
|
|
|
|
|
|
|
|
|
| |
We have been supported CMake build for quite some time
so users should have plenty of time to adapt.
Ubuntu, Brew and macports also use CMake for building QBS.
Change-Id: Ib78177f4a7ca8cdea1a2f3a8eac8bfe804674f32
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
| |
Amends d8d7beb866b24793d9c04b6996276a4a8959bfa2.
Change-Id: I6eefff5640ad1213e2ae36d7f71ba476ea4d475b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
| |
It's deprecated in Qt 6.4.
Change-Id: I8daa6fc7fffbe80938dd3cc64168bfd9471f85f4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As of now, a newly deprecated property leads to users getting bombarded
with warnings, even though they did not yet have a chance to adapt their
project.
Now the warnings appear by default one minor version before removal,
which together with our convention of keeping deprecated properties for
at least two minor versions gives users enough time to adapt without
getting spammed.
There is also a mode for switching to the previous behavior (for early
detection), as well as the possibility to trigger errors instead of
warnings, which should be helpful in CI configurations.
To support the case where the user cannot do anything about them, the
warnings can also be suppressed altogether.
Change-Id: I295f816758f0f111fcb0351581a4328be3af5668
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
|
|
|
|
|
|
|
|
| |
Otherwise, we end up with wrong modules used by products that override
qbs module props such as sysroot.
Change-Id: Id5a74e8198217e737fb02a506ac7a9bb216b4d60
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
| |
Change-Id: I30ac4a612e527a9dd4d1ab4d714635d178767caf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
| |
Change-Id: I7ca65f27fb30326e6013925a23e0a78ef1de7a5e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
| |
Change-Id: I7eb5247a8c900cbde95408c7184ef2ecfa5d02cd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Make module provider methods have similar signatures.
Also, rename methods to avoid confusion with what they
actually do.
Change-Id: I8a905667f8f583537837d26c07ba62f093709997
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
| |
Change-Id: I0fea777445be769080b5e5534eb8dd05cf4652be
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
| |
Change-Id: I3ca9909c4a9061132c245985c4fd738fb7bc3009
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
| |
Change-Id: Ie79769666203185fe52be5efb09c68336e84cbab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
| |
Change-Id: I86c24c6ad1ea0daf298b71501a6719c8b2650c1c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|\
| |
| |
| | |
Change-Id: I1b8380de724095c1befcf45d2850376ee0a4a78f
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Variables should be allowed to be set to empty values,
only missing variables should produce errors.
Fixes: QBS-1702
Change-Id: Ib9aac611a578a3673fb8201099a707e5842fd750
Reviewed-by: Kai Dohmen <psykai1993@googlemail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
We ended up dereferencing then end() iterator in many cases.
Not that is a problem, but MSVC strict iterators crash in debug.
Change-Id: Ie7cf1fd4a37cc37d568943a5bab57ac699f19265
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|