summaryrefslogtreecommitdiff
path: root/src/buildtool/build_engine
AgeCommit message (Collapse)Author
2025-06-16Avoid unnecessary work in accessing container entriesPaul Cristian Sarbu
- in sequence containers, use operator[] instead of .at() when accessing indices guaranteed to be in bound; - in associative containers, prefer .find() and reusing the returned const iterator to using .contains() and .at(); while there, make any so obtained iterators const if they are read-only.
2025-06-16Ensure equality operators are really noexcept.Klaus T. Aehlig
... by explicitly catching any possible exception. Mainly to make clang-tidy happy. ...
2025-06-04directory_map: Correctly report fatal on failures to read from workspace rootsPaul Cristian Sarbu
2025-05-08Fix some typosPaul Cristian Sarbu
2025-05-05generic rule: fix conflict checkKlaus Aehlig
For a generic rule, it is an error if map union of various inputs (overlayed in correct order) does not form a proper stage. To implement this check properly, we first have to construct the map of all inputs and only then perform the staging check and not do the check with only the runfiles, as 5e104a526cf76fe75312d2fd288a3c88f506fb0a accidentally did. Fix this.
2025-04-17ServeFailureReporter: use const& to avoid copiesAlberto Sartori
2025-04-08Result map: include tree-overlay actions to the origin mapKlaus Aehlig
Now that we generate tree-overlay action identifiers that are disjoint from identifiers of regular actions, having a joint origin map does not cause any confusion. Concerning the numbering of subtasks, we always see tree-overlay actions following the regular actions, even if defined in a different order. In this way, the identifiers for the regular actions don't change. Including tree-overlay actions in the origin map also has the advantage that the origin is properly reported in case of failure (e.g., non-disjointness of the obtained trees).
2025-04-08Keep identifiers for actions, trees, and tree_overlays disjointKlaus Aehlig
While our traverser correctly keeps separate identifier spaces for those entities, having disjoint identifiers allows easier reading of log messages and more simple reporting of origins of actions.
2025-04-07Add built-in rules {disjoint_,}tree_overlayKlaus Aehlig
2025-04-07Defined rules: add TREE_OVERLAY and DISJOINT_TREE_OVERLAY functionKlaus Aehlig
2025-04-07analysed_target: include tree overlaysKlaus Aehlig
2025-04-07interfaces: extend signatures to be aware of tree overlaysKlaus Aehlig
In order to stay backwards compatible, the "tree_overlays" entry in action-graph descriptions is optional.
2025-04-03Result-Map: do not log analysis result in ToFile operationKlaus Aehlig
... to avoid duplicate log entries.
2025-03-26built-in rule "tree": fix supported fieldsKlaus Aehlig
The built-in rule "tree" does not support the field "data". Hence remove it from the list of white-listed fields so that an appropriate warning is issued if it occurs for that rule.
2025-03-24Add 'zip_map' expressionPaul Cristian Sarbu
Produces the mapping between correspondingly indexed entries of two lists, one containing the keys and the other of values. The keys list must have string entries. If the two input lists are of different sizes, the extra elements are ignored.
2025-03-24Add 'zip_with' expressionPaul Cristian Sarbu
Produces the list containing the results of evaluating the body on the corresponding elementwise pairs from the two input lists. If the input lists are of different sizes, the extra elements are ignored.
2025-03-10Make graph-dumping options cummulativeKlaus Aehlig
If --dump-graph or --dump-plain-graph is given several times, the action graph wil also be written several times. In this way, regular use of those options will not be affected by adding them implicitly through invocation-logging options in the rc file.
2025-02-28Make statistics a separate libraryMaksim Denisov
2025-02-28Include ArtifactDigestFactory into "common" libraryMaksim Denisov
2025-01-28Progress reporting: also report the primary action outputKlaus Aehlig
While reporting an origin target with action number within that target describes an action uniquely in a way meaningful to the user, it might not always be eay to unserstand which precise action is currently running. For example, for a library with many source files, we have a target generating a large number of actions and the association of source file to action number requires detailled knowledge of the build description. The name of the primary ouput of that action, on the other hand immediately identifies the file that is compiled. Therefore, report this as well.
2025-01-24Add native comparison of configured targetsKlaus Aehlig
... and use it when normalizing the origins of actions. For this task, any well-defined linear order is sufficient. Using a native comparision (rather than comparing the canonical serialisation) significantly speeds up that normalisation process, as the assumption that it would be rare that an action has more than one origin turned out to be false. In fact, we have seeen cases where this sorting used to take several seconds before this change, so that this change reduced analysis time by more than a factor of 5.
2025-01-24"generic" rule: verify staging conflicts on inputsKlaus Aehlig
The "generic" rules deliberately resolves conflicts on identical paths in a latest-wins fashion (seeing all artifacts as later than all runfiles) to allow an easy way to define actions. However, the inputs stage obtained by this resolution can still contain conflicts and those are an error. Properly detect those. Also clarify in the documentation, that only conflicts on identical paths are resolved in the described priority, not semantic overlap.
2024-12-09Avoid writing to the CAS during bootstrappingMaksim Denisov
2024-11-29expression_function: fix depsKlaus Aehlig
There is no such thing as private dependencies of a header-only library
2024-11-25Fix unchecked access to FileRootMaksim Denisov
2024-11-14build_engine: Implement IWYU suggestionsPaul Cristian Sarbu
Requires the use of a pragma to avoid wrong removal suggestion for path_hash.hpp. Co-authored-by: Maksim Denisov <denisov.maksim@huawei.com>
2024-10-29Clean up unused dependenciesKlaus Aehlig
2024-10-25Add dependencies explicitly that are included directlyKlaus Aehlig
... instead of relying on those dependencies being pulled in indirectly.
2024-10-23expressions: enforce strict arguments for "join" and "join_cmd"v1.4.0-alpha+20241023Klaus Aehlig
... as described in the documentation. It was never intended to have a single string being an argument for those.
2024-10-21configured_target: honor --expression-log-limit when shortening representationKlaus Aehlig
2024-10-10Remove from OSS intersecting public-private dependenciesMaksim Denisov
2024-10-08Name local variables using lower_caseMaksim Denisov
...and private members using lower_case_
2024-10-08Name value template parameters using kCamelCase.Maksim Denisov
2024-10-08Name constexpr variables using kCamelCase.Maksim Denisov
2024-10-08Name type template parameters using CamelCase.Maksim Denisov
2024-10-07Disable misc-no-recursion checkMaksim Denisov
...since we use recursion for trees a lot, but skip this check manually.
2024-10-07Enable readability-* checks.Maksim Denisov
2024-10-07Enable readability-redundant-member-init check.Maksim Denisov
2024-10-07Enable modernize-* checks.Maksim Denisov
2024-10-07Enable bugprone-empty-catch check.Maksim Denisov
2024-10-07Enable bugprone-exception-escape checkMaksim Denisov
2024-10-07Enable bugprone-narrowing-conversions checkMaksim Denisov
2024-09-26Fix enum sizes proposed by clang-tidy.Maksim Denisov
Enable performance-enum-size check.
2024-09-26Fix redundant std::optional conversionsMaksim Denisov
...proposed by clang-tidy. Enable bugprone-optional-value-conversion check.
2024-09-23Reorder dependencies and remove duplicates in OSSMaksim Denisov
2024-09-18Add missing #endif comments in headersMaksim Denisov
2024-09-13.clang-tidy: enforce more checksKlaus Aehlig
... to avoid regressing there. To be able to enable these checks also disable a false positive.
2024-09-13Avoid unnecessary copiesKlaus Aehlig
2024-09-13Avoid unnecessary creation of temporary objectKlaus Aehlig
2024-09-13Pass HashFunction::Type to FileRoot::AsKnownTreeMaksim Denisov
...to get the protocol type.