]> git.ipfire.org Git - thirdparty/ccache.git/log
thirdparty/ccache.git
2 years agofix: Fix parsing of sloppiness with trailing delimiter
Joel Rosdahl [Thu, 3 Nov 2022 19:56:32 +0000 (20:56 +0100)] 
fix: Fix parsing of sloppiness with trailing delimiter

2 years agofix: Avoid redundant slash in HTTP storage URLs with subdirs
Joel Rosdahl [Thu, 3 Nov 2022 19:48:05 +0000 (20:48 +0100)] 
fix: Avoid redundant slash in HTTP storage URLs with subdirs

2 years agofix: Hash variables that affect Clang version on macOS
Joel Rosdahl [Thu, 3 Nov 2022 19:45:21 +0000 (20:45 +0100)] 
fix: Hash variables that affect Clang version on macOS

Fixes #1205.

2 years agochore: Tweak comments
Joel Rosdahl [Thu, 3 Nov 2022 19:28:18 +0000 (20:28 +0100)] 
chore: Tweak comments

2 years agochore: Improve logging of file read failures
Joel Rosdahl [Wed, 2 Nov 2022 18:18:21 +0000 (19:18 +0100)] 
chore: Improve logging of file read failures

2 years agochore: Update authors v4.7.2
Joel Rosdahl [Sat, 29 Oct 2022 11:17:57 +0000 (13:17 +0200)] 
chore: Update authors

2 years agochore: Update NEWS
Joel Rosdahl [Sat, 29 Oct 2022 08:10:45 +0000 (10:10 +0200)] 
chore: Update NEWS

2 years agofix: Process the argument following a -Xarch argument (#1199)
rblx-kbuck [Fri, 28 Oct 2022 18:41:28 +0000 (11:41 -0700)] 
fix: Process the argument following a -Xarch argument (#1199)

Since there are already checks enforcing that all -Xarch arguments match
each other and -arch, we can assume that the compiler would also
interpret the following argument, so ccache should interpret it too.

Fixes #1198.

2 years agofix: Use configured umask for command line operations like --zero-stats
Joel Rosdahl [Thu, 27 Oct 2022 20:23:50 +0000 (22:23 +0200)] 
fix: Use configured umask for command line operations like --zero-stats

Closes #1197.

2 years agotest: Disable flaky Windows profiling tests
Joel Rosdahl [Thu, 27 Oct 2022 20:05:39 +0000 (22:05 +0200)] 
test: Disable flaky Windows profiling tests

2 years agobuild: Include limits.h for PATH_MAX
Joel Rosdahl [Wed, 26 Oct 2022 19:00:31 +0000 (21:00 +0200)] 
build: Include limits.h for PATH_MAX

Note: The C++ climits header does not guarantee to define PATH_MAX.

Fixes #1193.

2 years agofix: Use separate 32-bit and 64-bit inode cache files
Joel Rosdahl [Tue, 25 Oct 2022 19:28:04 +0000 (21:28 +0200)] 
fix: Use separate 32-bit and 64-bit inode cache files

The memory layout of the shared region differs between 32-bit and 64-bit
ccache binaries, so use different inode cache files.

2 years agobuild: Apply standard settings and warnings to lockfile test (#1195)
Gregor Jasny [Mon, 24 Oct 2022 14:51:54 +0000 (16:51 +0200)] 
build: Apply standard settings and warnings to lockfile test (#1195)

This ensures the required include of `config.h` to get `mode_t` defined on Windows.

2 years agochore: Correct contributor in NEWS
Joel Rosdahl [Sat, 22 Oct 2022 18:06:08 +0000 (20:06 +0200)] 
chore: Correct contributor in NEWS

2 years agochore: Update NEWS v4.7.1
Joel Rosdahl [Sat, 22 Oct 2022 17:48:41 +0000 (19:48 +0200)] 
chore: Update NEWS

2 years agoci: Avoid using deprecated GitHub set-output command
Joel Rosdahl [Sat, 22 Oct 2022 11:33:37 +0000 (13:33 +0200)] 
ci: Avoid using deprecated GitHub set-output command

Reference:
<https://github.blog/changelog/
2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/>

2 years agoci: Add GCC 8 and GCC 9 jobs
Joel Rosdahl [Sat, 22 Oct 2022 11:27:56 +0000 (13:27 +0200)] 
ci: Add GCC 8 and GCC 9 jobs

2 years agobuild: Remove unneeded C++11 flag in libatomic test (#1191)
Orgad Shaneh [Sat, 22 Oct 2022 10:50:28 +0000 (13:50 +0300)] 
build: Remove unneeded C++11 flag in libatomic test (#1191)

The required C++ is 17 anyway.

2 years agobuild: Support compilation with GCC 8 (#1190)
Orgad Shaneh [Sat, 22 Oct 2022 10:48:25 +0000 (13:48 +0300)] 
build: Support compilation with GCC 8 (#1190)

See https://discourse.cmake.org/t/correct-way-to-link-std-filesystem-with-gcc-8/4121

2 years agofix: Handle -MD/-MMD when compiling assembler file
Joel Rosdahl [Wed, 19 Oct 2022 20:13:21 +0000 (22:13 +0200)] 
fix: Handle -MD/-MMD when compiling assembler file

When compiling an assembler file, -MD and -MMD don't produce any
dependency file, so don't expect one.

Also, make sure to fall back to running the real compiler in case an
expected output file is missing instead of exiting with an error.

Fixes #1189.

2 years agochore: Remove unused no-response bot config
Joel Rosdahl [Wed, 19 Oct 2022 17:48:20 +0000 (19:48 +0200)] 
chore: Remove unused no-response bot config

2 years agodoc: Fix markup in NEWS
Joel Rosdahl [Mon, 17 Oct 2022 18:27:30 +0000 (20:27 +0200)] 
doc: Fix markup in NEWS

2 years agochore: Update NEWS v4.7
Joel Rosdahl [Mon, 17 Oct 2022 18:11:11 +0000 (20:11 +0200)] 
chore: Update NEWS

2 years agodoc: Improve manual
Joel Rosdahl [Sun, 16 Oct 2022 20:02:00 +0000 (22:02 +0200)] 
doc: Improve manual

2 years agodoc: Fixed markup of __NAME__ macros
Joel Rosdahl [Sun, 16 Oct 2022 12:51:40 +0000 (14:51 +0200)] 
doc: Fixed markup of __NAME__ macros

2 years agorefactor: Avoid an extra data copy when rewriting stdout
Joel Rosdahl [Sun, 16 Oct 2022 08:17:01 +0000 (10:17 +0200)] 
refactor: Avoid an extra data copy when rewriting stdout

2 years agotest: Simplify util::read_file_part test
Joel Rosdahl [Sun, 16 Oct 2022 08:16:29 +0000 (10:16 +0200)] 
test: Simplify util::read_file_part test

2 years agoenhance: Add more util::Bytes::insert variants
Joel Rosdahl [Sun, 16 Oct 2022 08:11:14 +0000 (10:11 +0200)] 
enhance: Add more util::Bytes::insert variants

2 years agorefactor: Rename ShowIncludesParser to MsvcShowIncludesOutput
Joel Rosdahl [Sat, 15 Oct 2022 18:26:18 +0000 (20:26 +0200)] 
refactor: Rename ShowIncludesParser to MsvcShowIncludesOutput

I think that this is more in line with what the namespace represents. I
also renamed ShowIncludesParser::tokenize to
MsvcShowIncludesOutput::get_includes since it's not returning generic
tokens but specifically includes files.

2 years agochore: Tweak code related to auto depend mode for MSVC
Joel Rosdahl [Sat, 15 Oct 2022 18:17:00 +0000 (20:17 +0200)] 
chore: Tweak code related to auto depend mode for MSVC

2 years agodoc: Tweak manual and comments related to /showIncludes
Joel Rosdahl [Wed, 12 Oct 2022 18:35:42 +0000 (20:35 +0200)] 
doc: Tweak manual and comments related to /showIncludes

2 years agochore: Add news for version 4.6.3
Joel Rosdahl [Wed, 12 Oct 2022 18:15:32 +0000 (20:15 +0200)] 
chore: Add news for version 4.6.3

2 years agochore: Tweak README
Joel Rosdahl [Mon, 10 Oct 2022 18:26:51 +0000 (20:26 +0200)] 
chore: Tweak README

2 years agochore: Update authors
Joel Rosdahl [Thu, 6 Oct 2022 20:05:21 +0000 (22:05 +0200)] 
chore: Update authors

2 years agoci: Remove Ubuntu 18.04 jobs and add GCC 12 job (#1180)
Orgad Shaneh [Sun, 16 Oct 2022 07:37:45 +0000 (10:37 +0300)] 
ci: Remove Ubuntu 18.04 jobs and add GCC 12 job (#1180)

It is deprecated.

See https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/

Add GCC 12 on Ubuntu 22.04.

2 years agobuild: Add headers to CMake project files (#1178)
Orgad Shaneh [Sat, 15 Oct 2022 18:15:59 +0000 (21:15 +0300)] 
build: Add headers to CMake project files (#1178)

Useful for listing them in the IDE project tree, for IDEs that use
CMake file api (like Qt Creator).

2 years agofeat: Support auto depend mode for MSVC without /showIncludes (#1176)
Orgad Shaneh [Sat, 15 Oct 2022 18:09:36 +0000 (21:09 +0300)] 
feat: Support auto depend mode for MSVC without /showIncludes (#1176)

If MSVC is executed *without* /showIncludes, and ccache is configured with
depend mode, add /showIncludes and strip the extra output from stdout.

2 years agoci: Remove clang64 msys target from ci (#1179)
Orgad Shaneh [Sat, 15 Oct 2022 17:57:06 +0000 (20:57 +0300)] 
ci: Remove clang64 msys target from ci (#1179)

It frequently fails to install packages.

2 years agotest: Make the integration tests work under Windows (#1133)
Orgad Shaneh [Wed, 12 Oct 2022 18:49:07 +0000 (21:49 +0300)] 
test: Make the integration tests work under Windows (#1133)

Adapted the integration test scripts to be able to run on Windows.

- Added the ".sh" extension to most shell scripts. It looks like Windows needs
  this to run the scripts.
- Added special handling of carriage return characters.
- Tests that fail are deactivated for the moment.
- Added additional runners in different Msys2 environments.
- Disabled the remote_http tests "Basic auth required" and "Basic auth failed"
  due to intermittent failures.
- Disabled PCH tests for MSYS/Clang.

Co-authored-by: R. Voggenauer <rvogg@users.noreply.github.com>
2 years agobuild: Add missing source file extension
Joel Rosdahl [Wed, 12 Oct 2022 18:30:16 +0000 (20:30 +0200)] 
build: Add missing source file extension

2 years agofeat: Support depend mode for MSVC (#992)
Orgad Shaneh [Wed, 12 Oct 2022 18:29:01 +0000 (21:29 +0300)] 
feat: Support depend mode for MSVC (#992)

Based on -showIncludes, which prints included files on stdout with a
certain text prefix. Otherwise pretty similar to depend mode handling
for GCC.

This makes MSVC building way faster.

Co-authored-by: Luboš Luňák <l.lunak@centrum.cz>
2 years agochore: Clean up code slightly
Joel Rosdahl [Wed, 5 Oct 2022 19:34:17 +0000 (21:34 +0200)] 
chore: Clean up code slightly

2 years agofix: Remove usage of deprecated codecvt header (#1172)
Orgad Shaneh [Wed, 5 Oct 2022 20:10:24 +0000 (23:10 +0300)] 
fix: Remove usage of deprecated codecvt header (#1172)

Based on https://stackoverflow.com/a/69410299/764870.

2 years agorefactor: Store compiler output as bytes
Joel Rosdahl [Wed, 5 Oct 2022 19:02:36 +0000 (21:02 +0200)] 
refactor: Store compiler output as bytes

As discussed in #1173.

2 years agoenhance: Add util::to_string instantiations for Bytes and span
Joel Rosdahl [Wed, 5 Oct 2022 18:58:01 +0000 (20:58 +0200)] 
enhance: Add util::to_string instantiations for Bytes and span

2 years agotest: Add tests for util::to_string and util::to_string_view
Joel Rosdahl [Wed, 5 Oct 2022 18:57:41 +0000 (20:57 +0200)] 
test: Add tests for util::to_string and util::to_string_view

2 years agofix: Handle spaces between target and colon in dependency files (#1166)
louiscaron [Wed, 5 Oct 2022 19:13:50 +0000 (21:13 +0200)] 
fix: Handle spaces between target and colon in dependency files (#1166)

Support dependency files that are generated with spaces between the target and
the colon sign.

2 years agotest: Add another depend mode test (#1174)
louiscaron [Wed, 5 Oct 2022 19:06:58 +0000 (21:06 +0200)] 
test: Add another depend mode test (#1174)

The first test exercises a relative path only identical generation.

The second test exhibits a known limitation when the same test case is done with
an absolute path (depend file is wrong).

2 years agofix: Retain line CRLF in compiler output on Windows (#1173)
Orgad Shaneh [Wed, 5 Oct 2022 18:24:14 +0000 (21:24 +0300)] 
fix: Retain line CRLF in compiler output on Windows (#1173)

When the cached data is read, the output to fd is binary
(Util::send_to_fd), so in order to maintain the original
line endings, the output must be stored as binary too.

2 years agoRevert "feat: Support auto depend mode for MSVC without /showIncludes (#1158)"
Joel Rosdahl [Wed, 5 Oct 2022 17:52:45 +0000 (19:52 +0200)] 
Revert "feat: Support auto depend mode for MSVC without /showIncludes (#1158)"

This reverts commit 8b65880b5ad817156b58c58b5133aafc99b0a264.

See <https://github.com/ccache/ccache/pull/1158#issuecomment-1268748557>.

2 years agofeat: Support auto depend mode for MSVC without /showIncludes (#1158)
Orgad Shaneh [Wed, 5 Oct 2022 17:34:31 +0000 (20:34 +0300)] 
feat: Support auto depend mode for MSVC without /showIncludes (#1158)

Co-authored-by: Luboš Luňák <l.lunak@centrum.cz>
2 years agobuild: Use pkgconfig for zstd search (#1169)
Rosen Penev [Wed, 5 Oct 2022 17:29:50 +0000 (10:29 -0700)] 
build: Use pkgconfig for zstd search (#1169)

2 years agofix: Capture MSVC stdout/stderr when running from Visual Studio (#1170)
Orgad Shaneh [Wed, 5 Oct 2022 05:41:09 +0000 (08:41 +0300)] 
fix: Capture MSVC stdout/stderr when running from Visual Studio (#1170)

2 years agofix: Fix implementation of unsetenv on Windows (#1171)
Orgad Shaneh [Wed, 5 Oct 2022 05:31:52 +0000 (08:31 +0300)] 
fix: Fix implementation of unsetenv on Windows (#1171)

2 years agodoc: Sort sloppiness values by name
Joel Rosdahl [Tue, 4 Oct 2022 19:32:55 +0000 (21:32 +0200)] 
doc: Sort sloppiness values by name

2 years agofeat: Improve handling of -frandom-seed and description of sloppiness
Joel Rosdahl [Tue, 4 Oct 2022 19:31:12 +0000 (21:31 +0200)] 
feat: Improve handling of -frandom-seed and description of sloppiness

I should not be necessary to distinguish between existence and
non-existence of -frandom-seed if random_seed sloppiness is requested,
so don't hash the "-frandom-seed=" part either.

2 years agofeat: Add sloppiness for -frandom-seed (#1168)
Raihaan Shouhell [Tue, 4 Oct 2022 19:21:42 +0000 (03:21 +0800)] 
feat: Add sloppiness for -frandom-seed (#1168)

2 years agofeat: Improve statistics for remote hits/misses
Joel Rosdahl [Mon, 3 Oct 2022 18:18:03 +0000 (20:18 +0200)] 
feat: Improve statistics for remote hits/misses

ccache collects statistics about local and remote storage layer get/put
operations and describes them as "local/remote hits/misses" in the
output of "ccache -s". However, since "hits" and "misses" mean "result
hit/miss" in the "cacheable calls" section, it's easy to think that they
measure the same thing.

This commit improves the situation by:

- Adding new "local/remote hits/misses" counters that mean "result
  hit/miss". These are shown if remote storage is used (since they
  otherwise are redundant and equal to the normal "hits/misses"
  counters) or if the -v/--verbose option is given.
- Presenting the previous "local/remote hits/misses" counters as
  "local/remote reads". Only shown in verbose mode.
- Adding "local/remote writes" counters. Only shown in verbose mode.

Closes #1016.

2 years agochore: Improve inode cache log messages
Joel Rosdahl [Sun, 2 Oct 2022 17:06:03 +0000 (19:06 +0200)] 
chore: Improve inode cache log messages

2 years agofix: Don't increment preprocessed_cache_miss in recache mode
Joel Rosdahl [Sun, 2 Oct 2022 17:02:09 +0000 (19:02 +0200)] 
fix: Don't increment preprocessed_cache_miss in recache mode

2 years agorefactor: Sort k_statistics_fields
Joel Rosdahl [Sun, 2 Oct 2022 11:26:22 +0000 (13:26 +0200)] 
refactor: Sort k_statistics_fields

2 years agorefactor: Extract code for retrieving manifest to a function
Joel Rosdahl [Tue, 27 Sep 2022 19:50:42 +0000 (21:50 +0200)] 
refactor: Extract code for retrieving manifest to a function

2 years agofeat: Implement "remote only" mode
Joel Rosdahl [Tue, 27 Sep 2022 18:54:29 +0000 (20:54 +0200)] 
feat: Implement "remote only" mode

Closes #1010.

2 years agochore: Rename primary/secondary storage to local/remote storage
Joel Rosdahl [Sun, 25 Sep 2022 18:28:40 +0000 (20:28 +0200)] 
chore: Rename primary/secondary storage to local/remote storage

There is a feature request to be able not to use a local cache at all,
only a network cache. With such a feature, the names "primary storage"
and "secondary storage" make less sense since ccache would be operating
in "secondary only" mode, but then that storage would of course become
the primary (and only).

Let's rename "primary storage" to "local storage" and "secondary
storage" to "remote storage" – operating in "remote only" mode then
makes sense.

One of the original motivations to call networked storage "secondary" is
that the file storage can be used for local file systems as well, making
such storage "not quite remote", but in practice I guess the file
storage backend used primarily for network file systems.

2 years agochore: Rename primary/secondary config to config/system config
Joel Rosdahl [Sat, 24 Sep 2022 19:08:43 +0000 (21:08 +0200)] 
chore: Rename primary/secondary config to config/system config

2 years agofix: Support /external:I for MSVC (#1165)
Raihaan Shouhell [Mon, 26 Sep 2022 18:20:11 +0000 (02:20 +0800)] 
fix: Support /external:I for MSVC (#1165)

2 years agotest: Fix typo in depend tests (#1167)
louiscaron [Mon, 26 Sep 2022 17:55:49 +0000 (19:55 +0200)] 
test: Fix typo in depend tests (#1167)

2 years agotest: Fix KEEP_TESTDIR test in test/run (#1161)
louiscaron [Fri, 23 Sep 2022 14:52:39 +0000 (16:52 +0200)] 
test: Fix KEEP_TESTDIR test in test/run (#1161)

2 years agofeat: Use subsecond timestamps for include file check
Joel Rosdahl [Tue, 20 Sep 2022 17:05:38 +0000 (19:05 +0200)] 
feat: Use subsecond timestamps for include file check

To avoid a race condition, ccache disables the direct mode if an include
file has a too new mtime or ctime. Previously this check used one second
resolution timestamps, which meant that a generated include file often
would disable direct mode hits for up to one second. Now ccache uses
timestamps with subsecond resolution (nanoseconds on Linux), so the
direct mode will in practice no longer have to be disabled for generated
include files.

2 years agofeat: Use subsecond resolution timestamps in manifest files
Joel Rosdahl [Tue, 20 Sep 2022 17:02:18 +0000 (19:02 +0200)] 
feat: Use subsecond resolution timestamps in manifest files

This improves accuracy in with "file_stat_matches" sloppiness.

2 years agorefactor: Use util::TimePoint for timestamps
Joel Rosdahl [Tue, 20 Sep 2022 17:01:38 +0000 (19:01 +0200)] 
refactor: Use util::TimePoint for timestamps

2 years agoenhance: Add util::TimePoint and util::Duration
Joel Rosdahl [Sun, 18 Sep 2022 11:36:55 +0000 (13:36 +0200)] 
enhance: Add util::TimePoint and util::Duration

2 years agotest: Silence output from $COMPILER --version
Joel Rosdahl [Sun, 18 Sep 2022 11:33:59 +0000 (13:33 +0200)] 
test: Silence output from $COMPILER --version

2 years agofeat: Merge local manifest with fetched remote manifest
Joel Rosdahl [Wed, 14 Sep 2022 19:19:14 +0000 (21:19 +0200)] 
feat: Merge local manifest with fetched remote manifest

With read-only secondary storage, it can happen that primary storage has
a manifest named M with a result entry R1, while secondary storage also
has a manifest M but with result R2. On a compilation that matches R2,
ccache will first succeed to look up M in primary storage, fail to find
R2 and then get M from secondary storage where R2 can be found. Since M
already exists locally, ccache will simply return the cache hit but not
store knowledge of R2 locally. On a rebuild of R2, ccache therefore
needs to fetch from secondary storage again.

The improvement brought by this commit is that ccache now merges the
manifests from primary and secondary storage and stores the merged
version in primary storage. In other words, ccache setups with read-only
secondary storage will be able to accumulate local header file
combinations and seamlessly combine them with changes from secondary
storage.

Closes #1049.

2 years agorefactor: Extract timestamp logic from Manifest
Joel Rosdahl [Tue, 13 Sep 2022 20:00:08 +0000 (22:00 +0200)] 
refactor: Extract timestamp logic from Manifest

2 years agorefactor: Improve Storage::get API to be able to return multiple times
Joel Rosdahl [Mon, 12 Sep 2022 19:27:52 +0000 (21:27 +0200)] 
refactor: Improve Storage::get API to be able to return multiple times

2 years agofix: Don't reshare results with raw files to secondary storage
Joel Rosdahl [Mon, 12 Sep 2022 13:25:42 +0000 (15:25 +0200)] 
fix: Don't reshare results with raw files to secondary storage

2 years agorefactor(storage): Pass cache entries via memory instead of files
Joel Rosdahl [Mon, 12 Sep 2022 12:06:45 +0000 (14:06 +0200)] 
refactor(storage): Pass cache entries via memory instead of files

2 years agofix: Make sure that temporary files always have .tmp. in the name
Joel Rosdahl [Mon, 12 Sep 2022 11:25:45 +0000 (13:25 +0200)] 
fix: Make sure that temporary files always have .tmp. in the name

PrimaryStorage::clean_dir relies on being able to classify temporary
files from the filename.

2 years agofeat: Print result format version and no of files in --inspect
Joel Rosdahl [Sun, 11 Sep 2022 13:36:13 +0000 (15:36 +0200)] 
feat: Print result format version and no of files in --inspect

2 years agochore: Simplify cache entry reading and writing
Joel Rosdahl [Sun, 11 Sep 2022 11:48:05 +0000 (13:48 +0200)] 
chore: Simplify cache entry reading and writing

Cache entries are now fully read into memory before (de)compressing,
checksumming and parsing, instead of streaming data like before. While
this increases memory usage when working with large object files, it
also simplifies the code a lot. Another motivation for this change is
that cache entry data is not streamed from secondary storage anyway, and
it makes sense to keep the architecture simple and similar for primary
and secondary storage code paths.

The cache entry format has modified so that the checksum covers the
potentially compressed payload (plus the header), not the uncompressed
payload (plus the header) like before. The checksum is now also stored
in an uncompressed epilogue. Since the cache entry format has been
changed, the input hash has been changed as well.

2 years agoenhance: Add util::zstd_* functions
Joel Rosdahl [Sun, 11 Sep 2022 11:27:40 +0000 (13:27 +0200)] 
enhance: Add util::zstd_* functions

2 years agorefactor: Let core::CacheEntryDataWriter work with util::Bytes
Joel Rosdahl [Sun, 11 Sep 2022 11:10:48 +0000 (13:10 +0200)] 
refactor: Let core::CacheEntryDataWriter work with util::Bytes

2 years agofeat: Improve logging for Util::clone_hard_link_or_copy_file
Joel Rosdahl [Sun, 11 Sep 2022 10:50:27 +0000 (12:50 +0200)] 
feat: Improve logging for Util::clone_hard_link_or_copy_file

2 years agorefactor: Let util::DataReceiver take uint8_t
Joel Rosdahl [Sun, 11 Sep 2022 09:12:03 +0000 (11:12 +0200)] 
refactor: Let util::DataReceiver take uint8_t

2 years agorefactor: Use util::throw_on_error
Joel Rosdahl [Thu, 8 Sep 2022 11:54:02 +0000 (13:54 +0200)] 
refactor: Use util::throw_on_error

2 years agoenhance: Add util::throw_on_error functions
Joel Rosdahl [Thu, 8 Sep 2022 11:53:58 +0000 (13:53 +0200)] 
enhance: Add util::throw_on_error functions

2 years agoenhance: Add prefix parameter to util::value_or_throw
Joel Rosdahl [Thu, 8 Sep 2022 11:26:25 +0000 (13:26 +0200)] 
enhance: Add prefix parameter to util::value_or_throw

2 years agoenhance: Add util::read_file_part function
Joel Rosdahl [Wed, 7 Sep 2022 12:57:17 +0000 (14:57 +0200)] 
enhance: Add util::read_file_part function

2 years agoperf: Use util::Bytes
Joel Rosdahl [Wed, 7 Sep 2022 09:22:36 +0000 (11:22 +0200)] 
perf: Use util::Bytes

2 years agoenhance: Add util::Bytes class
Joel Rosdahl [Wed, 7 Sep 2022 08:17:21 +0000 (10:17 +0200)] 
enhance: Add util::Bytes class

2 years agorefactor: Use memory buffers instead of streams for manifests
Joel Rosdahl [Tue, 6 Sep 2022 13:06:11 +0000 (15:06 +0200)] 
refactor: Use memory buffers instead of streams for manifests

This is part of a larger refactoring effort with the goal of simplifying
how cache entries are read and processed.

2 years agorefactor: Use memory buffers instead of streams for results
Joel Rosdahl [Mon, 5 Sep 2022 18:23:21 +0000 (20:23 +0200)] 
refactor: Use memory buffers instead of streams for results

- Result objects now only know and care about the result payload part of
  a result cache entry.
- Result object are no longer tightly coupled with the primary storage
  implementation.

This is part of a larger refactoring effort with the goal of simplifying
how cache entries are read and processed.

2 years agobuild: Remove now redundant CMAKE_CURRENT_SOURCE_DIR usage
Joel Rosdahl [Wed, 7 Sep 2022 20:06:56 +0000 (22:06 +0200)] 
build: Remove now redundant CMAKE_CURRENT_SOURCE_DIR usage

As of CMake 3.13, target_sources works as expected with relative paths
in subdirectories.

2 years agoci: Add minimum GitHub token permissions for workflows (#1159)
Varun Sharma [Tue, 13 Sep 2022 19:41:16 +0000 (12:41 -0700)] 
ci: Add minimum GitHub token permissions for workflows (#1159)

2 years agorefactor: Reuse local reference in process_args (#1157)
Orgad Shaneh [Tue, 13 Sep 2022 16:16:54 +0000 (19:16 +0300)] 
refactor: Reuse local reference in process_args (#1157)

2 years agofix: Don't crash with no or nonexistent source file with base_dir
Joel Rosdahl [Fri, 9 Sep 2022 07:09:06 +0000 (09:09 +0200)] 
fix: Don't crash with no or nonexistent source file with base_dir

Regression in fec405539bca90ebd0992ae6606bd10eec3a64da.

Fixes #1155.

2 years agochore: Support clang-format 14
Joel Rosdahl [Tue, 6 Sep 2022 07:12:45 +0000 (09:12 +0200)] 
chore: Support clang-format 14

clang-format 14 chokes on a construction in unittest/test_Stat.cpp. Work
around this by moving ifdefs around.

2 years agofix: Unlink destination before opening in util::write_file
Joel Rosdahl [Mon, 5 Sep 2022 18:22:00 +0000 (20:22 +0200)] 
fix: Unlink destination before opening in util::write_file

This allows for writing to a file that already exists with read-only
permissions.

2 years agoenhance: Let util::write_file take an std::string_view
Joel Rosdahl [Mon, 5 Sep 2022 11:21:33 +0000 (13:21 +0200)] 
enhance: Let util::write_file take an std::string_view