summaryrefslogtreecommitdiff
path: root/src/buildtool/build_engine/target_map/target_map.cpp
AgeCommit message (Collapse)Author
2025-04-07Defined rules: add TREE_OVERLAY and DISJOINT_TREE_OVERLAY functionKlaus Aehlig
2025-04-07analysed_target: include tree overlaysKlaus Aehlig
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-21configured_target: honor --expression-log-limit when shortening representationKlaus Aehlig
2024-10-08Name local variables using lower_caseMaksim Denisov
...and private members using lower_case_
2024-10-07Disable misc-no-recursion checkMaksim Denisov
...since we use recursion for trees a lot, but skip this check manually.
2024-10-07Enable bugprone-narrowing-conversions checkMaksim 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.
2024-09-09Replace ArtifactDigest::CreateMaksim Denisov
...with ArtifactDigestFactory::HashDataAs
2024-08-23When creating actions, normalize paths in the action definitionKlaus Aehlig
... and also perform conflict check on the normalized paths. Still, the the output of the "ACTION" funtion be keyed by the representation of the paths as originally described, to allow the author of a rule to use non-normalized paths as well.
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-02rules: make ACTION expression support "cwd"Klaus Aehlig
2024-08-01class Action: include field cwdKlaus Aehlig
... for the working directory inside the action directory.
2024-07-22Use HashFunction from Storage during analysisMaksim Denisov
2024-07-22Pass HashFunction to ArtifactDigest::CreateMaksim Denisov
2024-07-12Use static Create functions to construct ArtifactDescriptionMaksim Denisov
...instead of unobvious ctors relying on overload resolution.
2024-06-27Capture ServeApi by pointer in AnalyseContextMaksim Denisov
2024-06-18Make ServeApi a general class, not a singletonMaksim Denisov
...and adjust interfaces.
2024-06-18Pass ServeApi as a field of context to the analysisMaksim Denisov
...instead of using singleton calls.
2024-06-18Use an extensible structure to pass arguments to the analysis.Maksim Denisov
2024-06-18Use RemoteServeConfig functionality via Instance()Maksim Denisov
...to track changes during refactoring easier.
2024-06-18Use ServeApi functionality via Instance()Maksim Denisov
...to track changes during refactoring easier.
2024-06-04rule language: support SYMLINK functionKlaus Aehlig
... to allow generating symlinks as part of a rule, as it is already described in our documentation.
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-05-14target_map: show short description of configured targetsKlaus Aehlig
... to keep error messages more readable.
2024-04-16target map: follow proper line-breaking conventionKlaus Aehlig
... in logger extension.
2024-04-12Target analysis: report short names of targets when describing a conflictKlaus Aehlig
Configured targets, by design, cannot distinguish between a value not occuring in the configuration and occuring there with value null. Therefore, to understand the conflict, we can as well drop all the null values of the target configuration when reporting it.
2024-04-08Use properly included standard library types by defaultPaul Cristian Sarbu
2024-04-08Consistently guard all POSIX C includesPaul Cristian Sarbu
2024-04-05User-defined rules: annotate revelant objects relevant to evaluation errors.Klaus Aehlig
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>
2024-03-15Clean up more includes and targetsPaul Cristian Sarbu
Some of the more specific issues addressed: - missing log_level target/include - header-only libs wrongly marking deps as private - missing/misplaced gsl includes
2024-03-12target evalution: handle error in dependency evaluationKlaus Aehlig
... instead of blindly assuming the evaluation succeeds. Co-authord-by: Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com>
2024-03-12just serve: Improve progress reportingPaul Cristian Sarbu
During analysis it is useful to track and report the progress for all export targets. This is not exclusively linked to a serve endpoint being present, despite most of the time being expected to be spent in export targets being served from the remote endpoint. This commit refactors the current implementation to give proper feedback to the user on the progress of the analysis phase.
2024-03-11target_map: Typo fix in log messagePaul Cristian Sarbu
2024-03-11just: Replace singletons for progress tracking and statistics...Paul Cristian Sarbu
...with regular instances that have controlled life-times. This avoids race conditions in tracking and reporting the results of analysis and build, as the serve endpoint can orchestrate multiple builds at the same time asynchronously. As a bonus side-effect this also ensures the correctness of the progress reporting per orchestrated build.
2024-03-11just analyse: Use explicit target cache instancePaul Cristian Sarbu
The serve endpoint always has to access the correctly sharded target cache, including during analysis. For this purpose, the target cache instance interrogated during analysis has to be explicitly provided.
2024-02-16async maps: Create utility library to handle cycle detectionPaul Cristian Sarbu
2024-02-08Target map: on error in rule look up, report the rule being looked forKlaus Aehlig
2024-01-31just serve: Cleanup logging to remove tool namePaul Cristian Sarbu
Also cleans up the logging when parsing the serve service configuration file.
2024-01-16Analysed target: keep track of implied export targetsKlaus Aehlig
... that are eligible for caching. In this way, we can accurately keep track of the dependencies between target-level cache entries. Note that it is enough to track the export targets eligible for caching, as no target depending on an ineligible export target can be eligible.
2023-12-14target_map: Remove unneeded method to perform endpoint consistency checkPaul Cristian Sarbu
As we already have a good enough API call and in order to improve specificity in log messages, there is no need for one more level of abstraction. This will also make it easier to drop in the future this check (if deemed unnecessary anymore), while keeping in place the mandatory check that a serve endpoint has been configured.
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-11-15define AbsentTargetMap for handling export targets in absent repositoriesAlberto Sartori
2023-09-01fmt: Fix includes to only bring in the core APIPaul Cristian Sarbu
There is no need to use the full format API, so avoid increasing the compile time gratuitously.