aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/buildgraph/artifact.cpp
Commit message (Collapse)AuthorAgeFilesLines
* corelib: Apply modernize-use-autoAlessandro Portale2018-08-201-1/+1
| | | | | | | Use more auto. Change-Id: I27e1e2345c6bede459a375663be72ec3370a5e39 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Make sure the set of root artifacts is always up to dateChristian Kandeler2018-07-311-2/+8
| | | | | | | ... by updating it whenever artifact file tags change. Change-Id: I62496ba73f7633888de6be16aca59777a53629ed Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* RulesApplicator: Fix assertionChristian Kandeler2018-07-181-0/+10
| | | | | | | | | | | There can be input artifacts that are produced by a rule that is not connected to the current rule. This happens if at least one of the outputs of the rule that produces the input matches the excluded inputs of the current rule, in which case there is no connection between the rules. Change-Id: If51344e95e971ae89745ce7c20c2623774af42ae Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Make Artifact::setFileTags() a little smarterChristian Kandeler2018-07-161-4/+8
| | | | | | | | There's no general need for wholesale removal from the artifacts map, followed by (re-)adding. Instead, do just what is necessary. Change-Id: I5d4aa3c456d91bde94a8c77fb85f4e28ad5742d0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remember which module properties were set explicitly on an artifactChristian Kandeler2018-07-051-0/+2
| | | | | | | | | ... and consider these when updating the properties of generated artifacts during the change tracking process. This amends 768fc9c72e. Change-Id: Ifd3f6342fec8313b8cdd2e611734fc52a3810ae8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Do not reset the product build data due to source file metadata changesChristian Kandeler2018-07-051-0/+2
| | | | | | | | | | | | | | | | It is not necessary to throw away and recreate all the product's artifacts and rule nodes if a source file's tags or properties change. Instead, just copy the new data into the corresponding Artifact object. As a necessary side effect, we also handle changes to the product- level module properties and to "fileTagsFilter groups" in a more fine- grained manner by resetting the properties and file tags of the product's Artifact objects that represent generated artifacts. This is part of a long-term effort to eliminate the build graph's "shadow structure" aka RescuableArtifactData. The next step will deal with added and removed source files. Change-Id: I054fa18d7920ea5c429c92bfca1c12e34192211e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Store the "out of date" flag per transformer rather than per artifactChristian Kandeler2018-06-291-2/+0
| | | | | | | That's a better fit. Change-Id: I3eff4ce461342b2966196da4e9aeff35544a38c4 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Mark parent artifacts explicitly as out of dateChristian Kandeler2018-05-181-0/+2
| | | | | | | | | | ... after a transformer finishes. This makes our "out of date" check independent of the local clock resolution for generated artifacts that do not have source artifacts as children. Change-Id: If3d47f1fd859c30846806fabaddf3b47a840a6d3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Get rid of redundancies between load() and store() methodsChristian Kandeler2018-02-161-1/+1
| | | | | | | | | | It's silly that we have to mention each serializable data member in both the load and the store methods. Instead, whenever possible, forward these methods to a template that calls the right function in the persistence backend based on its parameter. Change-Id: I00e2dee8cdf55405f447cee27190bc97df8673e3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Make ProductBuildData a proper class with accessors and modifiersChristian Kandeler2018-01-231-4/+4
| | | | | | | | We will need to keep track of some mutating accesses in a follow-up change. Change-Id: I8b3c92f6cca0f5dceb35ef7559cc1357cdf38656 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove as many dynamic_casts as possibleChristian Kandeler2017-11-301-3/+2
| | | | | | | | According to our benchmarker, this speeds up rule execution by three per cent. Change-Id: Iaf146ba6073b897d19e0fe470d7b0dc4a04d264c Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Enable modules to declare target artifactsChristian Kandeler2017-11-071-0/+2
| | | | | | | | | | | | | Such artifacts appear to rules just like target artifacts of products. This functionality will be useful for auto-generating qbs modules from products. [ChangeLog] Modules can now declare target artifacts using the new filesAreTargets property of the Group item. Task-number: QBS-882 Change-Id: I3bba000be9a1057d9fef01e5576363719ff1f244 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Replace QSharedPointer/QWeakPointer with std::shared_ptr/std::weak_ptrJake Petroules2017-05-231-4/+4
| | | | | Change-Id: I2915c578968bed425a8d8b617b56df88ed3f2882 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Clean up [q]fileinfo.h includesJoerg Bornemann2017-03-061-1/+0
| | | | | Change-Id: I9bc57750cf67d20f7c4fc7291c38de406078e339 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove all usages of Q_FOREACH from the libraryChristian Kandeler2017-02-211-1/+2
| | | | | | | | This will make it easier to experiment with exchanging Qt containers for STL ones, for instance. Change-Id: Ie591fa54b5241ad4841b1ebcfb78b72932cd2b38 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* PersistentPool: Prevent access to raw data streamChristian Kandeler2016-12-161-30/+8
| | | | | | | | | | | | | | Instead, we employ our now-generic load/store interface for all serialization operations. The advantages are two-fold: 1) It can no longer happen that carelessly written store() functions mistakenly dump unshared strings into the build graph, as it has happened several times in the past. 2) We get rid of enormous amounts of custom code dealing with container (de)serialization. All of this is now done centrally by a handful of templates in PersistentPool. Change-Id: Ib1262da50989edda9726abd7d5a8ffdceaa0ec76 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fully templatize the PersistentPool classChristian Kandeler2016-12-151-6/+6
| | | | | | | | | | | The old implementation was a wild mix of templates, overloads and, worst of all, implicit assumptions about the types of container items. This combination made it close to impossible to add support for serializing generic containers. Now we have a sensible interface that we can build upon. Change-Id: I82806eaf535c16fc861bededf1b06c681d2128c0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Use string sharing when serializing file tagsChristian Kandeler2016-11-101-2/+2
| | | | | | | | On my machine, the on-disk build graph of a freshly resolved Qt Creator super project goes down by 12% with this patch. Change-Id: Ic86b4ba31769d7d4af407b24a0ee9845cf943a79 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Update license headersIikka Eklund2016-08-291-14/+23
| | | | | | | | | | Patch-set 2 includes *.cpp *.c Every source file needs to have up-to-date license headers in order to pass ci. Change-Id: Ie6e493097af6f7dd6a8adff170eb856f496e689e Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Merge remote-tracking branch 'origin/1.5'Joerg Bornemann2016-06-081-1/+1
|\ | | | | | | | | | | | | | | Conflicts: doc/reference/items/transformer.qdoc share/qbs/modules/cpp/GenericGCC.qbs Change-Id: I45560834560019b18274c373c45651eb8aadd206
| * Replace 'the Qt build suite' with 'Qbs' in copyright notices.Jake Petroules2016-06-061-1/+1
| | | | | | | | | | | | Change-Id: I885d94bb14b325dc36767a840ebdb0be1fb59dd2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Avoid copies of node containersJoerg Bornemann2016-05-191-5/+5
|/ | | | | | | | | We've used ArtifactSet::fromNodeSet to iterate over all artifacts in a node container. This creates a container copy. Use a filtering iterator instead. Change-Id: I368d3e4b1a259634c8cd5dbd53f372577b3ed14b Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Include the product name in the build graph node string.Christian Kandeler2016-03-101-1/+2
| | | | | | | Rule node information in particular is largely useless otherwise. Change-Id: Ia2f0f92c697c674a11dfe5a0e4953b3f7ff05d07 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Add missing initialization of RuleNode::buildState.Christian Kandeler2015-04-011-1/+0
| | | | | | Task-number: QBS-727 Change-Id: I04287df999aea1047debc5971cf3404041c20ec5 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* update license headersJoerg Bornemann2015-03-021-2/+2
| | | | | Change-Id: I36d825db3a5ef32c162c3063aab1e8a1f2696f4f Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Merge branch '1.3' into 'master'Christian Kandeler2015-01-281-6/+6
|\ | | | | | | | | | | | | | | | | Conflicts: doc/reference/jsextensions/jsextensions-general.qdoc src/lib/corelib/language/evaluatorscriptclass.cpp src/lib/corelib/language/evaluatorscriptclass.h Change-Id: Ic9b77b56e8fc8bf93e0a553930757de8c93fed22
| * Update LicenseEike Ziller2015-01-261-6/+6
| | | | | | | | | | Change-Id: I092fca9f950de1ba38826c33b155f86feae2770b Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* | Add command for showing a tree of build graph nodes.Christian Kandeler2014-12-171-0/+1
|/ | | | | | | | This is helpful for getting an overview of the parent-child relationships. Change-Id: I097921fc77e36ca3f34e548aa6132ef8e1cd9295 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* License update.Eike Ziller2014-10-161-7/+8
| | | | | | | Add LGPLv3 option. Change-Id: I8a63ad5e46a2701032b2103f791df4dec5b707e8 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* add getter/setters for Artifact::fileTagsJoerg Bornemann2014-07-311-2/+30
| | | | | | | | | 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>
* support transformers with an unknown number of outputsJoerg Bornemann2014-02-131-7/+42
| | | | | | | | | | | | | | | | To support different types of nodes in the build graph, we introduce the base class BuildGraphNode. Artifact now derives from BuildGraphNode. A RuleNode class is introduced that represents a rule in the build graph. Rules are applied in the build phase and not in a pre-build phase anymore. The handling of moc has been revisited. The fixed automoc pre-build phase is no more. This is the squashed merge of a feature branch. Task-number: QBS-370 Change-Id: If27cdc51cba8c9542e4282c2caa456faa723aeff Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* rename ArtifactList to ArtifactSetJoerg Bornemann2014-01-161-1/+1
| | | | | | | Now the name reflects reality. Change-Id: I3997b99de86819c973434240103d25d6915d838b Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Move Qt profile setup into a dedicated library.Christian Kandeler2014-01-101-0/+115
Otherwise all changes to the implementation will have to be duplicated in IDEs. Change-Id: I61e6d4fa1ee9b724eb5d9de9f233dc915a6c8bc3 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>