summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-04-27use kebab-case for all cmd line argsAlberto Sartori
2022-04-27Allow for better error reporting in case of a malformed targetAlberto Sartori
The expected size of the list that defines the target was not checked consistently. So, in case a target expected a list with 4 elements, but got just 3, a segfault would happen. This patch resolves this issue.
2022-04-27dump action command on DebugLevelAlberto Sartori
2022-04-26rules: Add field_artifacts_list and field_runfiles_listOliver Reiche
... which are more efficient if the caller wants to perform the union manually (because disjointness should be enforced or additional maps should be added to the union, etc.). As a positive side effect, code reuse is slightly increased by consistently calling these newly introduced expressions for obtaining the artifacts/runfiles from all targets of a target field.
2022-04-26rules: More flexible compile-deps and link-depsOliver Reiche
... which can now be parameterized which target_fields to query the dependencies from.
2022-04-26Rebuild: report full command lineKlaus Aehlig
With the reformating of the analyse result we accepted longer output lines anyway. Allowing them in the report of a detected flaky action immediately gets the log and console output more useful, as the source can often be identified without looking at the full definition of the action in the action graph.
2022-04-26Improve documenatation of our internal rulesKlaus Aehlig
In particular, document the result for the most important rules.
2022-04-26doc strings: support documentation of the resultKlaus Aehlig
A complete documentation of a rule should not only include how to use it (i.e., which fields are present and what is their meaning) but also what the result is. This is particularly true, as the result is structured and can contain some complex logic or conventions in the provided information.
2022-04-26test {Files,Directories}Iterator for an empty dirAlberto Sartori
2022-04-26bug fix: FileRoot::DirectoryEntries cannot hold std::monostate anymoreAlberto Sartori
DirectoryEntries must be constructed explicitly either via a GitTree* or an unordered_map<string,ObjectType>. So, the case of an empty directory, is represented by an empty map. Before this patch, empty directories were represented by std::monostate and missing checks on that led to a seg-fault.
2022-04-25Progress reporting: include origins of running actionsKlaus Aehlig
For a user, an important information is to know which actions are currently running and, more importantly, the target that caused them. To do so, we need a bit of infrastructure. - We have to keep track of begin and end of running actions, as well as the order in which they were started. That has to happen efficiently and in a thread-safe way. - We have to compute and keep the origin map for actions, even if we don't serialize the action graph.
2022-04-25result description: always show full informationKlaus Aehlig
So far, `just describe` reported only the list of keys for runfiles and artifacts while reporting full information for the provided data, including the artifacts contained therein. Change this to always reporting the full information, as for runfiles and artifacts the detailed information is valuable as well.
2022-04-25json utils: support indentation up to a given depthKlaus Aehlig
2022-04-25expression: add "msg" argument to "to_subdir"Klaus Aehlig
... allowing to provide additional information in case of conflict during flat staging.
2022-04-25upgrade from optparse to argparseAlberto Sartori
2022-04-22simple bash completionAlberto Sartori
2022-04-22rules: move compiler/flags computation into expressionsKlaus Aehlig
On the one hand, this keeps the rules files more readable. On the other hand, we can even deduplicate code, as those expressions are used twice.
2022-04-22rule ["CC", "header directory"]: drop ill-advised "public stage"Klaus Aehlig
The idea, as documented, of a header directory is to have a directory, closed as a tree, owned by the respective library and internally handled in an efficient way (as a single tree). If we open up that directory, we just have staged data, and therefore should treat it as such.
2022-04-22rule ["data", "staged"]: behave more file likeKlaus Aehlig
... by presenting the data both, as artifacts and as runfiles in the same way as inputs do.
2022-04-22Fix remote-client names in loggingKlaus Aehlig
The fact that we happen to use the same protocol as bazel does, does not mean we are bazel. After all, the remote-build-execution protocol is meant as a generic protocol. Hence change the names in logs to avoid confusions.
2022-04-21just-mr: correctly set times and permissions in CASKlaus Aehlig
2022-04-21add compatibility with original remote build protocolAlberto Sartori
2022-04-21Document the expression language used in our build toolKlaus Aehlig
2022-04-20Remove unused "+" on expressionsKlaus Aehlig
To concatenate lists (the only ability the "+" operator had), use "++".
2022-04-19just-mr: Refer to ROOT via absolute pathOliver Reiche
... so accessing the CAS from a different cwd wont fail if the local_build_root was provided as relative path.
2022-04-19TARGETS.json: use TREE constructor to get whole directoryKlaus Aehlig
... instead of naming every single file. This will, on the one hand keep the targets file more readable and, on the other hand more easy to maintain.
2022-04-19Conflict checking: use normalized pathsKlaus Aehlig
2022-04-14just: Add support for building static binaryOliver Reiche
2022-04-14add u+w permission when installing a fileAlberto Sartori
... to allow for overwriting
2022-04-07bin/bootstrap: use top-level default targetKlaus Aehlig
As the default target is also staged canonically, there is no longer the need for the bootstrap script to know the path and staging output of the internal main target.
2022-04-07expression evaluation: clean up truth valuesKlaus Aehlig
For historic reasons, we considerd special strings as false values. Drop that behavior in favor of a clean LISP-like semantics: everything is true that is not empty.
2022-04-07main: warn if result contains failed artifactsKlaus Aehlig
2022-04-07just-mr: fix run_cmd interfaceKlaus Aehlig
... so that the calls using stdin/stdout redirect also work properly.
2022-04-07implement new built-in target TREEAlberto Sartori
2022-04-07refactor FileRoot::DirectoryEntriesAlberto Sartori
... to foster the implementation of the built-in target "TREE"
2022-04-07fix a typoAlberto Sartori
2022-04-07FileSystemManager::ReadDirectory does just one system callAlberto Sartori
2022-04-07Add basic documentation on build rulesKlaus Aehlig
2022-04-05Rule map: "import" is no a reserved key word of a ruleKlaus Aehlig
... so remove it from the list of expected keys.
2022-04-04Add a basic progress reporterKlaus Aehlig
Reporting, with exponentially backing off intervals, the number of cache hits found so far, the number of actions that have ben run, and the number of actions currently under consideration.
2022-04-04statistics: also count completed uncached actionsKlaus Aehlig
2022-04-04Graph traverser: support progress observingKlaus Aehlig
2022-04-04Add a new log level for progress updatesKlaus Aehlig
2022-04-04cli: hint on orientation of --log-limit argumentKlaus Aehlig
2022-04-04file logging: shorten continuation prefixKlaus Aehlig
While on the console, we want multi-line logs nicely aligned, when logging to a file, unique readability is enough. So we can fix the continuation prefix to a fixed string (with non-overlapping initial segment). This makes log files easier to scan and also avoids very long lines, given that the more complete message prefixes are very long.
2022-04-04Set top-level default targetKlaus Aehlig
... to install the resulting binary to "bin".
2022-04-04Hardlinking: when error is expected, log only at debug levelKlaus Aehlig
2022-03-31rules ["CC", "libray"]: fix doc stringsKlaus Aehlig
... to have consistent punctuation. Also make clear, that the configuration does not have to specify "CC", etc, as usually they are taken from the default target.
2022-03-30Eliminate duplicated code in ParseEntityName{FromJson,FromExpression}Alberto Sartori
This patch introduces a templated ParseEntityName which can accept a json or ExpressionPtr. Internally, performs a proper dispatch on these cases - isString - isList - size == 2 - size >= 3 A test is added for checking the proper handling of an empty list
2022-03-29refactor EntityNameAlberto Sartori
EntityName now clearly expresses its double identity: - NamedTarget - AnonymousTarget The usage of std::variant<NamedTarget,AnonymousTarget> guarantees that EntityName, internally, is not a mix of the two - like could happen before this patch. NamedTarget features an enum ReferenceType to express the type of the target, namely, "normal target" or an "explicit file reference". Thanks to this refactoring, the introduction of new targets type should be easier, since the design is more modular. NamedTarget