aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* fix error message about incompatible import versionJoerg Bornemann2014-08-061-1/+1
| | | | | | | This is the language version, not the qbs version. Change-Id: Id5b439d9d0076cf454ae2bb0a9e9a6041d1d7330 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Deprecate Artifact.condition.Christian Kandeler2014-08-052-2/+8
| | | | | | | | This never really worked. We have the outputArtifacts script for that now. Change-Id: I4c80ec1bcfcfe5a7e93edff1dfbd9a2139da3682 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Be smarter about storing property maps.Christian Kandeler2014-08-046-11/+90
| | | | | | | | | | | The current code just dumps such maps into the file via the ">>" operator, so no strings are shared. This patch fixes that. Example results for building Qt Creator: Size of build graph on disk: ~65 MB -> ~34 MB. Size of build graph in memory: ~250MB -> ~150 MB. Change-Id: Ic89d0f6c37ba1cd7b3aa8a35517bb6a6a37061c2 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* move Transformer creation out of createOutputArtifactJoerg Bornemann2014-08-011-7/+4
| | | | | | | | We don't re-use transformers anymore, so let's create them unconditionally. Change-Id: Iab0b1afe0f6b6224e1a24373ea94254b79847449 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Lower the logger level for sanity check output.Christian Kandeler2014-08-011-3/+3
| | | | | | | Nobody ever wants to see these messages on log level "debug". Change-Id: Ic999ee5381099421b7aedf2279d060a4e9555fbd Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* multiplex rules now always see all inputsJoerg Bornemann2014-08-012-15/+6
| | | | | | | | | | | | | Multiplex rules now always see all inputs they're interested in and not only the compatible inputs that are out of date. Also, we do not need to re-use transformers, because that's a fruitless optimization attempt that complicated the code. Eventually, we're able to remove the hard-to-grasp "regenerating transformer" block. Task-number: QBS-645 Change-Id: I86dd307ee6ffa95baddd4e49307f0c1816e29901 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* set alwaysUpdated and properties for re-used Artifact objectsJoerg Bornemann2014-07-311-2/+2
| | | | | | | | Otherwise we can end up with outdated values. Task-number: QBS-645 Change-Id: If953d9530f3211666e903b2615410ed9ba2ac0f0 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* do not add file tags to re-used output artifactsJoerg Bornemann2014-07-311-6/+3
| | | | | | | | | This was needed when we createOutputArtifact was called multiple times for the same file path. This doesn't happen anymore. Task-number: QBS-645 Change-Id: Ia99975ee64a183fa5718a2dd56ff4ce1bb11f2ed Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* do not call createOutputArtifacts for the same filePath more than onceJoerg Bornemann2014-07-312-3/+18
| | | | | | Task-number: QBS-645 Change-Id: Ia54f71ed7543617ba0b44f05e868a899a7c42e9b Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* add getter/setters for Artifact::fileTagsJoerg Bornemann2014-07-3115-47/+76
| | | | | | | | | The setters take care of keeping the product's artifact-by-filetags hash up to date. Before, one had to set up the artifact's file tags before insertArtifactToProduct was called. Otherwise the hash didn't get updated. Change-Id: Ibb530d2c992d72c0a99152009b4e6eecbf770098 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Speed up artifact removal.Christian Kandeler2014-07-311-40/+14
| | | | | | | | | | | | The current recursive algorithm for removing an artifact from the input set of all rule nodes, while admittedly very l33t-looking, results in a quasi-infinite loop when a larger number of artifacts are to be removed. Instead, we now simply iterate over the list of nodes. A further speed-up might be possible by doing batch changes, but this one solves the immediate problem. Change-Id: Id3c19321c82d5097e58b1b312c8717c59dc06eb3 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* fix condition for "conflicting rules" errorJoerg Bornemann2014-07-311-29/+24
| | | | | Change-Id: I3877fcee643e1b80b2ee5030bc2dd98bb13244cd Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* add trace output for RuleNode::applyJoerg Bornemann2014-07-313-0/+27
| | | | | Change-Id: Icbb514d6ec2b13f2660cf86003aea0c6bbd8e132 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Avoid contractions in user-visible messages.Christian Kandeler2014-07-316-10/+10
| | | | | Change-Id: I68685166bfaa873f1e5995c7d507afef45b03055 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add missing comma to error message.Christian Kandeler2014-07-312-2/+2
| | | | | Change-Id: I90b1b4dd35c6b2c625d11137e0f7d76d92641f72 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Invalidate project after certain unsuccessful re-resolving attempts.Christian Kandeler2014-07-302-3/+10
| | | | | | | Namely, if the build data has been mangled by the re-resolving attempt. Change-Id: Ibe020a6bda38a335f95e2d2cef4f37fac3199a7d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* fix setup of cpp.compilerPathByLanguageJoerg Bornemann2014-07-301-0/+1
| | | | | | | | | The existence of the correct compiler binaries was checked, but the compilerPathByLanguage map was never updated. It always contained the initial strings "gcc", "g++" and so on. Change-Id: Ied9e164af0fd102b2a061665921f51f96ca9eb80 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix calculation of old inputs for dynamic rulesJoerg Bornemann2014-07-306-28/+62
| | | | | | | | | | | | | | Instead of deducing the old inputs of a rule from the inputs of its created transformers, we hold a dedicated list of old inputs, because the former approach doesn't work for dynamic rules. This fixes a speed regression introduced in 32c4d3d7. The outputArtifacts script of dynamic rules was always run on compatible inputs that were not input of transformers, e.g. C++ sources that don't have a Q_OBJECT macro. Change-Id: I2d43fa7c91ed9084bd27dc9b948c06152bfce726 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Clean up module item caches.Christian Kandeler2014-07-292-24/+16
| | | | | | | | | | The product- and project-specific ones were left-overs from earlier concepts, so get rid of them. Everything goes into the same "global" cache now. Also make sure that we cache disabled modules too; the respective files were always re-read from disk so far. Change-Id: Ib1dee08dbbfe61b0369772df96122e8eab19741b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove pointless assignmentJoerg Bornemann2014-07-281-2/+1
| | | | | Change-Id: Ifc9a1b3797a82587ffe92fdc431d9c91591bd31e Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix speed regressionJoerg Bornemann2014-07-282-5/+10
| | | | | | | | Commit 9297ea217284e2279f2d4471b3f8fc754dc5fe71 introduced a speed penalty. This is a quasi-revert of said commit. Change-Id: Ia0b0741cf818a9867f127a25830630fb3ea352ff Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Correct handling of project re-resolving with a new build root.Christian Kandeler2014-07-281-5/+7
| | | | | | | | | In that case, we must ignore the existing project. In particular, we must acquire a new build graph lock, as the existing one protects a different build graph file. Change-Id: I6f84d207959c94d082d9966c85d7b86a14ecfeb3 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* qtprofile,clang: add libc++ on iOS and OSX for compilation and linkingFawzi Mohamed2014-07-241-2/+9
| | | | | Change-Id: I8e1964238231ecf87ab5df8b036b79a6c7348a61 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* API: Be smarter about adding files already matched by wildcards.Christian Kandeler2014-07-235-16/+64
| | | | | | | | | | | The project file does not need an update in this case. Actually, that would even lead to an error on the next project resolving, as the file would then be listed twice (once explicitly and once matched by a pattern). Task-number: QBS-653 Change-Id: If56969c36d1bba3f9194621690c2e1f25229ee9e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* introduce Project.minimumQbsVersionJoerg Bornemann2014-07-226-0/+51
| | | | | | | | | This property can be used to specify the minimum required QBS version of a project. Change-Id: I564f4298c060c3acf2f6221fb1d6978eda1dd1a5 Task-number: QBS-453 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix Qt4 buildJoerg Bornemann2014-07-221-1/+1
| | | | | Change-Id: Icbfb31d435b804254e1df95ed188763360f7c33b Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* put the project file artifact into artifactsByFileTagJoerg Bornemann2014-07-221-0/+1
| | | | | | | | | | The qbs file artifact was missing in that particular lookup table, because the "qbs" file tag is added after insertArtifact is called. This fixes tst_blackBox::testEmbedInfoPlist on OS X. This commit amends 32c4d3d7. Change-Id: Ibab9f301ca4cc4e562b4a397953add70351403bb Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* make it possible to set module properties on artifacts in outputArtifactsJoerg Bornemann2014-07-221-0/+73
| | | | | | | | | | | | | | | | | | Example: outputArtifacts: { return [{ fileTags: "blubb", filePath: "x", cpp: { includePaths: "mydir" defines: ["BLA", "BLUBB"] } }] } Task-number: QBS-646 Change-Id: I3defa656e1a5b10fe56e4bbba7c354612144552c Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Export information about project file updates being available.Christian Kandeler2014-07-223-1/+6
| | | | | | | Clients need to set the define as well when including the header. Change-Id: I0aa73cb2f530258685dc44b9da99d04d8d737b13 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix build.Christian Kandeler2014-07-212-3/+3
| | | | | Change-Id: I5bda4b7941506c39465b2462b24cc0fdf7c3f813 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix JS command canceling for the "dry run" case.Christian Kandeler2014-07-211-1/+2
| | | | | | | No JavaScript is ever run, so it cannot be canceled either. Change-Id: I322b2b1bb599273562f60028c07ac6bb09b4dd66 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* add a simple Version classJoerg Bornemann2014-07-218-63/+135
| | | | | | | | This class replaces the Version struct in setup-qt and the ImportVersion class of the loader. Change-Id: Ic65eaf62de44ce0c082fe805431463defce1fe3b Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* don't print usage on missing project fileJoerg Bornemann2014-07-211-4/+2
| | | | | | | | | | This error is obvious enough to not show the entire help. Also, this behavior is consistent with "qbs -f /dir" where /dir doesn't contain a project file. Change-Id: Icb0a4d8ce41d7480e02aca262faf14922aecab6e Task-number: QBS-655 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Add artifact to transformer outputs earlier.Christian Kandeler2014-07-211-1/+1
| | | | | | | | | Namely, at the same time we set the transformer on the artifact. Otherwise there will be a time window where the build graph is inconsistent (and there'd probably be a memory leak as well). Change-Id: Ief5d253e672ffcd76dfceab1572a5dcfdf4cdaa3 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix possible assertion in Executor.Christian Kandeler2014-07-211-2/+1
| | | | | | | | We can get an exception in build() when there are already jobs running, which was not the case originally. Adapt to this. Change-Id: I6c10983f9635950d1597c2b34f1b885112f3877d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* More error message fine-tuning.Christian Kandeler2014-07-212-1/+4
| | | | | | | | | | | - Make sure errors are not overwritten in the executor. - Do not report a process result for canceled processes. Such bogus errors currently spam the output, making it difficult to find the actual error that caused us to cancel the process in the first place. Change-Id: I76d724d084532fbce243bf180d955d6f34ac0a91 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Import some shellquote utility functions from qmake.Jake Petroules2014-07-184-0/+160
| | | | | | | | Will be used by future patches. Change-Id: I20bc0cdcbf8bde8d351e3fce30d3e15f1cb444e8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* API: Make the ability to update project files optional.Christian Kandeler2014-07-185-18/+42
| | | | | | | | | | | | This is the functionality that allows callers to add files to groups etc. Unfortunately, the QML/JS rewriter we use for this purpose pulls in the Qt GUI module, which results in unnecessary library dependencies if one only wants to use the command-line frontend. Therefore, allow this feature to be compiled out. Task-number: QBS-565 Change-Id: Ic134ff9cf37bd552ad493b388c05bcece983fd65 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* fix occasional crash when applying dynamic rulesJoerg Bornemann2014-07-181-2/+10
| | | | | | | | | | When creating the set of input artifacts we must not include compatible artifacts that have been created by this rule. This can e.g. happen for the ["cpp", "hpp"] to ["hpp", "cpp", "unmocable"] rule and led to occasional crashes in TestBlackbox::track_qobject_change. Change-Id: I8bf5e8285fa22c8ec89619fb7d3bec60b9797ef0 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* add assertion in RulesApplicatorJoerg Bornemann2014-07-183-6/+12
| | | | | | | | Bail out if we try to remove an input artifact of a rule while applying this rule. This indicates a serious flaw of the calling code. Change-Id: I19110ececa02e5a795474a99f5ba911e4d2c9faa Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix up-to-date check wrt missing file dependenciesJoerg Bornemann2014-07-181-0/+7
| | | | | | | | | Missing file dependencies (e.g. header files that are not part of the project) must trigger a rebuild their dependents. Change-Id: I502e696d886c86a503e8950ae60254075f7e9415 Task-number: QBS-631 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* invalidate artifacts if a dependency is removedJoerg Bornemann2014-07-181-1/+2
| | | | | | | | | | | Artifacts must be invalidated if a dependency is removed. Consider a foo.cpp that includes bar.h. If bar.h is removed from the project, then we must recompile foo.cpp to trigger the compile error that stems from the wrong include. Change-Id: Ifc2bc3085be553f87685a17c5ff05273daa6579c Task-number: QBS-631 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* extend debug output of the up-to-date checkJoerg Bornemann2014-07-171-4/+8
| | | | | | | | It's sometimes valuable to know which file a timestamp belongs to... Change-Id: I41e748840bb07ff9755f33769b1b97b19066871a Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Expose additional properties in the ProductData API.Jake Petroules2014-07-174-0/+52
| | | | | Change-Id: I825deb8f44aa8e0fa2a1e89cae7a1c0c3e314073 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* remove special ActiveQt case from moduleNameWithoutPrefixJoerg Bornemann2014-07-171-3/+3
| | | | | Change-Id: I03f52f26fe8b8b657177d7a3128231619788ebb2 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix deprecation warning in Qt.gui moduleJoerg Bornemann2014-07-171-1/+1
| | | | | Change-Id: Ie3f4296e6006f37b74644018f399c7694171fa74 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* rename QtModuleInfo::moduleName to moduleNameWithoutPrefixJoerg Bornemann2014-07-173-3/+3
| | | | | | | ...because that's what it returns. Change-Id: Ie0c8f27ea1d6b686fc1f825dbc8b42c56f1a7b68 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix library names for Qt4 ActiveQtJoerg Bornemann2014-07-171-1/+1
| | | | | Change-Id: I906b5642a9285d9db47fe7230743f02b2a264413 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* remove unused property qtModulePrefix from Qt modulesJoerg Bornemann2014-07-173-7/+0
| | | | | | | | This was used to calculate include and library names. That's done in setup-qt now. Change-Id: Ief2b17e9fdf65e829dc563dac49e70d8dcbaebee Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* remove property includeDirName from QtModule.qbsJoerg Bornemann2014-07-171-1/+0
| | | | | | | The usage of this property was removed in 04e5834e. Change-Id: Ib938d9761f432b5b3cfad27d6c4008061edb69c7 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>