aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/buildgraph/rescuableartifactdata.h
Commit message (Collapse)AuthorAgeFilesLines
* Replace 'typedef' with 'using' where it is possibleDenis Shienkov2019-02-231-1/+1
| | | | | | | | One exception is that the 'typedef' for function pointers were skipped due to an additional work is required. Change-Id: I2112fded3abeaee1d1f49f56adfd2914d5db0324 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Store the "out of date" flag per transformer rather than per artifactChristian Kandeler2018-06-291-1/+1
| | | | | | | That's a better fit. Change-Id: I3eff4ce461342b2966196da4e9aeff35544a38c4 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Make RescuableArtifactData::children a std::vectorJoerg Bornemann2018-06-141-2/+1
| | | | | | | The value_type ChildData is not suitable for QList. Change-Id: I33057a739c26e36a7c6dabc44dad72262a05cdb0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Mark parent artifacts explicitly as out of dateChristian Kandeler2018-05-181-1/+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>
* Provide rules with information about the content of Export itemsChristian Kandeler2018-03-141-0/+5
| | | | | | | | | | | | | | | The product variable gets a new property "exports" that provides a "dependencies" array as well as property values the same way that the product variable itself does, but for exported dependencies and properties, respectively. In addition, meta data about these properties is provided via a "properties" array, and structural information can be retrieved via "childItems". This data is intended to be used by modules creating interface files from products. Task-number: QBS-268 Change-Id: I2bb106e1ca1b18abbd6fe60411bc81bda9ee35e7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove most load() and store() methodsChristian Kandeler2018-02-161-8/+2
| | | | | | | | | | | | For all serializable types whose load() and store() methods simply forward these calls to their members, the methods are removed. Instead, the serialization is now done by the persistence facility itself, which detects such classes by the presence of a member template with a fixed name (using SFINAE). If the template is present, it is called, otherwise we fall back to calling load() and store() methods. Change-Id: I42dbbdd622e0ea0db28325acc506e41c472e0f0c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Get rid of redundancies between load() and store() methodsChristian Kandeler2018-02-161-15/+22
| | | | | | | | | | 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>
* Track accesses to product.artifactsChristian Kandeler2018-02-161-0/+3
| | | | | | | | ... and take the data into account when deciding whether to re-run rules and commands. Change-Id: Ib0f733028617eaa91cbf902c5537f30375900646 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Move transformer change tracking out of the build graph loaderChristian Kandeler2018-02-161-0/+2
| | | | | | | | | | | | | | | | | | | | The checks that determine whether to re-run prepare scripts and/or commands due to property or environment changes do not belong into the build graph loader. Instead, we now do them on demand during the build process. Advantages: - The code is at its "natural" place, making it easier to understand and less fragile. - There are a lot fewer unnecessary build data invalidations, speeding up both re-resolving and rebuilding in case only some rules/commands have changed. - Re-running commands due to property or environment changes no longer implies re-running prepare scripts. - We now catch property changes on generated artifacts, which was not possible before, because the build graph loader only had access to the source artifacts of the re-resolved project. Change-Id: I36b022cf631fa9e8293feec4d6f416c2686539c1 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Introduce dedicated type for command listsChristian Kandeler2018-02-151-1/+2
| | | | | | | Mainly to streamline the serialization calls. Change-Id: Ia54d51a193b2db52dab66d36e526f8516c15f20a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Implement change tracking for the product.dependencies arrayChristian Kandeler2018-01-291-0/+3
| | | | | | | | We added change tracking for the elements of the array in 898d09d479, but the array itself was not covered. Change-Id: I7d4083e8bf77f52e1f4a3b5da85ba13cf52fe750 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Better change tracking for imported JS filesChristian Kandeler2017-11-101-0/+2
| | | | | | | | | | | | | | | We did both too much and too little: Firstly, we invalidated all rules that appeared in a file that imported a changed JS file, independent of whether that import was relevant to the rule. Secondly, we did not catch changes to recursively imported files at all. Now we track accesses to functions in imports and invalidate a rule or command only if a file to which such an access refers has been modified. More fine-grained checks (e.g. per function) would be possible, but incur more overhead, as we'd have to store the respective source code in the build graph. Change-Id: I95f62d233bf87d2c39abbe37056a8fe434f20b5a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Include file dependencies in artifact rescue dataChristian Kandeler2017-11-021-0/+3
| | | | | | | | | | These were just getting lost. Alternatively, we could always do a re- scan of rescued artifacts, but that would be unnecessary most of the time, and scanning is an expensive operation. Task-number: QBS-697 Change-Id: I49f1a7b5b5c1a1691cb9f97e553b2b1b98fab3bd Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Merge 1.9 into masterChristian Kandeler2017-08-141-5/+5
|\ | | | | | | Change-Id: I6da76b0a53bf87105c4e7b48724d9760cb68e831
| * Fix build data rescuing when multiplexingChristian Kandeler2017-08-141-5/+5
| | | | | | | | | | | | | | | | The code assumed that we could only multiplex over profiles, which is no longer true. Change-Id: Ia0a522b701d3ed983d484d0683e1417ab2adeb94 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Fix edge case in change trackingChristian Kandeler2017-08-141-0/+2
|/ | | | | | | | | | | | | | | | | If we have a moc'able header file whose moc output is included by the cpp file, then it is an error not to list that header in the project file, because moc will not run on it and the included moc_cpp file won't be present, causing a compiler error. However, if the header was originally listed in the project file and removed from it after building, then the next attempt to build would still succeed, because the generated artifact would only be removed from disk at the end of the build process. Fix this by amending the code that checks for removed child artifacts to remove them from disk immediately, making sure a rebuild will not accidentally succeed. Change-Id: I4f69560cc899dbc61938acc1c697aa93407dc03c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Move the buildgraph, language and tools tests into the proper locationsJake Petroules2017-06-221-1/+1
| | | | | | | Also export necessary symbols that they need. Change-Id: I3023893a3da82cf0d86b0d08df38943db867cf3a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Change style of #includes of Qt headersJake Petroules2017-01-041-2/+2
| | | | | | | | | | | | | | | | By using q<lowercase>.h headers, we become more bootstrap-friendly, as no full syncqt is required any more. In the same go, prefix all includes with the module name. This helps grep-based analysis of which parts of Qt are used and where. It's also consistent with Qt's public headers (where syncqt enforces the style). Testdata and examples are excluded from the change, as they are not relevant for bootstrapping. Change-Id: I9539b1d795e87fca6e5fc6c91acbb775b79208d9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* PersistentPool: Prevent access to raw data streamChristian Kandeler2016-12-161-0/+17
| | | | | | | | | | | | | | 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>
* Replace QVariantMap with PropertyMapPtr in RescuableArtifactDataChristian Kandeler2016-12-141-1/+2
| | | | | | | So the map can potentially be shared when storing the build graph. Change-Id: I7f9cf4867e337606c169346ae7242125f0d21a0d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix change tracking for module properties requested from artifactsChristian Kandeler2016-11-301-0/+1
| | | | | | | | | | ... in commands. For some strange reason, this particular case was missing. Task-number: QBS-1049 Change-Id: I2ceb000ef5b362754f9fcbccd44b3e3c3e396e46 Reviewed-by: Denis Klychkov <kd.snake@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Update license headersIikka Eklund2016-08-291-14/+23
| | | | | | | | | | Patch-set 1 includes *.h Every source file needs to have up-to-date license headers in order to pass ci. Change-Id: Ib6cf3ac47dfba6dff262fded44bc952aef3bda8b Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* API: Take rescuable artifact data into account for project dataChristian Kandeler2016-08-221-0/+5
| | | | | | | | | Otherwise, information about generated artifacts will temporarily disappear when product build data has been invalidated after project re- resolving, which is annoying for IDE users. Change-Id: Idea2d03fba5a823256e95ce554a2f2f413e3d977 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>
* | Fix edge case in change tracking.Christian Kandeler2016-05-061-0/+7
|/ | | | | | | | | | | If we do some change that causes a transformer to be re-created, the information about e.g. project properties accessed in commands got lost and subsequent changes to these properties would then not get detected anymore. This means we have to store that type of information in our rescuable artifact data too. Change-Id: I8d23aa4471019670c060d8a51fee5dc835ed07c9 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>
* Update LicenseEike Ziller2015-01-261-6/+6
| | | | | Change-Id: I092fca9f950de1ba38826c33b155f86feae2770b Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* License update.Eike Ziller2014-10-161-7/+8
| | | | | | | Add LGPLv3 option. Change-Id: I8a63ad5e46a2701032b2103f791df4dec5b707e8 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Make it possible to set profiles per product.Christian Kandeler2014-07-021-3/+4
| | | | | | | | | | | Use case 1: Build product A for architecture X and product B for architecture Y (e.g. host tools vs target libraries). Use case 2: Build product A for architectures X and Y and product B only for architecture X (e.g. Android multi-arch packages). Change-Id: I2eb721c37cdd12c298ee12bad60e21e94b04676b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix some sub-optimal use of the persistence facility.Christian Kandeler2014-02-211-2/+2
| | | | | | | | | | | - Commands were potentially saved twice, and so were their strings. - Strings in RescuableArtifactData objects were potentially saved twice. - Remove an unneeded include of persistence.h from a header file. - Make all PersistentObject::{load,store} methods private to make it clear that they may only be called via PersistentPool. Change-Id: I17c94201dc8bc57b89132d00f3db2ec0ae2e7922 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* support transformers with an unknown number of outputsJoerg Bornemann2014-02-131-0/+72
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>