Age | Commit message (Collapse) | Author |
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
commit update
Uses the SSL certification utility method to correctly set the
certification check options for the remote URL libgit2 calls.
Due to the fact that remote operations are done via a temporary
repository to allow concurrent work, the correct repository
configuration needs to be interrogated. Thankfully, libgit2
provides a thread safe config snapshot object to be used in
such scenarios.
Also updates the existing GitRepoRemote tests accordingly.
|
|
|
|
...in order to not include unwanted dependencies in just proper.
The new class extends the GitRepo class used for just's Git tree
operations and gets used in all of just-mr's async maps.
|
|
|
|
While compilers are allowed to drop unused functions in anonymous
name spaces, and in this way also the open linker symbols referenced
there, they are not obliged to do so. Not optimizing away such
unused functions when compiled with -DBOOTSTRAP_BUILD_TOOL causes
the linking fail in the initial phase of the boostrap process where
libgit2 is not yet available (nor really needed). Therefore, ensure
that those dead functions are absent in the initial bootstrap phase
using appropriate preprocessor directives.
Signed-off-by: Klaus T. Aehlig <aehlig@linta.de>
|
|
... and ensure that cascades of checks are performed with
only a single filesystem stat per method.
|
|
|
|
As now all remote Git operations in GitRepo require at most just
the branch name, there is no more need to inquire the repository
about branch refspecs.
|
|
The libgit2 library does not satisfy the http.sslVerify gitconfig
field or the GIT_SSL_NO_VERIFY environment variable, so we have to
perform these checks ourselves and supply the correct return value
from the certificate_check git_fetch_options callback.
The callbacks used for fixing the remote fetch SSL certificate
verification are reused here.
|
|
The libgit2 library does not satisfy the http.sslVerify gitconfig
field or the GIT_SSL_NO_VERIFY environment variable, so we have to
perform these checks ourselves and supply the correct return value
from the certificate_check git_fetch_options callback.
|
|
...and use instead the branch name. A valid direct refspec (as those
retrieved by a remote_ls call) will always end in the branch name,
so checking the last path component ('/'-delimited substring) of a
retrieved refspec is enough.
|
|
|
|
from remote
|
|
This also removes the need to call the GET_BRANCH_REFNAME critical
operation.
|
|
|
|
|
|
|
|
Passing the logger by reference would require the caller to be
kept alive. Also, being a shared_ptr, the logger can be passed
by value at almost no cost.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Removed unused file_system_manager dependency
|
|
|
|
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.
|
|
|
|
|
|
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
|
|
... if the object does not even exist. In that case, a trace
message is produced and the caller is responsible for
reporting errors.
|
|
|
|
|
|
|
|
description
|
|
|
|
|
|
|
|
|
|
|
|
... and use it to replace the commonly used pattern in
Expression, LinkedMap, and GitTreeEntry. Furthermore, remove
assignment operators for Expression and LinkedMap as those
are considered to be used in an immutable manner anyway.
|
|
For some file roots, in particular git trees, we can give a complete
selfcontained description of the content without accessing any
external resources. For those, add a method to return such a complete
description that will be used to compute the keys of content-defined
repositories.
|
|
In this way, we have it available when needed, e.g., to get identifers
for file roots or to get whole trees as source artifacts.
|