Age | Commit message (Collapse) | Author |
|
...with respect to rejecting invalid entries such as upwards
symlinks. Also ensure that valid trees are only checked once by
remebering known valid tress though marker files in local storage.
|
|
...whenever it is given access to a Git repository.
The referenced storage config needs to outlive the repository
config instance.
|
|
While our traverser correctly keeps separate identifier spaces for
those entities, having disjoint identifiers allows easier reading
of log messages and more simple reporting of origins of actions.
|
|
|
|
|
|
|
|
...to remove code duplication.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
... as there might be cases where it is expected that setting the
git CAS fails, e.g., if referring to the implict git repository in
the local build root as a fallback CAS.
|
|
|
|
|
|
... instead of relying on those dependencies being pulled in
indirectly.
|
|
The digest tree check should take into account the protocol.
Also add a TODO to point out the currently needed code duplication.
|
|
|
|
|
|
|
|
...and move it to the common stage.
|
|
...from Compatibility.
|
|
...and adjust ArtifactDigestFactory accordingly.
|
|
|
|
|
|
...to prevent additional conversions to ArtifactDigest from plain strings.
|
|
...that provides ways to create valid ArtifactDigests.
|
|
|
|
...bypassing ArtifactDigest functionality.
|
|
|
|
...to track changes during refactoring easier.
|
|
...and move the related tests to artifact_description.test
|
|
|
|
...and adjust AnalyseContext.
|
|
|
|
|
|
This will make it available also to just.
|
|
... to simplify reuse.
|
|
Some of the more specific issues addressed:
- missing log_level target/include
- header-only libs wrongly marking deps as private
- missing/misplaced gsl includes
|
|
|
|
This is required in order to make them available to 'just serve'
in a minimal just installation.
|
|
... also, gracefully handle the case of a missing working
directory when determining the current module, falling back
to the top-level module.
|
|
... 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.
|
|
- deduplicate dependencies
- remove unused dependency
|
|
|
|
The improved GC implementation uses refactored storage
classes instead of directly accessing "unknown" file paths.
The required storage class refactoring is quite substantial
and outlined in the following paragraphs.
The module `buildtool/file_system` was extended by:
- `ObjectCAS`: a plain CAS implementation for
reading/writing blobs and computing digests for a given
`ObjectType`. Depending on that type, files written to the
file system may have different properties (e.g., the x-bit
set) or the digest may be computed differently (e.g., tree
digests in non-compatible mode).
A new module `buildtool/storage` was introduced containing:
- `LocalCAS`: provides a common interface for the "logical
CAS", which internally combines three `ObjectCAS`s, one
for each `ObjectType` (file, executable, tree).
- `LocalAC`: implements the action cache, which needs the
`LocalCAS` for storing cache values.
- `TargetCache`: implements the high-level target cache,
which also needs the `LocalCAS` for storing cache values.
- `LocalStorage`: combines the storage classes `LocalCAS`,
`LocalAC`, and `TargetCache`. Those are initialized with
settings from `StorageConfig`, such as the build root base
path or number of generations for the garbage collector.
`LocalStorage` is templated with a Boolean parameter
`kDoGlobalUplink`, which indicates that, on every
read/write access, the garbage collector should be used
for uplinking across all generations (global).
- `GarbageCollector`: responsible for garbage collection and
the global uplinking across all generations. To do so, it
employs instances of `LocalStorage` with `kDoGlobalUplink`
set to false, in order to avoid endless recursion. The
actual (local) uplinking within two single generations is
performed by the corresponding storage class (e.g.,
`TargetCache` implements uplinking of target cache entries
between two target cache generations etc.). Thereby, the
actual knowledge how data should be uplinked is
implemented by the instance that is responsible for
creating the data in the first place.
|