summaryrefslogtreecommitdiff
path: root/tests/auto/language/tst_language.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Loader: Do not error out when encountering duplicate multiplex valuesChristian Kandeler2023-05-161-5/+36
| | | | | | | | | | | | | | | 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>
* Remove Loader classChristian Kandeler2023-05-091-74/+74
| | | | | | | It was just an unnecessary indirection in the end. Change-Id: I956ed4858dcc2b528be1e1fce9ab24862b99ff62 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Loader: Move out the setupProjectFilePath() methodChristian Kandeler2023-05-051-1/+1
| | | | | | | ... into SetupProjectParameters, where it belongs. Change-Id: I5cae2842200a053827739b947d1cd06e1bbe5ef9 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Loader: Remove unnecessary search paths forwarding machineryChristian Kandeler2023-05-051-2/+1
| | | | | Change-Id: Ia4a8c144431c413701707c024185ca54f49b0829 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Merge 2.0 into masterChristian Kandeler2023-05-031-0/+2
|\ | | | | | | Change-Id: I521dd5baab4b4374f9221a163ba8e83531edf8bb
| * ScriptEngine: Make import functionality exception safeChristian Kandeler2023-04-281-0/+2
| | | | | | | | | | | | Fixes: QBS-1730 Change-Id: I83324b7d859412580213dc4eb9f1f60e0f9063f2 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | Use RAII in JSSourceValueCreator in tst_language.cppIvan Komissarov2023-05-021-9/+4
| | | | | | | | | | Change-Id: Ibd4dd3bf5e482442079f564fa3b4e8f5adcb74f1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Remove unneeded QStringRef in tst_language.cppIvan Komissarov2023-05-021-1/+1
| | | | | | | | | | Change-Id: Ic97cde8cd54be6dc5455a83952c8ee6df00fdadd Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Tests: Act on some FIXME commentsChristian Kandeler2023-04-241-1/+1
| | | | | | | | | | Change-Id: Id54960e308b96194b23515d6cf5a6e0e2e89cfa7 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | Rewrite ModuleLoaderChristian Kandeler2023-04-201-5/+21
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | =================== 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>
* Prefer built-in JS function in autotestsChristian Kandeler2023-02-161-1/+1
| | | | | | | contains -> includes Change-Id: I330b1ee3319399d6c59ce5a4efaf14c642ad361e Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Switch JavaScript back-endChristian Kandeler2023-02-071-23/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Use unique_ptr for managing ScriptEnginesIvan Komissarov2021-10-231-4/+4
| | | | | Change-Id: I89f510619196cc01a9e3b0c2273888b12b188928 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Do not use Application item in Language testsIvan Komissarov2021-10-061-1/+1
| | | | | | | | | This item has grown over time and now pulls bundle module and xcode module on macOS which is not desired as it make harder to read verbose logs when debugging tests. Change-Id: I7fa4dfaec477b5c6d8d8ec602d10db866c353441 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove `import qbs` from all project filesDenis Shienkov2021-08-041-2/+1
| | | | | | | | | | | | | | ... because we don't need in this inclusion at all. But for some cases it is impossible to remove that inclusions (and even to move on next lines) because then the some tests are failed by unknown reason. For those tests were added the following comments on the inclusion lines: `// FIXME: Don't remove this import because then the test fails!` Change-Id: I9153fd0e38b94af08168e499ee46a23889ee4d73 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* macOS: Fix getNativeSetting() test on Big SurIvan Komissarov2020-11-201-4/+8
| | | | | Change-Id: I585fe2646339a7d7454570638bef2ad5e9ab502a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: Apply modernize-use-nullptr fix-itIvan Komissarov2020-10-261-4/+4
| | | | | Change-Id: I404ac10a14517763daf656dd38dd560534cbf1fa Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* qbsbuild: move logging to the static libraryIvan Komissarov2020-08-201-2/+1
| | | | | Change-Id: I94bd7288a9ef3b7a785a76386ff7d395cdd01f81 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Replace QRegExp by QRegularExpressionChristian Stenger2020-07-231-1/+2
| | | | | Change-Id: I6c86565b8464efd0b7aec61c12879d3b95a5871c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix Qt 5.15 deprecation warningsChristian Kandeler2020-06-161-2/+2
| | | | | Change-Id: I1d6968de823c43e42ca53eb68972ba5e69dc29ed Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Fix clang 10 warnings about loop assignmentsChristian Kandeler2020-05-181-9/+9
| | | | | | | | | | | | | tests/auto/language/tst_language.cpp:539: warning: loop variable 'p' has type 'const qbs::Internal::ResolvedProductConstPtr &' (aka 'const shared_ptr<const qbs::Internal::ResolvedProduct> &') but is initialized with type 'const std::shared_ptr<qbs::Internal::ResolvedProduct>' resulting in a copy [-Wrange-loop-construct] for (const ResolvedProductConstPtr &p : mainProduct->dependencies) { ^ Change-Id: Ie576a245d7aad5d4dcfac32f5394b18f05e862d5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add testcase for building projects with internal profilesRichard Weickelt2020-05-111-0/+15
| | | | | | | | | | When a project contains a Profile item, it should be possible to use this profile for all products without explicitly selecting it in the product items. Task-number: QTCREATORBUG-23985 Change-Id: Ifba53d26dc302cedd4be7a906ef2fd6fb3e6eb9d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Introduce QBS_TEST_SOURCE_ROOT environment variableRichard Weickelt2020-02-271-4/+3
| | | | | | | | | | | | | | | This patch introduces QBS_TEST_SOURCE_ROOT environment variable that can be used to customize the source location of test data. Previously, the original testdata location was compiled into the test binaries. Thus it was impossible to run the test suites on a different host than the build host. In order to improve test coverage, we want to build the test suites once (for instance in a Docker environment) and then run them multiple times in different environments which might have a different file layout. In that case, the testdata location must be configurable. Change-Id: I7673826e6ea6f2e3aa893e657351a84c49a1033e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Allow relaxed matching of multiplexed dependenciesRichard Weickelt2020-01-291-3/+8
| | | | | | | | | | | | | | | | | | If a multiplexed product depends on another multiplexed product, Qbs previously forced all multiplexed properties to match exactly. Only if Depends.profiles was specified, the comparison was limited to the qbs.profile property and all other properties were ignored. While strict matching is usually the natural choice, there are corner cases where it limits the applicability of Qbs. For example when multiplexing product A over buildVariant, but product B over buildVariant and architecture. In such cases a relaxed matching would be desirable, where only the common properties of A and B are considered. As long as there is only a single resulting dependency, the dependency is unambiguous and safe. Task-number: QBS-1515 Change-Id: I4ae6b413229bf1577311b4198d0596447e650816 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Order list properties by dependenciesRichard Weickelt2020-01-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | List properties of all dependent modules were previously merged in lexicographical order and did not take any module hierarchy into account. This resulted in errors, for instance when multiple inter-dependent modules specified cpp.staticLibraries and the libraries had dependencies on each other. This patch merges list properties according to the top-sorted modules list. This is equivalent to a breadth-first search in the dependency graph. Modules on the same hierarchy level are merged in reverse lexicographical order for implementation simplicitly. For instance, the modules Qt.core, Qt.gui and Qt.network would be merged in the order Qt.network, Qt.gui, Qt.core. The resulting order is stable and does not dependent on anything else than the actual dependency relationships and the module names. I.e. the order of Depends items is irrelevant. This change leads to a much simpler implementation of ModuleMerger and has the positive side-effect that property values are evaluated in the correct scope more often. A warning is now generated when multiple modules write to the same scalar property and the warning is being tested. It was previously there as well, but did not fire in all cases, for instance when an Export item wrote to a scalar property as well as an exported module. Fixes: QBS-1505 Fixes: QBS-1517 Change-Id: I450d2a84cd29afe42c17be7e946e4f755da1c49f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix wrong behavior of Depends.profilesRichard Weickelt2019-12-191-0/+6
| | | | | | | | | | | | | When Depends.profiles contained a non-existing profile, Qbs just crashed. When Depends.profiles was set, but the dependency had an aggregator, the aggregator was always selected. This behavior was wrong. When Depends.profiles is set, it must take precedence and the aggregator must be ignored. Fixes: QBS-1513 Fixes: QBS-1514 Change-Id: I214afe0e2921b773ea1c224732c5c5430e7af063 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Adapt source code to Qt 6Christian Kandeler2019-12-171-0/+1
| | | | | | Change-Id: If84e3e4c832c2b3dc39e40be13e989996ab764d1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Use QStringLiteral more where it is possibleDenis Shienkov2019-02-251-22/+22
| | | | | | Change-Id: I7419cc3fbc1e8776de3943852dcedab4c95d1c32 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use 'const auto' keywords more at objects allocationsDenis Shienkov2019-02-231-1/+1
| | | | | | Change-Id: I592d433e7c473ae9f27ca08e701516efe53650ba Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Introduce module providersChristian Kandeler2019-01-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | If a dependency is not found, we now search for a matching module provider that can generate one for us. We also provide a generic fall-back provider which uses pkg-config to locate the dependency (but could be extended to incorporate other methods in the future). This is the most important part of this change for practical purposes, as it makes hundreds of popular libraries available for use in qbs projects without users having to write any boilerplate code. In a future patch, a module provider could also be used to implement the functionality of the qtprofilesetup library, relieving users of the need to create a profile for building Qt applications. [ChangeLog] The Depends item now falls back to pkg-config to locate dependencies whose names do not correspond to a qbs module. Fixes: QBS-1107 Change-Id: Ifd4f05c237cf58cd9fe707c3da648d3dbb33e82b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* SetupProjectParameters: Remove invalid assertionChristian Kandeler2019-01-071-0/+20
| | | | | | | It prevented users from overriding variant properties. Change-Id: I37c3e0a127048d7a6c6d396b20b424003ac25903 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge 1.12 into masterChristian Kandeler2018-12-171-0/+48
|\ | | | | | | Change-Id: I44f8e2c5f3fbe8fc67deada65a4136257572239e
| * Fix bogus error about duplicate source filesChristian Kandeler2018-12-131-0/+48
| | | | | | | | | | | | | | | | | | There is no conflict if the same file is pulled in both as a target artifact of a module and a normal source file. Fixes: QBS-1416 Change-Id: Ic7467af5a8728ebb1540381c845ffc0f40e06a9c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-10-261-0/+34
|\ \ | |/ | | | | Change-Id: I5cf41522f027adac0889dc1df96613012216f092
| * Do not try to evaluate the properties of non-present modulesChristian Kandeler2018-10-221-0/+34
| | | | | | | | | | | | | | It's unnecessary and potentially harmful. Change-Id: Iff5a9a52a7aeb518617104c5eaa41cfeededbea5 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-10-121-0/+31
|\ \ | |/ | | | | Change-Id: I96c735aeda89e02f1fa9107ecfc10ebf4b554dbc
| * Remove bogus assertion from Properties item handlerChristian Kandeler2018-10-111-0/+31
| | | | | | | | | | | | | | | | | | It does not appear to serve a purpose, and it prevented deriving from the Properties item. Change-Id: Icf71e3358299ea7a0f697637967e65dd0fb9b743 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-06-291-0/+51
|\ \ | |/ | | | | Change-Id: Ieaf617a09ed16cf0c81ea7621d4d0ba23741fbfa
| * Do not crash on invalid property assignment in Export itemChristian Kandeler2018-06-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | The crash would happen when creating the export information for a product whose Export item contained an assignment of the form "x.y: original", where x is not a module and the assignment was inside a Properties item. Task-number: QBS-1362 Change-Id: I900857fcd97852360ec2b75de1b7a791fd948dc4 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Provide an error location for invalid property assignmentsChristian Kandeler2018-06-251-0/+3
| | | | | | | | | | | | | | | | | | | | ... of the form "x.y.z: value", where there is no module x.y. The errors printed in this case did not have a location, because none of the value items are proper module instances and we did not keep track of the chain of parent items. Change-Id: I2da4da7beb5bd6f6d185a63c90d42340c9e30492 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Properly diagnose invalid module property assignmentsChristian Kandeler2018-06-251-0/+44
| | | | | | | | | | | | | | | | | | ... if the non-existing module name has more than one component. We inadvertantly skipped the check in that case. Task-number: QBS-1362 Change-Id: I1fcababee1ea70c3133bd1b1c8f8f32f8450a0e8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Remove the base module import from most test data projectsJoerg Bornemann2018-06-221-16/+16
| | | | | | | | | | | | | | | | Keep the base import in blackbox/testdata/deprecated-property to ensure we don't accidentally break it. Change-Id: I790da21a7490ec9c1b0335f45e8707e7e04daa7c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-06-221-0/+11
|\ \ | |/ | | | | Change-Id: I3b5f14cf38452aaa740ac66cffa1e740f7349823
| * Catch mis-use of "original" as default property valueChristian Kandeler2018-06-181-0/+6
| | | | | | | | | | | | | | | | This used to cause an infinite recursion, eventually crashing after running out of stack space. Change-Id: I073f7163d73a70b17bab078c8a99199bc9d21eaa Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Check for duplicate entries in multiplex propertiesChristian Kandeler2018-06-151-0/+5
| | | | | | | | | | | | | | | | | | This used to lead to an error message about duplicate product names, which left the user in the dark about the actual problem. Change-Id: I460dcdf89112124cfd303529d42acd6c13fe9155 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Allow rules without output artifactsChristian Kandeler2018-05-281-0/+3
|/ | | | | | | | | | | | It is occasionally useful to have a rule whose purpose lies solely in its "side effects", that is, it does not produce any actual files. This patch removes the necessity to declare a dummy artifact in that case. [ChangeLog] Added support for rules without output artifacts Change-Id: I38e76a5ddc78ffa768e8ae1f270ae2f7461c5ee7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* ModuleLoader: Remove unneed loadBaseModule() callChristian Kandeler2018-05-171-0/+18
| | | | | | | | | | | | | | | That call was probably conceptually unneeded since d08ce8f643 (because from then on the module instance, which already has a qbs instance, was used to evaluate the condition), and harmful since be8432fac9 (because the loadBaseModule() call then happened on the shared module prototype). This patch also needs to touch the module merger: Because the prototype is now not tainted with qbs properties from the product item anymore, we have to make sure that variant values are not ignored during module merging; otherwise, qbs properties set by the multiplexing procedure could get lost in the merge process. Change-Id: Iae5d47dbe018d330f4c96e919bb0f83c086ae1df Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Allow module instances with the same priority in different search pathsChristian Kandeler2018-05-151-3/+37
| | | | | | | | | | The search path order provides additional prioritization. Conflicts can now only occur between candidates in the same directory. This is needed e.g. to allow distributions to provide global search paths. Change-Id: I698a96e8943041fb0c4536901f75394bacd7fb40 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Show location of invalid Project.references valuesChristian Kandeler2018-05-091-0/+2
| | | | | Change-Id: I8e55d065603521473190f2b8da332caa25956e3b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix size_t/int size mismatch warningJoerg Bornemann2018-04-271-12/+12
| | | | | Change-Id: I4e15b8ebfb626c5f1477a527f09e6362cd9a6c2b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>