]> git.ipfire.org Git - thirdparty/ccache.git/log
thirdparty/ccache.git
21 months agofix: Let DirEntry::size_on_disk return likely size on disk
Joel Rosdahl [Mon, 16 Oct 2023 17:33:31 +0000 (19:33 +0200)] 
fix: Let DirEntry::size_on_disk return likely size on disk

st_blocks in struct stat cannot be trusted for some filesystems that do
transparent compression or deduplication. For instance, ZFS can adjust
the block count some time in the future when compression is finished.

The only reasonable fix for this seems to be to just guess how much
space the file will take using st_size.

Fixes #1332.

22 months agofix: Bail out on too hard options -fmodules-ts and -fmodule-header
Joel Rosdahl [Wed, 4 Oct 2023 16:13:52 +0000 (18:13 +0200)] 
fix: Bail out on too hard options -fmodules-ts and -fmodule-header

Fixes #1333.

22 months agochore: Add entries to codespell allow list
Joel Rosdahl [Mon, 2 Oct 2023 19:38:14 +0000 (21:38 +0200)] 
chore: Add entries to codespell allow list

22 months agorefactor: Move Logging to util
Joel Rosdahl [Mon, 2 Oct 2023 19:06:20 +0000 (21:06 +0200)] 
refactor: Move Logging to util

22 months agorefactor: Move Win32Util::error_message to util
Joel Rosdahl [Mon, 2 Oct 2023 18:45:02 +0000 (20:45 +0200)] 
refactor: Move Win32Util::error_message to util

22 months agorefactor: Move Win32Util::argv_to_string to util
Joel Rosdahl [Mon, 2 Oct 2023 16:38:05 +0000 (18:38 +0200)] 
refactor: Move Win32Util::argv_to_string to util

22 months agorefactor: Move Win32Util::add_exe_suffix to util
Joel Rosdahl [Mon, 2 Oct 2023 16:32:56 +0000 (18:32 +0200)] 
refactor: Move Win32Util::add_exe_suffix to util

22 months agorefactor: Move Win32Util::get_last_ntstatus to util::DirEntry
Joel Rosdahl [Sun, 1 Oct 2023 08:26:49 +0000 (10:26 +0200)] 
refactor: Move Win32Util::get_last_ntstatus to util::DirEntry

util::DirEntry is the sole user of Win32Util::get_last_ntstatus.

22 months agorefactor: Move File to util::FileStream
Joel Rosdahl [Sun, 1 Oct 2023 08:23:18 +0000 (10:23 +0200)] 
refactor: Move File to util::FileStream

22 months agorefactor: Move NonCopyable to util
Joel Rosdahl [Sat, 30 Sep 2023 17:48:24 +0000 (19:48 +0200)] 
refactor: Move NonCopyable to util

22 months agorefactor: Move fmtmacros to util
Joel Rosdahl [Sat, 30 Sep 2023 17:46:24 +0000 (19:46 +0200)] 
refactor: Move fmtmacros to util

22 months agorefactor: Move Finalizer to util
Joel Rosdahl [Sat, 30 Sep 2023 17:40:33 +0000 (19:40 +0200)] 
refactor: Move Finalizer to util

22 months agorefactor: Move assertions to util
Joel Rosdahl [Thu, 28 Sep 2023 18:32:10 +0000 (20:32 +0200)] 
refactor: Move assertions to util

22 months agobump: Upgrade to BLAKE3 1.5.0
Joel Rosdahl [Thu, 28 Sep 2023 16:05:25 +0000 (18:05 +0200)] 
bump: Upgrade to BLAKE3 1.5.0

23 months agochore: Prepare for version 4.8.3
Joel Rosdahl [Tue, 29 Aug 2023 19:38:11 +0000 (21:38 +0200)] 
chore: Prepare for version 4.8.3

(cherry picked from commit 044558e647b49dbc8fc89b810a7d22f526101e6b)

23 months agobump: Upgrade to fmt 10.1.1
Joel Rosdahl [Tue, 29 Aug 2023 19:08:59 +0000 (21:08 +0200)] 
bump: Upgrade to fmt 10.1.1

23 months agofix: Exit more gracefully on invalid sharded remote storage URL
Joel Rosdahl [Tue, 29 Aug 2023 19:06:23 +0000 (21:06 +0200)] 
fix: Exit more gracefully on invalid sharded remote storage URL

As mentioned in #1321.

23 months agochore: Avoid linting suppression for Storage::~Storage
Joel Rosdahl [Sat, 26 Aug 2023 18:37:20 +0000 (20:37 +0200)] 
chore: Avoid linting suppression for Storage::~Storage

23 months agobump: Upgrade to cpp-httplib 0.14.0
Joel Rosdahl [Wed, 23 Aug 2023 17:15:55 +0000 (19:15 +0200)] 
bump: Upgrade to cpp-httplib 0.14.0

23 months agodocs: Mention that system_headers sloppiness is not supported for MSVC
Joel Rosdahl [Wed, 23 Aug 2023 17:06:35 +0000 (19:06 +0200)] 
docs: Mention that system_headers sloppiness is not supported for MSVC

Closes #1224.

23 months agofix: Fix bookkeeping of raw files
Joel Rosdahl [Fri, 18 Aug 2023 20:17:40 +0000 (22:17 +0200)] 
fix: Fix bookkeeping of raw files

Ccache 4.8-4.8.2 notes the size and count of raw files (written to the
cache if hard link or file clone mode is enabled) to a level 2 stats
file. However, the new cleanup algorithm (also introduced in 4.8)
assumes that all size/count statistics are placed in a level 1 stats
file. After a "ccache -c", the raw files will be "rediscovered" and
noted in level 1 stats files, thus duplicating bookkeeping in level 2
stats files, resulting in a too high cache size figure in "ccache -s".

To fix this, ccache will now:

- Note size/count of raw files in the proper level 1 stats file.
- When storing an entry on a cache miss, detect if the corresponding
  level 2 stats file has non-zero size/count statistics and propagate
  them to the level 1 stats file if so.
- Zero out files/count statistics for level 2 stats file on "ccache -c".

This means that the reported cache size will gradually correct itself
automatically. Alternatively, the user can run "ccache -c" to fix all
counters immediately.

Fixes #1320.

23 months agoenhance: Support updating stats file only if values have changed
Joel Rosdahl [Sat, 19 Aug 2023 11:09:10 +0000 (13:09 +0200)] 
enhance: Support updating stats file only if values have changed

23 months agorefactor: Improve name of LocalStorage::increment_level_2_counters
Joel Rosdahl [Fri, 18 Aug 2023 19:30:33 +0000 (21:30 +0200)] 
refactor: Improve name of LocalStorage::increment_level_2_counters

23 months agorefactor: Use LocalStorage::get_stats_file
Joel Rosdahl [Fri, 18 Aug 2023 19:29:14 +0000 (21:29 +0200)] 
refactor: Use LocalStorage::get_stats_file

23 months agochore: Fix grammar in comments
Joel Rosdahl [Fri, 18 Aug 2023 19:06:33 +0000 (21:06 +0200)] 
chore: Fix grammar in comments

23 months agochore: Avoid ccache:disable strings in ccache source code
Joel Rosdahl [Thu, 17 Aug 2023 16:14:37 +0000 (18:14 +0200)] 
chore: Avoid ccache:disable strings in ccache source code

A verbatim ccache:disable string disables ccache when compiling some
ccache sources, which is unnecessary.

23 months agobump: Upgrade to fmt 10.1.0
Joel Rosdahl [Mon, 14 Aug 2023 16:34:36 +0000 (18:34 +0200)] 
bump: Upgrade to fmt 10.1.0

2 years agorefactor: Move AtomicFile to core
Joel Rosdahl [Sat, 5 Aug 2023 13:22:06 +0000 (15:22 +0200)] 
refactor: Move AtomicFile to core

2 years agorefactor: Move ThreadPool to util
Joel Rosdahl [Sat, 5 Aug 2023 13:13:47 +0000 (15:13 +0200)] 
refactor: Move ThreadPool to util

2 years agorefactor: fs::path-ify util::traverse_directory
Joel Rosdahl [Sat, 5 Aug 2023 10:45:54 +0000 (12:45 +0200)] 
refactor: fs::path-ify util::traverse_directory

2 years agorefactor: fs::path-ify LockFile
Joel Rosdahl [Sat, 5 Aug 2023 09:01:09 +0000 (11:01 +0200)] 
refactor: fs::path-ify LockFile

2 years agorefactor: fs::path-ify LongLivedLockFileManager
Joel Rosdahl [Sat, 5 Aug 2023 08:59:00 +0000 (10:59 +0200)] 
refactor: fs::path-ify LongLivedLockFileManager

2 years agorefactor: Move Fd to util
Joel Rosdahl [Sat, 5 Aug 2023 08:49:04 +0000 (10:49 +0200)] 
refactor: Move Fd to util

2 years agorefactor: Remove use of mkdir(2)
Joel Rosdahl [Sat, 5 Aug 2023 07:12:34 +0000 (09:12 +0200)] 
refactor: Remove use of mkdir(2)

2 years agorefactor: Move TemporaryFile to util
Joel Rosdahl [Fri, 4 Aug 2023 06:47:40 +0000 (08:47 +0200)] 
refactor: Move TemporaryFile to util

2 years agoci: Time out jobs after 30 minutes
Joel Rosdahl [Fri, 4 Aug 2023 06:32:56 +0000 (08:32 +0200)] 
ci: Time out jobs after 30 minutes

The default is 360 minutes.

2 years agorefactor: fs::path-ify some util file functions
Joel Rosdahl [Fri, 4 Aug 2023 07:03:31 +0000 (09:03 +0200)] 
refactor: fs::path-ify some util file functions

2 years agorefactor: fs::path-ify TemporaryFile
Joel Rosdahl [Fri, 4 Aug 2023 05:57:25 +0000 (07:57 +0200)] 
refactor: fs::path-ify TemporaryFile

2 years agorefactor: fs::path-ify core::ensure_dir_exists
Joel Rosdahl [Thu, 3 Aug 2023 17:24:41 +0000 (19:24 +0200)] 
refactor: fs::path-ify core::ensure_dir_exists

2 years agotest: Fix DirEntry unit tests for Windows mingw64
Joel Rosdahl [Fri, 4 Aug 2023 15:02:12 +0000 (17:02 +0200)] 
test: Fix DirEntry unit tests for Windows mingw64

2 years agochore: Fix unit test build after d8b654a30ca8
Joel Rosdahl [Thu, 3 Aug 2023 12:04:44 +0000 (14:04 +0200)] 
chore: Fix unit test build after d8b654a30ca8

2 years agofeat: Rewrite path after -Xclang -include to relative (#1318)
Jiulong Wang [Thu, 3 Aug 2023 12:01:23 +0000 (05:01 -0700)] 
feat: Rewrite path after -Xclang -include to relative (#1318)

cmake may generate both -include and -include-pch. Example:

c++ ... -Xclang -include-pch -Xclang /abs/path/cmake_pch.hxx.pch
        -Xclang -include -Xclang /abs/path/cmake_pch.hxx ...

Both paths needs to be converted to relative path if CCACHE_BASEDIR is
set for better cache hit rate in some CI systems.

2 years agorefactor: Remove dependency on core from util
Joel Rosdahl [Thu, 3 Aug 2023 11:37:25 +0000 (13:37 +0200)] 
refactor: Remove dependency on core from util

2 years agofeat: Include maximum size/files in --print-stats
Joel Rosdahl [Thu, 3 Aug 2023 11:24:32 +0000 (13:24 +0200)] 
feat: Include maximum size/files in --print-stats

New output:

- max_cache_size_kibibyte: maximum size of local storage in KiB (0 for
  no limit)
- max_files_in_cache: maximum number of files in local storage (0 for no
  limit)

Closes #1315.

2 years agorefactor: fs::path-ify ignore_header_paths and related functions
Joel Rosdahl [Thu, 3 Aug 2023 06:44:21 +0000 (08:44 +0200)] 
refactor: fs::path-ify ignore_header_paths and related functions

2 years agobump: Upgrade to fmt 8a4bec5cf53387356738a06ba0cf4fdf086241ae (10.0.0+)
Joel Rosdahl [Wed, 2 Aug 2023 15:20:22 +0000 (17:20 +0200)] 
bump: Upgrade to fmt 8a4bec5cf53387356738a06ba0cf4fdf086241ae (10.0.0+)

2 years agorefactor: fs::path-ify is_ccache_executable
Joel Rosdahl [Wed, 2 Aug 2023 11:01:38 +0000 (13:01 +0200)] 
refactor: fs::path-ify is_ccache_executable

2 years agorefactor: Rename and improve Stat class to util::DirEntry
Joel Rosdahl [Mon, 31 Jul 2023 17:12:30 +0000 (19:12 +0200)] 
refactor: Rename and improve Stat class to util::DirEntry

2 years agorefactor: Move core/wincompat.hpp to util
Joel Rosdahl [Thu, 27 Jul 2023 20:05:27 +0000 (22:05 +0200)] 
refactor: Move core/wincompat.hpp to util

2 years agorefactor: Remove Stat::OnError::throw_error
Joel Rosdahl [Thu, 27 Jul 2023 17:11:09 +0000 (19:11 +0200)] 
refactor: Remove Stat::OnError::throw_error

This is in preparation for moving the Stat class to util where we don't
want to know about core::Error.

2 years agorefactor: Move Util::traverse to util
Joel Rosdahl [Thu, 27 Jul 2023 13:37:10 +0000 (15:37 +0200)] 
refactor: Move Util::traverse to util

2 years agorefactor: Move Util::send_to_fd to core
Joel Rosdahl [Tue, 25 Jul 2023 19:43:15 +0000 (21:43 +0200)] 
refactor: Move Util::send_to_fd to core

2 years agochore: Tweak documentation related to debug level
Joel Rosdahl [Wed, 2 Aug 2023 11:35:49 +0000 (13:35 +0200)] 
chore: Tweak documentation related to debug level

2 years agofeat: Allow specifying debug level (#1312)
dsilakov [Wed, 2 Aug 2023 11:24:49 +0000 (14:24 +0300)] 
feat: Allow specifying debug level (#1312)

Allow specifying debug level via a debug_level option or CCACHE_DEBUGLEVEL
environment variable.

With debug_level=2 (default), ccache behavior's in debug mode is not changed.

With debug_level=1, ccache will only dump *.ccache-log files (and not the
*input* ones). This is useful for getting per-file caching results.

2 years agofix: Work around GCC 12.3 bug 109241
Joel Rosdahl [Tue, 1 Aug 2023 10:30:12 +0000 (12:30 +0200)] 
fix: Work around GCC 12.3 bug 109241

See also #1289.

2 years agorefactor: Remove superfluous util:: qualifications
Joel Rosdahl [Tue, 25 Jul 2023 06:55:14 +0000 (08:55 +0200)] 
refactor: Remove superfluous util:: qualifications

2 years agobump: Upgrade to xxHash 0.8.2
Joel Rosdahl [Mon, 24 Jul 2023 17:18:05 +0000 (19:18 +0200)] 
bump: Upgrade to xxHash 0.8.2

Closes #1085.

2 years agorefactor: Improve util::write_fd usage
Joel Rosdahl [Mon, 24 Jul 2023 13:29:37 +0000 (15:29 +0200)] 
refactor: Improve util::write_fd usage

2 years agorefactor: Improve util::read_file usage
Joel Rosdahl [Mon, 24 Jul 2023 11:51:42 +0000 (13:51 +0200)] 
refactor: Improve util::read_file usage

2 years agorefactor: Improve util::read_fd usage
Joel Rosdahl [Sun, 23 Jul 2023 14:53:25 +0000 (16:53 +0200)] 
refactor: Improve util::read_fd usage

2 years agoenhance: Add util::read_fd variant that returns all data at once
Joel Rosdahl [Sun, 23 Jul 2023 06:50:56 +0000 (08:50 +0200)] 
enhance: Add util::read_fd variant that returns all data at once

2 years agorefactor: Switch to tl::expected instead of nonstd::expected
Joel Rosdahl [Thu, 20 Jul 2023 08:30:06 +0000 (10:30 +0200)] 
refactor: Switch to tl::expected instead of nonstd::expected

2 years agorefactor: Use util::{throw_on_error,value_or_throw}
Joel Rosdahl [Thu, 20 Jul 2023 07:14:53 +0000 (09:14 +0200)] 
refactor: Use util::{throw_on_error,value_or_throw}

2 years agofix: Properly signal error on copy failure
Joel Rosdahl [Wed, 19 Jul 2023 13:55:52 +0000 (15:55 +0200)] 
fix: Properly signal error on copy failure

Restores behavior before 73a4585a58d5ab818a864485708d706532dfa3b4.

2 years agorefactor: Move util::rename to util::filesystem
Joel Rosdahl [Wed, 19 Jul 2023 06:43:38 +0000 (08:43 +0200)] 
refactor: Move util::rename to util::filesystem

2 years agorefactor: Move Util::get_hostname to util
Joel Rosdahl [Wed, 19 Jul 2023 06:33:25 +0000 (08:33 +0200)] 
refactor: Move Util::get_hostname to util

2 years agorefactor: Move Util::get_home_directory to Config
Joel Rosdahl [Tue, 18 Jul 2023 19:25:26 +0000 (21:25 +0200)] 
refactor: Move Util::get_home_directory to Config

2 years agorefactor: Move Util::ensure_dir_exists to util
Joel Rosdahl [Tue, 18 Jul 2023 17:26:13 +0000 (19:26 +0200)] 
refactor: Move Util::ensure_dir_exists to util

2 years agorefactor: Move Util::unlink_* to util
Joel Rosdahl [Tue, 18 Jul 2023 12:06:37 +0000 (14:06 +0200)] 
refactor: Move Util::unlink_* to util

2 years agorefactor: Let util::rename return std::error_code
Joel Rosdahl [Tue, 18 Jul 2023 08:19:05 +0000 (10:19 +0200)] 
refactor: Let util::rename return std::error_code

2 years agorefactor: Move Util::is_ccache_executable to ccache
Joel Rosdahl [Mon, 17 Jul 2023 16:46:27 +0000 (18:46 +0200)] 
refactor: Move Util::is_ccache_executable to ccache

2 years agochore: Clean up config.h
Joel Rosdahl [Mon, 17 Jul 2023 16:36:06 +0000 (18:36 +0200)] 
chore: Clean up config.h

2 years agorefactor: Move Util::localtime to util
Joel Rosdahl [Mon, 17 Jul 2023 13:46:19 +0000 (15:46 +0200)] 
refactor: Move Util::localtime to util

2 years agochore: Improve code style
Joel Rosdahl [Mon, 17 Jul 2023 13:41:06 +0000 (15:41 +0200)] 
chore: Improve code style

2 years agorefactor: Move Util::is_precompiled_header to argprocessing
Joel Rosdahl [Mon, 17 Jul 2023 13:38:57 +0000 (15:38 +0200)] 
refactor: Move Util::is_precompiled_header to argprocessing

2 years agorefactor: Move Util::to_lowercase to util
Joel Rosdahl [Mon, 17 Jul 2023 13:27:07 +0000 (15:27 +0200)] 
refactor: Move Util::to_lowercase to util

2 years agochore: Add note about using util::rename instead of fs::rename
Joel Rosdahl [Mon, 17 Jul 2023 10:36:15 +0000 (12:36 +0200)] 
chore: Add note about using util::rename instead of fs::rename

2 years agorefactor: Use std::filesystem::current_path
Joel Rosdahl [Mon, 17 Jul 2023 07:10:16 +0000 (09:10 +0200)] 
refactor: Use std::filesystem::current_path

2 years agorefactor: Improve std::filesystem wrappers
Joel Rosdahl [Mon, 17 Jul 2023 07:06:05 +0000 (09:06 +0200)] 
refactor: Improve std::filesystem wrappers

I couldn't figure out how to make the templated versions support both

    path current_path();

and

    void current_path(const path& p);

so using preprocessor macros instead.

2 years agorefactor: Use std::filesystem::remove_all
Joel Rosdahl [Sun, 16 Jul 2023 16:26:45 +0000 (18:26 +0200)] 
refactor: Use std::filesystem::remove_all

2 years agochore: Improve util::format_argv_for_logging
Joel Rosdahl [Sun, 16 Jul 2023 15:36:58 +0000 (17:36 +0200)] 
chore: Improve util::format_argv_for_logging

2 years agorefactor: Move Util::format_argv_for_logging to util
Joel Rosdahl [Sun, 16 Jul 2023 15:26:23 +0000 (17:26 +0200)] 
refactor: Move Util::format_argv_for_logging to util

2 years agorefactor: Move Util::get_{actual,apparent}_cwd to util
Joel Rosdahl [Sun, 16 Jul 2023 12:48:36 +0000 (14:48 +0200)] 
refactor: Move Util::get_{actual,apparent}_cwd to util

2 years agorefactor: Use std::filesystem::create_director{ies,y}
Joel Rosdahl [Sun, 16 Jul 2023 08:22:06 +0000 (10:22 +0200)] 
refactor: Use std::filesystem::create_director{ies,y}

2 years agorefactor: Move Util::split_into_* to util
Joel Rosdahl [Sun, 16 Jul 2023 07:18:57 +0000 (09:18 +0200)] 
refactor: Move Util::split_into_* to util

2 years agorefactor: Move Util::size_change_kibibyte to LocalStorage
Joel Rosdahl [Sun, 16 Jul 2023 07:13:52 +0000 (09:13 +0200)] 
refactor: Move Util::size_change_kibibyte to LocalStorage

2 years agorefactor: Move Util::set_cloexec_flag to util
Joel Rosdahl [Sat, 15 Jul 2023 19:04:51 +0000 (21:04 +0200)] 
refactor: Move Util::set_cloexec_flag to util

2 years agorefactor: Create util::filesystem wrappers returning nonstd::expected
Joel Rosdahl [Sat, 15 Jul 2023 14:06:31 +0000 (16:06 +0200)] 
refactor: Create util::filesystem wrappers returning nonstd::expected

2 years agorefactor: Move Util::fallocate to util
Joel Rosdahl [Sat, 15 Jul 2023 08:41:25 +0000 (10:41 +0200)] 
refactor: Move Util::fallocate to util

2 years agochore: Fix grammar in comment
Joel Rosdahl [Fri, 14 Jul 2023 18:50:52 +0000 (20:50 +0200)] 
chore: Fix grammar in comment

2 years agorefactor: Move UmaskScope to util
Joel Rosdahl [Fri, 14 Jul 2023 18:46:37 +0000 (20:46 +0200)] 
refactor: Move UmaskScope to util

2 years agorefactor: Move Util::{g,s}et_umask to util
Joel Rosdahl [Fri, 14 Jul 2023 18:43:28 +0000 (20:43 +0200)] 
refactor: Move Util::{g,s}et_umask to util

2 years agorefactor: Use fs alias for std::filesystem
Joel Rosdahl [Fri, 14 Jul 2023 18:33:24 +0000 (20:33 +0200)] 
refactor: Use fs alias for std::filesystem

2 years agofix: Pass error code to fs::temp_directory_path as intended
Joel Rosdahl [Fri, 14 Jul 2023 15:15:30 +0000 (17:15 +0200)] 
fix: Pass error code to fs::temp_directory_path as intended

As noted by Thibault Odorico.

2 years agorefactor: Move Util::parse_duration to util
Joel Rosdahl [Fri, 14 Jul 2023 06:14:09 +0000 (08:14 +0200)] 
refactor: Move Util::parse_duration to util

2 years agorefactor: Use std::filesystem::current_path
Joel Rosdahl [Wed, 12 Jul 2023 19:20:04 +0000 (21:20 +0200)] 
refactor: Use std::filesystem::current_path

2 years agorefactor: Use std::filesystem::canonical
Joel Rosdahl [Wed, 12 Jul 2023 19:15:31 +0000 (21:15 +0200)] 
refactor: Use std::filesystem::canonical

2 years agorefactor: Use std::filesystem::temp_directory_path
Joel Rosdahl [Wed, 12 Jul 2023 18:42:42 +0000 (20:42 +0200)] 
refactor: Use std::filesystem::temp_directory_path

2 years agochore: Tweak code style
Joel Rosdahl [Wed, 12 Jul 2023 11:57:07 +0000 (13:57 +0200)] 
chore: Tweak code style

2 years agobump: Upgrade to hiredis 1.2.0
Joel Rosdahl [Wed, 12 Jul 2023 09:18:07 +0000 (11:18 +0200)] 
bump: Upgrade to hiredis 1.2.0