Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
At various places in the build tool, we try to read files from various
CASes and caches. The absence of a file there is normal; therefore,
reduce log level in order to not overload the debug-level log.
|
|
Do not emit errors when it does not lead to build failures. Callers
handle the log level at which failures of this method should be
logged.
|
|
|
|
|
|
|
|
...and private members using lower_case_
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Enable performance-enum-size check.
|
|
The default options of std::filesystem::copy include following
symlinks, resulting in file repositories creating wrong trees if
containing unresolved symlinks, or failing unexpectedly early if
symlink cycles existed.
This is fixed by ensuring the copy_symlinks option is always used.
|
|
... while keeping our .clang-format file.
|
|
! => not; && => and, || => or
|
|
|
|
Instead of returning a plain boolean, return an expected with the same
boolean value that in case of an error indicates the error code. In this
way, an error-specific handling is possible by consumers. While there,
also add proper quoting of the involved file names.
|
|
|
|
|
|
|
|
Main culprits:
- std::size_t, std::nullptr_t, and NULL require <cstddef>
- std::move and std::forward require <utility>
- unordered maps and sets require respective includes
- std::for_each and std::all_of require <algorithm>
|
|
Some of the more specific issues addressed:
- missing log_level target/include
- header-only libs wrongly marking deps as private
- missing/misplaced gsl includes
|
|
... and improve log messages in case of failure.
|
|
The man page for open(2) says the following to the O_SYNC flag: 'O_SYNC
provides synchronized I/O file integrity completion, meaning write operations
will flush data and all associated metadata to the underlying hardware.' This
flag results in a high delay when files are stored in casx, e.g., several
seconds for medium-sized files such as 23 MB. Since just does not care about
persistency, this strong synchronization mechanism is not required and is
deactivated.
|
|
Make sure that all CopyFile, WriteFile, and CreateSymlink
functions properly unlink the target file (if it exists and
overwrite requested) to avoid interferences of the install
command. With this change, the clean up step for install-cas
and the within GraphTraverser can new be omitted.
|
|
Upwards symlinks should still be collected from actions, even if
only the non-upwards symlinks are supported artifact types. The
client side is thus the one responsible with enforcing the
non-upwardness condition.
|
|
...that std::filesystem::* calls produce. This is because existence
and type checks use almost exclusively std::filesystem::status,
which follows symbolic links, when being called with path arguments.
Instead, one should instead use these methods with the value
returned by a call of std::filesystem::symlink_status.
This commit also streamlines the FileSystemManager tests, as well
as replace bare calls to std::filesystem with their FileSystemManager
counterparts (where suitable).
|
|
...allowing the skipping of certain subtrees if needed. This is
useful, e.g., in simulating what a 'git add' call would do,
which ignores all '.git' subdirectories.
Also adds a corresponding test for the new method.
|
|
|
|
|
|
|
|
...as early as possible. This ensures that callers always receive
only the tree entries for the supported object types.
For the symlinks non-upwardness check we pass a lambda capturing
the real backend of the tree entries, such that the symlinks can
be read.
Updates git_tree tests accordingly.
|
|
...but make sure it is still considered a special type.
The only non-special entry types remain file, executable, and tree.
|
|
|
|
... which became obsolete with the new fdless write/copy
implementations.
|
|
... to remove the risk of deadlocks on certain combinations
of C++ standard library and libc when performing the
copy/write in a child process. For 'fdless' copy/write, a
child process is used to prevent the parent from getting
polluted with open writable file descriptors (which might
get inherited by other children that keep them open and can
cause EBUSY errors).
|
|
|
|
... 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.
|
|
... and ensure that cascades of checks are performed with
only a single filesystem stat per method.
|
|
|
|
|
|
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.
|
|
... to allow for overwriting
|
|
|
|
|