summaryrefslogtreecommitdiff
path: root/src/buildtool/build_engine/base_maps
AgeCommit message (Collapse)Author
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-04-07analysed_target: include tree overlaysKlaus Aehlig
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.
2024-11-29expression_function: fix depsKlaus Aehlig
There is no such thing as private dependencies of a header-only library
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-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-07Enable readability-* checks.Maksim Denisov
2024-10-07Enable readability-redundant-member-init check.Maksim Denisov
2024-10-07Enable bugprone-empty-catch check.Maksim Denisov
2024-09-23Reorder dependencies and remove duplicates in OSSMaksim Denisov
2024-09-18Add missing #endif comments in headersMaksim Denisov
2024-09-13Avoid unnecessary creation of temporary objectKlaus Aehlig
2024-09-13Pass HashFunction::Type to SourceTargetMapMaksim Denisov
...that is to be used by FileRoot::ToArtifactDescription.
2024-09-12Do not move variables still usedKlaus Aehlig
... depending on the evaluation order implicit in the compiler.
2024-08-27Reformat code to comply with clang-format 18Klaus Aehlig
... while keeping our .clang-format file.
2024-08-07Replace classic C boolean operators with keywordsMaksim Denisov
! => not; && => and, || => or
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-13source_map: Improve log messagePaul Cristian Sarbu
Possibly empty directory path should be escaped.
2024-04-08Use properly included standard library types by defaultPaul Cristian Sarbu
2024-04-05Evaluator: Add infrastructure to annotate relevant objectsKlaus Aehlig
... which are, in particular, artifacts involved in staging conflicts. While there, also make disjoint union honor the expression log limit.
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-02-16async maps: Create utility library to handle cycle detectionPaul Cristian Sarbu
2024-02-14expression map: properly wrap logger for import callsKlaus Aehlig
... to provide an informative error message on how a rule is related to a particular import and, in particularly, at which expression a problem with the import occurred. While there, also improve the message in the other error case to follow our standard line-breaking scheme.
2024-02-08rule_map: improve error reportingKlaus Aehlig
By showing the full entity name and also adding the usual newline character after every "While ..." clause.
2024-02-08NamedTarget: support ToString()Klaus Aehlig
2024-02-08JsonFileMap: refuse to read absent rootKlaus Aehlig
... instead of erroring on missing file. In this way, whenever a rule or expression from an absent root would have to be read, we get a meaningful error message and not a complaint about a file not being there.
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-20directory_map: refuse to read contents of absent rootsKlaus Aehlig
While in our setting, a missing directory is generally OK, it is not OK to ask for the content of an absent root. In particular, we should not assume it to be empty, just because the root is absent.
2023-11-30Resolve inconsistencies in third-party headers include formatPaul Cristian Sarbu
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-26Add non-upwards symlinks in the rule language...Paul Cristian Sarbu
via a 'SYMLINK' constructor function. This works similarly to the 'FILE' construct, but the name given must point to a non-upwards symlink and a symlink artifact is being generated from it. Also updates the relevant tests.
2023-06-26FileRoot: Add handling of non-upwards symlink...Paul Cristian Sarbu
...and update tests accordingly.
2023-06-06style: Use designated initializersPaul Cristian Sarbu
This feature has been introduced with C++20.
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-26just-mr: Fix warning about unused lambda captureOliver Reiche
2023-03-30Improve error messages on reading invalid target filesKlaus Aehlig
... by including the details of the parse error.
2023-02-28expression map: improve error messageKlaus Aehlig
... by providing the fully-qualified name of an expression that could not be found.
2023-01-12source map: quote file names in error messageKlaus Aehlig
... to ensure unique readability even with file names containing spaces or other special symbols; those kind of fancy file names typically occur when a string intended as named target is implicitly taken as a file (e.g., due to a spelling error). While there, also include directory and repository in the error message.
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-12Add copyright and license notice to all source and header filesKlaus Aehlig
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
2022-10-05AnalysedTarget: Make shared pointer's content immutableOliver Reiche
... while technically not required, it makes it harder to run into nasty errors.
2022-09-13Fix build with gcc/g++Oliver Reiche
2022-09-13Fix wrongful conversions of object to arraysOliver Reiche
... by dropping curl-brace-initializers for nlohmann::json, which calls the intializer-list constructor converting any JSON type to array.