summaryrefslogtreecommitdiff
path: root/src/buildtool/build_engine
AgeCommit message (Collapse)Author
2024-08-27Reformat code to comply with clang-format 18Klaus Aehlig
... while keeping our .clang-format file.
2024-08-23Rule "generic": verify that the output is a properly formed artifact stageKlaus Aehlig
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-14expression language: add nub_leftKlaus Aehlig
Originally, the expression lanuage only contained a function to deduplicate a list, keeping only the right-most occurence. The reason was that this is the order needed for linking: a library providing an open symbol has to come on the command line after the library using that symbol (and hence making it an open symbol). However, by now use cases have emerged that require a topological sorting where definition comes before use; also, when composing the value of PATH from fragments, we usually want to keep the first occurrence in order for it to take precedence. Therefore, also add "nub_left" as built-in function, allowing a more condense (and slightly more efficient) description in rules instead of the revserse-nub_right-reverse pattern.
2024-08-14absent_target_map: fix private hdrsKlaus Aehlig
... and, in particular, do not include headers of other libraries that are not even needed.
2024-08-07Replace classic C boolean operators with keywordsMaksim Denisov
! => not; && => and, || => or
2024-08-05Expression language: add expression from_subdirKlaus Aehlig
... allowing to select only the keys in a specific subdir, and move the them to top-level.
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-02generic rule: add support for cwdKlaus Aehlig
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-08-01expression: add kEmptyStringKlaus Aehlig
2024-07-26Add quasiquote expressionKlaus Aehlig
2024-07-26expression language: add quotingKlaus Aehlig
2024-07-22Rename HashFunction methods and enumsMaksim Denisov
2024-07-22Unify tagging logic in HashFunctionMaksim Denisov
2024-07-22Use HashFunction from Storage during analysisMaksim Denisov
2024-07-22Use a fixed HashFunction in ActionDescriptionMaksim Denisov
2024-07-22Use a fixed HashFunction in expressionsMaksim Denisov
2024-07-22Pass HashFunction to ArtifactDigest::CreateMaksim Denisov
2024-07-22Use HashFunction functionality via Instance()Maksim Denisov
...to track changes during refactoring easier.
2024-07-12Use static Create functions to construct ArtifactDescriptionMaksim Denisov
...instead of unobvious ctors relying on overload resolution.
2024-07-05Pass Storage to RepositoryConfigMaksim Denisov
...and adjust AnalyseContext.
2024-07-04Mark more constructors 'explicit'Paul Cristian Sarbu
Since c++17 the 'explicit' keyword has use also for constructors with more than one argument and it is recommended to use it by default whereever implicit conversions are not expected bahaviour.
2024-06-27Capture ServeApi by pointer in AnalyseContextMaksim Denisov
2024-06-27Capture TargetCache by pointer in AnalyseContextMaksim Denisov
2024-06-25describe: also describe "configure" targets in more detailKlaus Aehlig
Most built-in rules are just described by their name, assuming they are known to the user anyway. One exception, however, are "export" targets, as those serve as interfaces to (logical) repositories and hence is supposed to have a documentation of the target itself. Over time, however, "configure" targets have evolved to become internal interfaces (maybe even for an external target), e.g., to provide default values and hence make better use of the actual export target. Therefore it is desirable to provide a bit more information when asked to describe a "configure" target. - As "configure" targets have a fixed set of keys, adding a "doc" field is a conservative extension; this can be useful to give an overview what the target is about. - An important information of a "configure" target is the target that is configured. While this, in general, is an expression, in the typical cases, the description is very short (a literal target name, or a variable). So we can afford to show the definition.
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-11Move creation of TargetCacheKey description to TargetCacheMaksim Denisov
...to use corresponding Storage for storing auxiliary information.
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-15serve target: Improve logic for local build failure triggersPaul Cristian Sarbu
If the serve endpoint reports an internal error, local builds should not continue and the error message should be provided. Similarly, if the serve endpoint promises the target cache value to be in remote CAS, but the client cannot find or process it as needed, then a local build again should not continue and the reason be provided as an error message.
2024-05-14configured_target: limit size of short representationKlaus Aehlig
... to 320 chars for the configuration to keep error messages managable in case of heavy configurations (e.g., generated internally by a complex configure target).
2024-05-14target_map: show short description of configured targetsKlaus Aehlig
... to keep error messages more readable.
2024-05-13source_map: Improve log messagePaul Cristian Sarbu
Possibly empty directory path should be escaped.
2024-04-25absent_target_map: fix target_file when requesting flexible variableKlaus Aehlig
... of an absent target. Here, the request is given by repository root and filename; so the filename is to be taken relative to the root, i.e., we have to prefix the targets-file name with the module.
2024-04-24expressions: add logical negationKlaus Aehlig
While this can already be expressed by an "if" statement, having a dedicated function for logical negation makes some expressions more readable.
2024-04-24expressions: for "if" expressions, make both branches optionalKlaus Aehlig
... using, also for the "then" branch, the empty list as default. In this way, this statement not only more symmetric, but also allows shorter representations of some typical expressions.
2024-04-24expressions: add "length" functionKlaus Aehlig
Lists are somtimes used in configurations as replacement for tuples. Providing length gives an easy way to detect usage errors.
2024-04-24expressions: add generic assertionsKlaus Aehlig
2024-04-19Also for absent tragets, track progress by configured targetKlaus Aehlig
Commit f5f9be5bc07b16807aceac86fba9212e3889762a changed from tracking progress by cache key to tracking by configured target; however, the absent-target map was forgotten. Fix this while also switching to the shortend export-target representation introduced in the previous commit.
2024-04-19Export progress: report short configurationKlaus Aehlig
As we always analyse export targets in their canonical configuration (and do count in the progress the mapping from obtained configuraiton to canonical one), the shortend name (i.e., the representation with null values dropped form the configuration) is still a unique representation of the target. Use this in progress reporting to simplify reading the progress sample.
2024-04-16expression language: add array access by indexKlaus Aehlig
2024-04-16Absent targets: support registering the serve failure logsKlaus Aehlig
... in a structured way to eventually support machine-readable access to the identifiers of the log files.
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.