summaryrefslogtreecommitdiff
path: root/src/buildtool/build_engine/target_map/utils.cpp
AgeCommit message (Collapse)Author
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.
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-08-07Replace classic C boolean operators with keywordsMaksim Denisov
! => not; && => and, || => or
2024-08-02Actions with non-trivial cwd: add empty input tree, if requiredKlaus Aehlig
While our local action execution implicitly creates the specified cwd with the first output file or directory, this behaviour is not mandated by the remote-execution protocol. There, an action definition has to ensure that cwd is a directory implied by the input files. Achieve this, by adding an empty input directory at cwd if this can be done without creating tree conflicts.
2024-08-01class Action: include field cwdKlaus Aehlig
... for the working directory inside the action directory.
2024-07-22Rename HashFunction methods and enumsMaksim Denisov
2024-07-22Unify tagging logic in HashFunctionMaksim Denisov
2024-07-22Use a fixed HashFunction in ActionDescriptionMaksim Denisov
2024-07-22Use HashFunction functionality via Instance()Maksim Denisov
...to track changes during refactoring easier.
2024-05-17RepositoryConfig: Instance should not be changed once populatedPaul Cristian Sarbu
Once a RepositoryConfig instance gets populated, it must never be changed again. Therefore, all functions accepting these instances should only take them as pointers to const.
2024-03-26Add missing system includesPaul Cristian Sarbu
Main culprits: - std::size_t, std::nullptr_t, and NULL require <cstddef> - std::move and std::forward require <utility> - unordered maps and sets require respective includes - std::for_each and std::all_of require <algorithm>
2023-11-27Refactoring RepositoryConfigPaul Cristian Sarbu
With the introduction of 'just serve', export targets can now be built also independently from one another based on their corresponding minimal repository configuration, as stored in the target cache key. In this context, this commit changes the RepositoryConfig usage from one global (static) instance to pointers passed as necessary throughout the code.
2023-06-15action data structure: support (additional) execution propertiesKlaus Aehlig
2023-06-06style: Use designated initializersPaul Cristian Sarbu
This feature has been introduced with C++20.
2023-05-31utils: Relocate the std::filesystem::hash_value libc fix...Paul Cristian Sarbu
...and make the use of std::hash consistent. This will make it easier to remove the fix once the libc implementation we use catches up with the C++ standard.
2023-05-31action data structure: support timeout-scaling factorKlaus Aehlig
2022-10-12Add copyright and license notice to all source and header filesKlaus Aehlig
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
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-09Disallow upwards-facing inputs in actions and tree constructorsKlaus Aehlig
2022-05-12Ensure we also correctly handle tree conflicts between filesKlaus Aehlig
Not only trees, but also regular files can disallow paths reaching into them. If we have a file at a/b then another file at a/b/c is a staging conflict as well. Make our tool recognize this.
2022-05-09Verify conflict-freeness in inputs, artifacts, and runfilesKlaus Aehlig
Our maps serve two purposes: on the one hand, they can be a generic key-value association with arbitrary strings as keys. On the other hand, we use them to describe arrangements of files (inputs to actions, artifacts or runfiles generated). In this function, certain keys refer to the same path and hence have to be identifed. Therefore, at places where the keys clearly have to be paths in the file system, implicitly normalize them and check for conflicts.
2022-05-09Move path normalisation to a separate libraryKlaus Aehlig
... as it will be required outside the target map.
2022-05-04install: normalize dir pathsOliver Reiche
2022-04-19Conflict checking: use normalized pathsKlaus Aehlig
2022-03-01Pass actions and trees in analysis result as shared pointerKlaus Aehlig
... to avoid unnecessary copying and moving of larger objects.
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>