summaryrefslogtreecommitdiff
path: root/src/buildtool/build_engine/expression
AgeCommit message (Collapse)Author
2024-02-29expressions: add kFalseKlaus Aehlig
2023-11-30Resolve inconsistencies in third-party headers include formatPaul Cristian Sarbu
2023-08-24LinkedMap: Simplify ::Find() methodsOliver Reiche
... to silence false-positive 'possible dangling reference' warning produced by gcc 13.2.0.
2023-08-14expression: add new built in "reverse"Klaus Aehlig
While a foldl is enough to implement a reverse functionality, adding it as a built in allows doing so in linear time.
2023-08-14expression: add new built in "set"Klaus Aehlig
... to obtain from a list of strings a map with those entries as keys and true as value. In this way, repeated membership tests in lists can be implemented more efficiently.
2023-08-14expressions: add constant for trueKlaus Aehlig
2023-06-06style: Use designated initializersPaul Cristian Sarbu
This feature has been introduced with C++20.
2023-05-31ACTION constructor: accept "timeout scaling"Klaus Aehlig
Allow rules to set the timeout-scaling factor for their actions to indicate that some actions are expected to take longer than others, e.g., because they call a foreign build tool or are a very complex end-to-end test.
2023-04-26imports: Switch to Microsoft GSL implementationOliver Reiche
... with two minor code base changes compared to previous use of gsl-lite: - dag.hpp: ActionNode::Ptr and ArtifactNode::Ptr are not wrapped in gsl::not_null<> anymore, due to lack of support for wrapping std::unique_ptr<>. More specifically, the move constructor is missing, rendering it impossible to use std::vector<>::emplace_back(). - utils/cpp/gsl.hpp: New header file added to implement the macros ExpectsAudit() and EnsureAudit(), asserts running only in debug builds, which were available in gsl-lite but are missing in MS GSL.
2023-04-26evaluator: Improve evaluation error reportingOliver Reiche
2023-04-04disjoint_map_union: show conflicting values on errorKlaus Aehlig
2023-03-10Update nlohmann::json to 3.11.2Klaus Aehlig
2023-02-22cleanup: Fix typos in code line comments and logging messagesPaul Cristian Sarbu
2022-11-21Use the newly-added concept of private-depsKlaus Aehlig
While there, also add all direct dependencies explicitly; using directly dependencies that are pulled in only indireclty causes problems from a maintainability point of view.
2022-10-18TargetResult: Serialise inner TargetResults flatOliver Reiche
Before this change, TargetResults that appear inside of other TargetResults (typically via value nodes) were serialised via the top-level serialisation function for TargetResults. While technically correct, it is rather inefficient as identical expressions from outer and inner TargetResults are not properly deduplicated and a deeply nested data structure is maintained. With this change, expressions of inner TargetResults are serialised in the context of outer TargetResults, resulting in a flat list of all transitively contained expressions with proper deduplication applied. As this serialisation of TargetResult is used in target-level cache entries, the new format is a breaking change to existing entries. Therefore, after switching to the new serialisation format introduced by this commit, users are required to clean their target-level cache. This also reverts commit d22adef666d704680ee74b35a46d530f6b6d5f15, "Recursively scan provided results for known artifacts".
2022-10-12Add copyright and license notice to all source and header filesKlaus Aehlig
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
2022-10-05Expr: Add 'env' expressionOliver Reiche
2022-09-13Fix build with gcc/g++Oliver Reiche
2022-07-04Drop copy constructor from linked mapsOliver Reiche
2022-07-04Drop copy constructor for expressionsOliver Reiche
2022-07-04Improve move semantics with smart pointersOliver Reiche
2022-06-29Error reporting: also abbreviate the expression in the stack traceKlaus Aehlig
... to the same limit as the values occuring in the stack.
2022-06-29Use a more meaningful abbreviation of expression valuesKlaus Aehlig
... in error messages. The outer structure is usually more important than the the details of the first element.
2022-06-28Support more verbose error reportingKlaus Aehlig
2022-06-20Correctly serialize and deserialize results and nodesKlaus Aehlig
So far, our serialisation and deserialisation assumed that no node or result values are included contained in the given value. However, for nodes (and hence ressults, given our implementation of value nodes) there is a legitimate use case. An abstract interface specification, given by provided nodes, can well be a meaningful target to be exported. Implement serialisation for those values. Also, avoid tree-unfolding the value when deserialising the value by appropriately caching the corresponding expression pointers. Moreover, avoid the quadratic overhead through linearly searching through the list of artifacts.
2022-06-20Disallow comparison of namesKlaus Aehlig
In our semantics, it was always intended that names are completely opaque and only used by passing them to functions providing information about a target. However, we never enforced that they not be compared for equality, even though we always had this in mind, and the computation of the target-level cache key was designed with this semantics in mind. Enforce this restriction now.
2022-06-20expression: cache the cacheability propertyKlaus Aehlig
2022-06-20Crypto: Refactor hash computationOliver Reiche
... by renaming HashGenerator to (incremental) Hasher and dropping support for Git/MD5 hashes. The Hasher does not expose the actual hash implementation.
2022-06-20Crypto: Add and use set of globally used hash functionsOliver Reiche
2022-06-13TargetResult: Add support for JSON (de)serializationOliver Reiche
2022-06-13multithreading: Add AtomicValue to atomically set/get valueOliver Reiche
... and use it to replace the commonly used pattern in Expression, LinkedMap, and GitTreeEntry. Furthermore, remove assignment operators for Expression and LinkedMap as those are considered to be used in an immutable manner anyway.
2022-06-02Split off the expression_ptr interfaceKlaus Aehlig
So that we can, also for header-only libraries, always declare the direct dependencies without creating a cyclic dependency between entity_name_data and expressions.
2022-05-31"enumerate" expression: add padding to 10 charactersKlaus Aehlig
2022-05-30Built-in expressions: add enumerateKlaus Aehlig
Add a function transforming a list into a map. In this way, artifacts collected positionally in a list can easily be realized as a stage used for input to an action or output of a target.
2022-05-09Built-in "to_subdir": interpret input keys as pathKlaus Aehlig
... and detect conflicts araising this way. Also normalize the paths after staging them to the specified subdir.
2022-04-25expression: add "msg" argument to "to_subdir"Klaus Aehlig
... allowing to provide additional information in case of conflict during flat staging.
2022-04-20Remove unused "+" on expressionsKlaus Aehlig
To concatenate lists (the only ability the "+" operator had), use "++".
2022-04-07expression evaluation: clean up truth valuesKlaus Aehlig
For historic reasons, we considerd special strings as false values. Drop that behavior in favor of a clean LISP-like semantics: everything is true that is not empty.
2022-03-25don't check bounds twiceAlberto Sartori
2022-03-23Apply changes suggested by clang-tidy 11Oliver Reiche
2022-03-23Apply changes suggested by clang-format 11Oliver Reiche
2022-03-16Format: Apply compact JSON formattingOliver Reiche
2022-03-02expression language: add a range functionKlaus Aehlig
Given a number or number representation, return a list of that length consisting of representations of the lower numbers. In this way, repeated non-pure actions can be generated (e.g., repetitions of a test to detect flakyness).
2022-02-22Initial self-hosting commitKlaus Aehlig
This is the initial version of our tool that is able to build itself. In can be bootstrapped by ./bin/bootstrap.py Co-authored-by: Oliver Reiche <oliver.reiche@huawei.com> Co-authored-by: Victor Moreno <victor.moreno1@huawei.com>