Age | Commit message (Collapse) | Author |
|
... by providing the fully-qualified name of an expression
that could not be found.
|
|
|
|
|
|
|
|
This code movement is required to break a cyclic dependency coming with the
introduction of the garbage collector. target_cache depends on
garbage_collector and garbage_collector would depend on target_cache to
determine the target-level-cache directory. After moving this calculation to a
more general location, the cycle is broken.
|
|
|
|
This usage of a different header file is required to break a cyclic dependency
coming with the introduction of the garbage collector. entity_name implicitly
depends on local_cas, which will get a new dependency to garbage_collector.
garbage_collector depends on target_cache_entry, which transitively depends on
entity_name. entity_name_data instead does not depend on local_cas and breaks
the cycle.
|
|
|
|
|
|
|
|
... 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.
|
|
Make export targets identify themselves in the result_map,
so that we have accurate knowledge of the export targets
seen.
|
|
Allow in the addition of a target to the result map to indicate
that it was an export target; in this way, the information is
available as a result of the analysis.
|
|
... so that for every construct supported in rules there is
an analogous one as a built-in rule to allow ad-hoc constructions
without having to write a rule (even though writing a rule is
recommended for everything occuring more than once):
- the "generic" rule allows an ad-hoc ACTION,
- the "file_gen" rule allows an ad-hoc BLOB,
- the "tree" rule allows an an ad-hoc TREE, and
- the "configure" rule allows an ad-hoc configuration transition.
|
|
The dependencies requested in order to read their "outs" or
"runfiles" also contribute to the effective configuration.
|
|
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.
|
|
While the built-in "configure" rule is forwarding the result of
the configured target, its own effective configuration is not that
of the configured target. The effective configuration is defined
to be that part of the incoming configuration that can potentially
influence the result of that target; in particular, this includes
variables read in defining the configuration transition.
|
|
... and thus allowing the "business logic" in the configuration
target (e.g., setting defaults and derived options) to be shared
by many targets.
|
|
Before this change, TargetResults that appear inside of
other TargetResults (typically via value nodes) were
serialised via the top-level serialisation function for
TargetResults. While technically correct, it is rather
inefficient as identical expressions from outer and inner
TargetResults are not properly deduplicated and a deeply
nested data structure is maintained.
With this change, expressions of inner TargetResults are
serialised in the context of outer TargetResults, resulting
in a flat list of all transitively contained expressions
with proper deduplication applied.
As this serialisation of TargetResult is used in
target-level cache entries, the new format is a breaking
change to existing entries. Therefore, after switching to
the new serialisation format introduced by this commit,
users are required to clean their target-level cache.
This also reverts commit d22adef666d704680ee74b35a46d530f6b6d5f15,
"Recursively scan provided results for known artifacts".
|
|
This recursive scan of the provided results map of a target-cache entry for
known artifacts is required since the serialization format of target results
currently does not produce a single flat artifact list, but keeps the result
entry structure with a nested list of artifacts. Once the serialization format
of target results is changed in a way that a flat list of artifacts is
produced, this recursive scan is not required anymore and can be reverted.
|
|
This enforces the explicit specification, which object type, either file or
tree, should be used to create an artifact digest. This also avoids subtile
errors at locations as in the previous commit, where files as well as trees are
supposed to be handled, but digest creation mistakenly defaults to file object
type.
|
|
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
|
|
|
|
|
|
|
|
|
|
... while technically not required, it makes it harder to
run into nasty errors.
|
|
... at INFO level, in the same way as all other dumping of analysis
results happen.
|
|
|
|
... by dropping curl-brace-initializers for nlohmann::json,
which calls the intializer-list constructor converting any
JSON type to array.
|
|
|
|
|
|
... to be able to report the respective graph for later analysis
by other tools.
|
|
... as this is relevant for performance of analysis. We log the total
numer of trees at performance level and the individual directories
at debug level, if requested.
|
|
Like file or tree references, globs are restricted to the current
module; in fact, by the way we evaluate them, even to the top-level
directory of that module: a glob is a target having as artifacts and
runfiles those entries of the top-level directory of the specified
module that match the given pattern.
|
|
When constructing module names, we normalize the directory path
implicit in it. However, we take the empty string as valid canonical
name for the top-level directory (as it is the empty relative path).
When accessing git roots, however, only the file-system canonical
path "." is special cased as self reference. Hence explicitly
convert the empty string.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
... to the same limit as the values occuring in the stack.
|
|
... in error messages. The outer structure is usually more important
than the the details of the first element.
|
|
|
|
Before this patch, the built-in "generic" type allowed for just output
files, listed in the field "outs". Now, the type also supports output
directories, listed in the "out_dirs" field. The output directories
are created before the command is executed.
|
|
|
|
|
|
So far, our serialisation and deserialisation assumed that no
node or result values are included contained in the given value.
However, for nodes (and hence ressults, given our implementation of
value nodes) there is a legitimate use case. An abstract interface
specification, given by provided nodes, can well be a meaningful
target to be exported. Implement serialisation for those values.
Also, avoid tree-unfolding the value when deserialising the value
by appropriately caching the corresponding expression pointers.
Moreover, avoid the quadratic overhead through linearly searching
through the list of artifacts.
|
|
|