summaryrefslogtreecommitdiff
path: root/src/lib/buildgraph/projectbuilddata.cpp
Commit message (Collapse)AuthorAgeFilesLines
* introduce class BuildGraphNodedynablasterJoerg Bornemann2013-11-271-16/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support different types of nodes in the build graph, we introduce the base class BuildGraphNode. Artifact now derives from BuildGraphNode. A - yet unused - RuleNode class is introduced that represents a rule in the build graph. Change-Id: Ie1ad5e7a9e65bfd5f99d3e824737516053de0f94 ***new artifacts hash in ProductBuildData Change-Id: I50521ec64f734bfb3662759076fa5e7912ac084e ***automoc fixup Change-Id: Ie2bb228ae38d63deccc600d67d283bc3beda9fec slightly nicer rule debug output Change-Id: I60ddef73cd7f0a67055f2d56e6dbe7fa45ddd450 create RuleNode objects and add them to roots Change-Id: I51a0f89b98cda524d34888ab758d7bd397d82f00 ***execute rule nodes on build Change-Id: I291c32868cd982e37393d6bc8d696f2b63fbff50 ***ArtifactSet::fromNodeSet Change-Id: I7586bcfbe43406c22b1ee1a1fd826beaa247164f ***update after rebase Change-Id: I5f73afc80b746b11eeb83aeadf29c2358accbab8 ***phonytarget Change-Id: I587b7e072e54b866e8d5ea37c874e6a8baa550e0 update after rebase Change-Id: I6017c0cbe9244fea04d513f53e3a2a85092bf962 skip nodes early We must skip Building and Built nodes. m_leaves can contain duplicates now. Change-Id: If275106a47c403a455103f4deeb20049548007f5 debug message Change-Id: I90e238eef72a8a02fb0a9f2c77715f5f15c1442d disable phony thingy Change-Id: I7bb60b850b96b65ab738c11e96c3a84cbe58d2f7 connect each output of a rule to the rule itself Change-Id: I159d76c4b63094058cc9a07ccc2d0b67c7ce06e6 TagScanner Change-Id: I4741e48cd674c0ca830ee1b4d05b59a8c542694f TagScanner deps Change-Id: If3e43a7ac25616cd151229684a085ac8ee787645 update after rebase Change-Id: I58d49a5ed1049a17733fc2154588f12c1cda53e6 only root tag scanners in product Change-Id: Ia94732a5632156a5ec3c5518c9596cd4cefac105 run TagScanners Change-Id: I869a183f2da23a43957a6df45dc5a1b30b10af92 TagScannerRunner Change-Id: Id3c5fac73e6fb84e56d6ab1d48a959f3677f7a67 crash fix Change-Id: Ie3c26dbed41ab4615915a08913c495868c3a8910 more TagScanRunner Change-Id: I80b79f101c0f4d802fb4f6515c0848e369fed066 handle removal of filetags Change-Id: Icdd8d05c2e26953f7b12d968aa5dfcc23928b9ba Qt4 build fix Change-Id: Ie5fcb64e36ddc5004003183bea7243536bc8ab15 do not waste space with type information Change-Id: I7b9354e6fceead228ba335723b9addeb701bef56 update nodes that must get new transformers Change-Id: I06cd7ffe606ae643393350c5959ef6475343929f update after rebase Change-Id: If080e664972f2950c12fd800a3e4b521e65dca3a only run tag scanners on changed sources And do not call RulesApplicator in bgloader. Change-Id: I5140c91c79a842dab933ad7b328100bdec13cb10 Conflicts: src/lib/buildgraph/buildgraphloader.cpp sketch of moc tagscanners impl Change-Id: I7736c2da1b1742bc3556ef660c163e6c32cbd4c9 Conflicts: share/qbs/modules/Qt/core/core.qbs MocTagScanner Change-Id: I87199e8f355b8b20cf2387f4d4190a20bddae0db fix lib.qbs Change-Id: Ibcb5bc290d3839b04828f8c9b155577634bcc9e4 moctagscanner split Change-Id: Iace5d48483c02b5d33d9ccd54ac07162bfc09d27
* API: Allow to remove files from a product.Christian Kandeler2013-11-251-0/+30
| | | | | | | Task-number: QBS-20 Change-Id: Ia8b8c4745e8e68ec219e16876fb630d02453425b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Prevent sibling artifacts from getting different transformers.Christian Kandeler2013-10-151-1/+4
| | | | | | | | | | | It is a strict requirement that all output artifacts in a rule point to the same Transformer object. This invariant can currently break under very specific circumstances related to build graph change tracking, which is likely the cause of QBS-379. Task-number: QBS-379 Change-Id: I85dc28e69794df5f50c5155171b393ab14ca6dbc Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* in the scanner, only remove connections the scanner createdJoerg Bornemann2013-10-111-0/+2
| | | | | | | Task-number: QBS-394 Change-Id: I4659746be6004042949038450e2015fbb5f70b77 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Do not ever set up build data for disabled products.Christian Kandeler2013-10-021-2/+4
| | | | | | | | This currently happens when we add a new disabled product and a build graph already exists. Change-Id: I71825cf9057493a178d484c988eb06258ab89dbf Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Do some build graph sanity checks.Christian Kandeler2013-09-301-2/+1
| | | | | | | Check some invariants after resolving, restoring and change tracking. Change-Id: I84e92d6f16a96d4a54c928e8cebc06efbf8fde2c Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* fix calling of prepare script functionJoerg Bornemann2013-09-241-4/+8
| | | | | | | | | The scope that contains inputs, outputs and friends was bound to the function object, which is wrong when applying the function later on. Instead, we're passing those variables as function arguments now. Change-Id: I7ad7b6a742091fae889ed57b7c9cbceea4a2ead2 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix imports/extensions for script propertiesJoerg Bornemann2013-09-191-2/+0
| | | | | | | | | Import directives in files of imported items were ignored for prepare scripts. We must use the file context (that contains the imports) of the file where the script property is set. Change-Id: Icca3fc84dd1e130446775122b7b58e6e9ddced98 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Transformer.explicitlyDependsOn addedJoerg Bornemann2013-09-181-0/+16
| | | | | Change-Id: If4f695878087f0cd72d85e497d918c4f70e42001 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* ResolvedTransformer::Ptr -> ResolvedTransformerPtrJoerg Bornemann2013-09-181-1/+1
| | | | | | | | Also introduce ResolvedTransformerConstPtr for consistency and use it where appropriate. Change-Id: I4922c71a681e970e57502269d8ee259dcacde39f Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Remove redundant method parameter.Christian Kandeler2013-09-091-8/+3
| | | | | | | Presumably the author thought the function was static. Change-Id: I5637493c6694edb15349d6189b098990471585be Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix artifact leaks in build graph loader and automoc.Christian Kandeler2013-09-091-3/+5
| | | | | Change-Id: I989d88c58586ab9b6fe9f7870432f7266a00b9cc Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Better handling of property changes when restoring a build graph.Christian Kandeler2013-08-141-76/+12
| | | | | | | | | | | | If a property change is discovered in any given product, the current code throws away the whole build graph, generates a new one and then re- inserts selected data from the old one. With this patch, we only regenerate the build data of the affected product (and still re-insert some existing data into it as to not rebuild artifacts that are up to date). Change-Id: I49e475c66dfb84ad20253ab53daf25acfe5a738b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove Artifact::topLevelProjectJoerg Bornemann2013-08-021-2/+2
| | | | | | | | Every artifact has a product now. That product points to its top level project. Artifact::topLevelProject can go. Change-Id: I7a7ec921043b64eec6c704128ae465fd9ef05031 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* move file dependencies to dedicated classJoerg Bornemann2013-08-011-29/+30
| | | | | | | | | File dependencies are a very simple variant of artifact. We save space and structure the code more clearly by introducing the FileDependency class. Change-Id: I36b95794f9d6d3d739ea4836ebc831848a89de98 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Properly support disabled projects.Christian Kandeler2013-07-121-1/+2
| | | | | | | Until now, this only worked for SubProject items. Change-Id: Id63424883d0c120567860f225f112635c7ea0c82 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Make sure no remains of removed products stay in the build graph.Christian Kandeler2013-07-111-12/+44
| | | | | | | | Namely, artifacts in transformer inputs of (former) parents. Task-number: QBS-358 Change-Id: I19e6cf6cd50e4d99c49e2e570daf163da25a3a79 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Make built-in JavaScript extensions available on demand.Christian Kandeler2013-07-031-0/+1
| | | | | | | | | | | | This entails the following: - Project files can get access to built-in extensions in all contexts via import statements such as "import qbs.TextFile". - In turn, the automatic injection of these extensions in rules and probes no longer happens, i.e. one always has to explicitly import the required extension. Change-Id: Ib1e42c078354c564e417f80dd47897c7f41e7569 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Improve handling of changes to restored build graph.Christian Kandeler2013-06-241-3/+3
| | | | | | | | | Instead of painstakingly inserting new product pointers into an existing build graph, do it the other way around and put existing build data into the newly resolved project. This is much more robust. Change-Id: If38e4a5e14c6a5faedb0c590e86aa5efc7844e39 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Some minor improvements to the Error class.Christian Kandeler2013-06-181-3/+3
| | | | | | | | | | | | | - Rename "Error" to "ErrorInfo", to make clear that this class conveys information about errors, including that there might not actually be one. - Rename "ErrorData" to "ErrorItem", to make clear that these are parts of an aggregate structure. - Introduce ErrorInfo::hasError() for quick checking of whether an error occurred. Change-Id: Icea6ed5240d6d14bd30e9cea189c6babd7004792 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Allow projects to be nested.Christian Kandeler2013-06-171-8/+9
| | | | | | | | | This is nice to have for grouping products and a requirement for aggregating existing projects into a bigger one. Change-Id: I3394642e95ea57dbc6bf1603cfed6902a5906e4c Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* clear artifact timestamps after updating transformerJoerg Bornemann2013-06-071-0/+2
| | | | | | | Otherwise those artifacts won't be rebuilt. Change-Id: I005e2a8d489d45119a51e97d2cc5152bfef4bd41 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Use private implementation in API classes.Christian Kandeler2013-05-231-2/+2
| | | | | | | | | While we do not promise a stable ABI at the moment, this is conceptually correct and has to be done sooner or later, with increasing effort the longer we delay it. Change-Id: Icc98443974e54d377167480ace601db4981ed43c Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Help compiler with branch prediction.Christian Kandeler2013-04-121-3/+3
| | | | | | | | | Mark error checks in potentially performance-sensitive contexts with Q_UNLIKELY. Actual benefits unknown, but it cannot hurt. Change-Id: If3d2375965e6342b5d7a0b46ad2c8a41fd3567d0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Remove structural redundancy in project and product classes.Christian Kandeler2013-04-121-0/+380
We had two project classes, each holding a list of products that was structurally identical, except that no BuildProduct object existed for a disabled ResolvedProduct. The same kind of duplication also happened for product dependencies. This patch gets rid of these parallel structures. BuildProject and BuildProduct are largely being demoted to data holders and are aggregated by ResolvedProject and ResolvedProduct, respectively. The resulting project structure should be easier to understand and maintain. Change-Id: I68beef60b9e0d62258f6a8337c9015864e18bd80 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>