From 1b9353dcccf14d97a79db944e9be75d56be482fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kalle=20Kiet=C3=A4v=C3=A4inen?= <1026741+kietavainen@users.noreply.github.com> Date: Fri, 20 Dec 2024 14:13:23 +0200 Subject: [PATCH 01/76] Fix suppressing news nag after reading the news (#3731) --- src/commands/CmdNews.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/CmdNews.cpp b/src/commands/CmdNews.cpp index 3f667fb81..9f1c60df0 100644 --- a/src/commands/CmdNews.cpp +++ b/src/commands/CmdNews.cpp @@ -642,7 +642,7 @@ bool CmdNews::should_nag() { Version current_version = Version::Current(); if (news_version == current_version) { - return true; + return false; } // Check if there are actually any interesting news items to show. From 3bf020060215e8432d2d543961aca78ed742be24 Mon Sep 17 00:00:00 2001 From: Tejada-Omar <72728094+Tejada-Omar@users.noreply.github.com> Date: Mon, 23 Dec 2024 09:34:51 -0700 Subject: [PATCH 02/76] Consider news read if `news.version` > current version (#3734) Avoids two installations of taskwarrior with differing versions from constantly nagging and rewriting `news.version` --- src/commands/CmdNews.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/CmdNews.cpp b/src/commands/CmdNews.cpp index 9f1c60df0..27202ff64 100644 --- a/src/commands/CmdNews.cpp +++ b/src/commands/CmdNews.cpp @@ -593,7 +593,7 @@ int CmdNews::execute(std::string& output) { std::cout << outro.str(); // Set a mark in the config to remember which version's release notes were displayed - if (news_version != current_version) { + if (news_version < current_version) { CmdConfig::setConfigVariable("news.version", std::string(current_version), false); // Revert back to default signal handling after displaying the outro @@ -641,7 +641,7 @@ bool CmdNews::should_nag() { Version current_version = Version::Current(); - if (news_version == current_version) { + if (news_version >= current_version) { return false; } From 9105985c7c0c8f24da8150c5c2d5e8d3e044ed9b Mon Sep 17 00:00:00 2001 From: jrmarino Date: Tue, 31 Dec 2024 11:28:48 -0600 Subject: [PATCH 03/76] Add offline build notes to INSTALL (#3705) (#3740) Document additional steps that have been successful for NixOS and Ravenports. --- INSTALL | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/INSTALL b/INSTALL index 620fe76f1..3d89be316 100644 --- a/INSTALL +++ b/INSTALL @@ -110,6 +110,43 @@ If Taskwarrior will not build on your system, first take a look at the Operating System notes below. If this doesn't help, then go to the Troubleshooting section, which includes instructions on how to contact us for help. +Offline Build Notes +------------------- + +It is common for packaging systems (e.g. NixOS, FreeBSD Ports Collection, pkgsrc, etc) +to disable networking during builds. This restriction requires all distribution files +to be prepositioned after checksum verification as a prerequisite for the build. The +following steps have been successful in allowing Taskwarrior to be built in this +environment: + +1. Extract all crates in a known location, e.g. ${WRKDIR}/cargo-crates +This includes crates needed for corrosion (search for Cargo.lock files) + +2. Create .cargo-checksum.json for each crate +For example: +printf '{"package":"%s","files":{}}' $(sha256 -q ${DISTDIR}/rayon-core-1.12.1.tar.gz) \ + > ${WRKDIR}/cargo-crates/rayon-core-1.12.1/.cargo-checksum.json + +3. Create a custom config.toml file +For example, ${WRKDIR}/.cargo/config.toml +[source.cargo] +directory = '${WRKDIR}/cargo-crates' +[source.crates-io] +replace-with = 'cargo' + +4. After running cmake, configure cargo +For example: +cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${CARGO_ENV} \ + /usr/local/bin/cargo update \ + --manifest-path ${WRKDIR}/.cargo/config.toml \ + --verbose + +5. Set CARGO_HOME in environment +For example +CARGO_HOME=${WRKDIR}/.cargo + +The build and installation steps should be the same as a standard build +at this point. Operating System Notes ---------------------- From 630585d7b4b6c14f7f1783ec017c702319230dac Mon Sep 17 00:00:00 2001 From: Karl <51945878+grasegger@users.noreply.github.com> Date: Tue, 31 Dec 2024 19:51:35 +0100 Subject: [PATCH 04/76] Update git log in CMakeLists.txt to not include potential signatures (#3742) --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 25ed4d9eb..a6cbadc3f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,7 +37,7 @@ endif (EXISTS ${CMAKE_SOURCE_DIR}/src/libshared/src AND EXISTS ${CMAKE_SOURCE_DI message ("-- Looking for SHA1 references") if (EXISTS ${CMAKE_SOURCE_DIR}/.git/index) set (HAVE_COMMIT true) - execute_process (COMMAND git log -1 --pretty=format:%h + execute_process (COMMAND git log -1 --pretty=format:%h --no-show-signature WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE COMMIT) configure_file ( ${CMAKE_SOURCE_DIR}/commit.h.in From ddeec3512aeb8cd09019a5f5d23f652cb461d33a Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Wed, 1 Jan 2025 13:29:17 -0500 Subject: [PATCH 05/76] Add more CMake options to INSTALL (#3743) --- INSTALL | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/INSTALL b/INSTALL index 3d89be316..d46e67d10 100644 --- a/INSTALL +++ b/INSTALL @@ -89,6 +89,11 @@ get absolute installation directories: CMAKE_INSTALL_PREFIX/TASK_MAN1DIR /usr/local/share/man/man1 CMAKE_INSTALL_PREFIX/TASK_MAN5DIR /usr/local/share/man/man5 +The following variables control aspects of the build process: + + SYSTEM_CORROSION - Use system provided corrosion instead of vendored version + ENABLE_TLS_NATIVE_ROOTS - Use the system's TLS root certificates + Uninstallation -------------- From ae3651fd3f41650ba96cb521a216c753c2c2561d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 12:48:12 -0500 Subject: [PATCH 06/76] [pre-commit.ci] pre-commit autoupdate (#3748) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/mirrors-clang-format: v19.1.5 → v19.1.6](https://github.com/pre-commit/mirrors-clang-format/compare/v19.1.5...v19.1.6) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5d0002cdf..ea9333263 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: check-yaml - id: check-added-large-files - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v19.1.5 + rev: v19.1.6 hooks: - id: clang-format types_or: [c++, c] From 2e5177aa7c8833d334c9877ab57d66755474a22e Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Mon, 6 Jan 2025 13:29:19 -0500 Subject: [PATCH 07/76] Update to TaskChampion 2.0.2 (#3746) --- .github/workflows/checks.yml | 2 +- .github/workflows/tests.yaml | 2 +- Cargo.lock | 4 ++-- INSTALL | 2 +- src/taskchampion-cpp/Cargo.toml | 4 ++-- src/taskchampion-cpp/src/lib.rs | 1 + 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index c5a065868..78d5c74ee 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -32,7 +32,7 @@ jobs: # If this version is old enough to cause errors, or older than the # TaskChampion MSRV, bump it to the MSRV of the currently-required # TaskChampion package; if necessary, bump that version as well. - toolchain: "1.78.0" # MSRV + toolchain: "1.81.0" # MSRV override: true - uses: actions-rs/cargo@v1.0.3 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index e17926ee9..78c6b74dc 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -119,7 +119,7 @@ jobs: # TaskChampion MSRV, bump it to the MSRV of the currently-required # TaskChampion package; if necessary, bump that version as well. # This should match the MSRV in `src/taskchampion-cpp/Cargo.toml`. - toolchain: "1.78.0" # MSRV + toolchain: "1.81.0" # MSRV override: true - uses: actions-rs/cargo@v1.0.3 diff --git a/Cargo.lock b/Cargo.lock index 56f3ab7a8..b2120f98a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2553,9 +2553,9 @@ dependencies = [ [[package]] name = "taskchampion" -version = "1.0.2" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4e41712ec2dd9cb5e7f4f20daf13a8e0937a927fb886153f2523a6686c35983" +checksum = "830bb062bb2d89bdee0063d7c02d1e24ee0a1702c683f394eb0520fb88dc4a5c" dependencies = [ "anyhow", "aws-config", diff --git a/INSTALL b/INSTALL index d46e67d10..1635fbb9e 100644 --- a/INSTALL +++ b/INSTALL @@ -22,7 +22,7 @@ You will need the following libraries: - libuuid (not needed for OSX) You will need a Rust toolchain of the Minimum Supported Rust Version (MSRV): - - rust 1.78.0 + - rust 1.81.0 Basic Installation ------------------ diff --git a/src/taskchampion-cpp/Cargo.toml b/src/taskchampion-cpp/Cargo.toml index b806f986f..13ee8920d 100644 --- a/src/taskchampion-cpp/Cargo.toml +++ b/src/taskchampion-cpp/Cargo.toml @@ -3,13 +3,13 @@ name = "taskchampion-lib" version = "0.1.0" edition = "2021" publish = false -rust-version = "1.78.0" # MSRV +rust-version = "1.81.0" # MSRV [lib] crate-type = ["staticlib"] [dependencies] -taskchampion = "=1.0.2" +taskchampion = "=2.0.2" cxx = "1.0.133" [features] diff --git a/src/taskchampion-cpp/src/lib.rs b/src/taskchampion-cpp/src/lib.rs index 6fb8ace0a..66017fc59 100644 --- a/src/taskchampion-cpp/src/lib.rs +++ b/src/taskchampion-cpp/src/lib.rs @@ -494,6 +494,7 @@ fn new_replica_on_disk( let storage = tc::StorageConfig::OnDisk { taskdb_dir: PathBuf::from(taskdb_dir), create_if_missing, + access_mode: tc::storage::AccessMode::ReadWrite, } .into_storage()?; Ok(Box::new(tc::Replica::new(storage).into())) From ffcd1c0d79d593cd84fff9a8e9e5334308fba24f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 08:32:46 -0500 Subject: [PATCH 08/76] Bump docker/build-push-action from 6.10.0 to 6.11.0 (#3755) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.10.0 to 6.11.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v6.10.0...v6.11.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index 9bbdc6dba..d774bd3ed 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -44,7 +44,7 @@ jobs: - name: Build and push Taskwarrior Docker image id: build-and-push - uses: docker/build-push-action@v6.10.0 + uses: docker/build-push-action@v6.11.0 with: context: . file: "./docker/task.dockerfile" From 1c9dddcae7d7b7009aad68c6e7d31e6e483a629e Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Mon, 13 Jan 2025 08:33:06 -0500 Subject: [PATCH 09/76] Remove unused, undefined method TDB2::dump (#3754) --- src/TDB2.cpp | 5 ----- src/TDB2.h | 2 -- 2 files changed, 7 deletions(-) diff --git a/src/TDB2.cpp b/src/TDB2.cpp index aab85a8e9..2e37640ef 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -450,11 +450,6 @@ int TDB2::num_local_changes() { return (int)replica()->num_local_operations(); } //////////////////////////////////////////////////////////////////////////////// int TDB2::num_reverts_possible() { return (int)replica()->num_undo_points(); } -//////////////////////////////////////////////////////////////////////////////// -void TDB2::dump() { - // TODO -} - //////////////////////////////////////////////////////////////////////////////// // For any task that has depenencies, follow the chain of dependencies until the // end. Along the way, update the Task::is_blocked and Task::is_blocking data diff --git a/src/TDB2.h b/src/TDB2.h index 69ffd0f20..3dafe6748 100644 --- a/src/TDB2.h +++ b/src/TDB2.h @@ -72,8 +72,6 @@ class TDB2 { int num_local_changes(); int num_reverts_possible(); - void dump(); - rust::Box &replica(); private: From aeeec16984eaa3e7f01385f908441fcc8dfc07b8 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Sat, 18 Jan 2025 02:20:41 -0500 Subject: [PATCH 10/76] Handle 'until' and 'recur' simiar to handling of 'gc' (#3753) This centralizes updates to recurrence and 'until' in Command, instead of doing so in each individual command implementation. This is preparatory to opening the TaskChampion replica in read-only mode. --- src/Context.cpp | 7 ++++++- src/commands/CmdAdd.cpp | 1 + src/commands/CmdAliases.cpp | 1 + src/commands/CmdAnnotate.cpp | 1 + src/commands/CmdAppend.cpp | 1 + src/commands/CmdAttributes.cpp | 1 + src/commands/CmdBurndown.cpp | 9 +++------ src/commands/CmdCalc.cpp | 1 + src/commands/CmdCalendar.cpp | 3 +-- src/commands/CmdColor.cpp | 1 + src/commands/CmdColumns.cpp | 2 ++ src/commands/CmdCommands.cpp | 14 +++++++++----- src/commands/CmdConfig.cpp | 2 ++ src/commands/CmdContext.cpp | 2 ++ src/commands/CmdCount.cpp | 3 +-- src/commands/CmdCustom.cpp | 5 +---- src/commands/CmdDelete.cpp | 1 + src/commands/CmdDenotate.cpp | 1 + src/commands/CmdDiagnostics.cpp | 1 + src/commands/CmdDone.cpp | 1 + src/commands/CmdDuplicate.cpp | 1 + src/commands/CmdEdit.cpp | 1 + src/commands/CmdExec.cpp | 1 + src/commands/CmdExport.cpp | 5 +---- src/commands/CmdGet.cpp | 1 + src/commands/CmdHelp.cpp | 1 + src/commands/CmdHistory.cpp | 1 + src/commands/CmdIDs.cpp | 8 ++++++-- src/commands/CmdImport.cpp | 1 + src/commands/CmdImportV2.cpp | 1 + src/commands/CmdInfo.cpp | 1 + src/commands/CmdLog.cpp | 1 + src/commands/CmdLogo.cpp | 1 + src/commands/CmdModify.cpp | 1 + src/commands/CmdNews.cpp | 1 + src/commands/CmdPrepend.cpp | 1 + src/commands/CmdProjects.cpp | 6 ++---- src/commands/CmdPurge.cpp | 1 + src/commands/CmdReports.cpp | 1 + src/commands/CmdShow.cpp | 1 + src/commands/CmdStart.cpp | 1 + src/commands/CmdStats.cpp | 1 + src/commands/CmdStop.cpp | 1 + src/commands/CmdSummary.cpp | 3 +-- src/commands/CmdSync.cpp | 1 + src/commands/CmdTags.cpp | 2 ++ src/commands/CmdTimesheet.cpp | 3 +-- src/commands/CmdUDAs.cpp | 2 ++ src/commands/CmdUndo.cpp | 1 + src/commands/CmdUnique.cpp | 1 + src/commands/CmdUrgency.cpp | 1 + src/commands/CmdVersion.cpp | 2 ++ src/commands/Command.cpp | 4 ++++ src/commands/Command.h | 2 ++ src/main.h | 3 --- test/commands.test.py | 4 ++-- 56 files changed, 87 insertions(+), 39 deletions(-) diff --git a/src/Context.cpp b/src/Context.cpp index 532a2699b..ed4c65770 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -852,7 +852,7 @@ int Context::dispatch(std::string& out) { Command* c = commands[command]; assert(c); - // The command know whether they need a GC. + // The command know whether they need a GC or recurrence update. if (c->needs_gc()) { tdb2.gc(); } @@ -869,6 +869,11 @@ int Context::dispatch(std::string& out) { if (config.getBoolean("debug") && config.getInteger("debug.parser") == 1) debug(cli2.dump("Parse Tree (before command-specifіc processing)")); + if (c->needs_recur_update()) { + handleUntil(); + handleRecurrence(); + } + return c->execute(out); } diff --git a/src/commands/CmdAdd.cpp b/src/commands/CmdAdd.cpp index 6661c3d2f..5778ab737 100644 --- a/src/commands/CmdAdd.cpp +++ b/src/commands/CmdAdd.cpp @@ -40,6 +40,7 @@ CmdAdd::CmdAdd() { _read_only = false; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = true; _accepts_filter = false; _accepts_modifications = true; diff --git a/src/commands/CmdAliases.cpp b/src/commands/CmdAliases.cpp index 3554a7ee6..758365a95 100644 --- a/src/commands/CmdAliases.cpp +++ b/src/commands/CmdAliases.cpp @@ -39,6 +39,7 @@ CmdCompletionAliases::CmdCompletionAliases() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/CmdAnnotate.cpp b/src/commands/CmdAnnotate.cpp index 73bbb8882..f5a193236 100644 --- a/src/commands/CmdAnnotate.cpp +++ b/src/commands/CmdAnnotate.cpp @@ -44,6 +44,7 @@ CmdAnnotate::CmdAnnotate() { _read_only = false; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = true; _accepts_modifications = true; diff --git a/src/commands/CmdAppend.cpp b/src/commands/CmdAppend.cpp index d6b68fab2..ac9e35ae9 100644 --- a/src/commands/CmdAppend.cpp +++ b/src/commands/CmdAppend.cpp @@ -44,6 +44,7 @@ CmdAppend::CmdAppend() { _read_only = false; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = true; _accepts_modifications = true; diff --git a/src/commands/CmdAttributes.cpp b/src/commands/CmdAttributes.cpp index bc7778572..553b9476d 100644 --- a/src/commands/CmdAttributes.cpp +++ b/src/commands/CmdAttributes.cpp @@ -42,6 +42,7 @@ CmdZshAttributes::CmdZshAttributes() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/CmdBurndown.cpp b/src/commands/CmdBurndown.cpp index eb2a5e2e9..b05af87f3 100644 --- a/src/commands/CmdBurndown.cpp +++ b/src/commands/CmdBurndown.cpp @@ -767,6 +767,7 @@ CmdBurndownMonthly::CmdBurndownMonthly() { _read_only = true; _displays_id = false; _needs_gc = true; + _needs_recur_update = true; _uses_context = true; _accepts_filter = true; _accepts_modifications = false; @@ -779,8 +780,6 @@ int CmdBurndownMonthly::execute(std::string& output) { int rc = 0; // Scan the pending tasks, applying any filter. - handleUntil(); - handleRecurrence(); Filter filter; std::vector filtered; filter.subset(filtered); @@ -801,6 +800,7 @@ CmdBurndownWeekly::CmdBurndownWeekly() { _read_only = true; _displays_id = false; _needs_gc = true; + _needs_recur_update = true; _uses_context = true; _accepts_filter = true; _accepts_modifications = false; @@ -813,8 +813,6 @@ int CmdBurndownWeekly::execute(std::string& output) { int rc = 0; // Scan the pending tasks, applying any filter. - handleUntil(); - handleRecurrence(); Filter filter; std::vector filtered; filter.subset(filtered); @@ -835,6 +833,7 @@ CmdBurndownDaily::CmdBurndownDaily() { _read_only = true; _displays_id = false; _needs_gc = true; + _needs_recur_update = true; _uses_context = true; _accepts_filter = true; _accepts_modifications = false; @@ -847,8 +846,6 @@ int CmdBurndownDaily::execute(std::string& output) { int rc = 0; // Scan the pending tasks, applying any filter. - handleUntil(); - handleRecurrence(); Filter filter; std::vector filtered; filter.subset(filtered); diff --git a/src/commands/CmdCalc.cpp b/src/commands/CmdCalc.cpp index 3ed55e408..562b6d300 100644 --- a/src/commands/CmdCalc.cpp +++ b/src/commands/CmdCalc.cpp @@ -37,6 +37,7 @@ CmdCalc::CmdCalc() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/CmdCalendar.cpp b/src/commands/CmdCalendar.cpp index 88129a44f..bf365d262 100644 --- a/src/commands/CmdCalendar.cpp +++ b/src/commands/CmdCalendar.cpp @@ -49,6 +49,7 @@ CmdCalendar::CmdCalendar() { _read_only = true; _displays_id = true; _needs_gc = true; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; @@ -80,8 +81,6 @@ int CmdCalendar::execute(std::string& output) { monthsPerLine = preferredMonthsPerLine; // Load the pending tasks. - handleUntil(); - handleRecurrence(); auto tasks = Context::getContext().tdb2.pending_tasks(); Datetime today; diff --git a/src/commands/CmdColor.cpp b/src/commands/CmdColor.cpp index bb0d7f548..53e672df6 100644 --- a/src/commands/CmdColor.cpp +++ b/src/commands/CmdColor.cpp @@ -45,6 +45,7 @@ CmdColor::CmdColor() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/CmdColumns.cpp b/src/commands/CmdColumns.cpp index 2b2e32bfb..bf5e00f24 100644 --- a/src/commands/CmdColumns.cpp +++ b/src/commands/CmdColumns.cpp @@ -45,6 +45,7 @@ CmdColumns::CmdColumns() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; @@ -119,6 +120,7 @@ CmdCompletionColumns::CmdCompletionColumns() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/CmdCommands.cpp b/src/commands/CmdCommands.cpp index 4676f57ae..6fb44876d 100644 --- a/src/commands/CmdCommands.cpp +++ b/src/commands/CmdCommands.cpp @@ -45,6 +45,7 @@ CmdCommands::CmdCommands() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; @@ -61,6 +62,7 @@ int CmdCommands::execute(std::string& output) { view.add("R/W", false); view.add("ID", false); view.add("GC", false); + view.add("Recur", false); view.add("Context", false); view.add("Filter", false); view.add("Mods", false); @@ -85,15 +87,17 @@ int CmdCommands::execute(std::string& output) { if (command.second->needs_gc()) view.set(row, 4, "GC"); - if (command.second->uses_context()) view.set(row, 5, "Ctxt"); + if (command.second->needs_recur_update()) view.set(row, 5, "Recur"); - if (command.second->accepts_filter()) view.set(row, 6, "Filt"); + if (command.second->uses_context()) view.set(row, 6, "Ctxt"); - if (command.second->accepts_modifications()) view.set(row, 7, "Mods"); + if (command.second->accepts_filter()) view.set(row, 7, "Filt"); - if (command.second->accepts_miscellaneous()) view.set(row, 8, "Misc"); + if (command.second->accepts_modifications()) view.set(row, 8, "Mods"); - view.set(row, 9, command.second->description()); + if (command.second->accepts_miscellaneous()) view.set(row, 9, "Misc"); + + view.set(row, 10, command.second->description()); } output = optionalBlankLine() + view.render() + optionalBlankLine() + '\n'; diff --git a/src/commands/CmdConfig.cpp b/src/commands/CmdConfig.cpp index 543bf1432..99270f033 100644 --- a/src/commands/CmdConfig.cpp +++ b/src/commands/CmdConfig.cpp @@ -44,6 +44,7 @@ CmdConfig::CmdConfig() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; @@ -217,6 +218,7 @@ CmdCompletionConfig::CmdCompletionConfig() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/CmdContext.cpp b/src/commands/CmdContext.cpp index adcff94c7..77bc3152d 100644 --- a/src/commands/CmdContext.cpp +++ b/src/commands/CmdContext.cpp @@ -49,6 +49,7 @@ CmdContext::CmdContext() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; @@ -414,6 +415,7 @@ CmdCompletionContext::CmdCompletionContext() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/CmdCount.cpp b/src/commands/CmdCount.cpp index 0da28bc1b..3c158c225 100644 --- a/src/commands/CmdCount.cpp +++ b/src/commands/CmdCount.cpp @@ -40,6 +40,7 @@ CmdCount::CmdCount() { _read_only = true; _displays_id = false; _needs_gc = true; + _needs_recur_update = true; _uses_context = true; _accepts_filter = true; _accepts_modifications = false; @@ -50,8 +51,6 @@ CmdCount::CmdCount() { //////////////////////////////////////////////////////////////////////////////// int CmdCount::execute(std::string& output) { // Apply filter. - handleUntil(); - handleRecurrence(); Filter filter; std::vector filtered; filter.subset(filtered); diff --git a/src/commands/CmdCustom.cpp b/src/commands/CmdCustom.cpp index f2ee70c66..9babfe668 100644 --- a/src/commands/CmdCustom.cpp +++ b/src/commands/CmdCustom.cpp @@ -55,6 +55,7 @@ CmdCustom::CmdCustom(const std::string& keyword, const std::string& usage, _read_only = true; _displays_id = true; _needs_gc = true; + _needs_recur_update = true; _uses_context = true; _accepts_filter = true; _accepts_modifications = false; @@ -100,10 +101,6 @@ int CmdCustom::execute(std::string& output) { // Add the report filter to any existing filter. if (reportFilter != "") Context::getContext().cli2.addFilter(reportFilter); - // Make sure reccurent tasks are generated. - handleUntil(); - handleRecurrence(); - // Apply filter. Filter filter; std::vector filtered; diff --git a/src/commands/CmdDelete.cpp b/src/commands/CmdDelete.cpp index 3026bd05d..b3ac931cb 100644 --- a/src/commands/CmdDelete.cpp +++ b/src/commands/CmdDelete.cpp @@ -49,6 +49,7 @@ CmdDelete::CmdDelete() { _displays_id = false; _needs_confirm = true; _needs_gc = false; + _needs_recur_update = false; _uses_context = true; _accepts_filter = true; _accepts_modifications = true; diff --git a/src/commands/CmdDenotate.cpp b/src/commands/CmdDenotate.cpp index 363834843..e8a43ad63 100644 --- a/src/commands/CmdDenotate.cpp +++ b/src/commands/CmdDenotate.cpp @@ -49,6 +49,7 @@ CmdDenotate::CmdDenotate() { _read_only = false; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = true; _accepts_filter = true; _accepts_modifications = false; diff --git a/src/commands/CmdDiagnostics.cpp b/src/commands/CmdDiagnostics.cpp index e4ac10bae..8baa39537 100644 --- a/src/commands/CmdDiagnostics.cpp +++ b/src/commands/CmdDiagnostics.cpp @@ -50,6 +50,7 @@ CmdDiagnostics::CmdDiagnostics() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/CmdDone.cpp b/src/commands/CmdDone.cpp index 1e3638d33..d1ea64adb 100644 --- a/src/commands/CmdDone.cpp +++ b/src/commands/CmdDone.cpp @@ -44,6 +44,7 @@ CmdDone::CmdDone() { _read_only = false; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = true; _accepts_filter = true; _accepts_modifications = true; diff --git a/src/commands/CmdDuplicate.cpp b/src/commands/CmdDuplicate.cpp index 381d6c368..b6a68854d 100644 --- a/src/commands/CmdDuplicate.cpp +++ b/src/commands/CmdDuplicate.cpp @@ -44,6 +44,7 @@ CmdDuplicate::CmdDuplicate() { _read_only = false; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = true; _accepts_filter = true; _accepts_modifications = true; diff --git a/src/commands/CmdEdit.cpp b/src/commands/CmdEdit.cpp index acdd1ce4c..b7890bdee 100644 --- a/src/commands/CmdEdit.cpp +++ b/src/commands/CmdEdit.cpp @@ -64,6 +64,7 @@ CmdEdit::CmdEdit() { _read_only = false; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = true; _accepts_filter = true; _accepts_modifications = false; diff --git a/src/commands/CmdExec.cpp b/src/commands/CmdExec.cpp index 3391f0447..c3457cf67 100644 --- a/src/commands/CmdExec.cpp +++ b/src/commands/CmdExec.cpp @@ -40,6 +40,7 @@ CmdExec::CmdExec() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/CmdExport.cpp b/src/commands/CmdExport.cpp index a51f6428e..c697ff221 100644 --- a/src/commands/CmdExport.cpp +++ b/src/commands/CmdExport.cpp @@ -42,6 +42,7 @@ CmdExport::CmdExport() { _read_only = true; _displays_id = true; _needs_gc = true; + _needs_recur_update = true; _uses_context = false; _accepts_filter = true; _accepts_modifications = false; @@ -82,10 +83,6 @@ int CmdExport::execute(std::string& output) { // Add the report filter to any existing filter. if (reportFilter != "") Context::getContext().cli2.addFilter(reportFilter); - // Make sure reccurent tasks are generated. - handleUntil(); - handleRecurrence(); - // Apply filter. Filter filter; std::vector filtered; diff --git a/src/commands/CmdGet.cpp b/src/commands/CmdGet.cpp index c6114cc28..2954e6848 100644 --- a/src/commands/CmdGet.cpp +++ b/src/commands/CmdGet.cpp @@ -43,6 +43,7 @@ CmdGet::CmdGet() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/CmdHelp.cpp b/src/commands/CmdHelp.cpp index 033b12789..c66715bff 100644 --- a/src/commands/CmdHelp.cpp +++ b/src/commands/CmdHelp.cpp @@ -44,6 +44,7 @@ CmdHelp::CmdHelp() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/CmdHistory.cpp b/src/commands/CmdHistory.cpp index 4449aea13..d6f1f9147 100644 --- a/src/commands/CmdHistory.cpp +++ b/src/commands/CmdHistory.cpp @@ -55,6 +55,7 @@ CmdHistoryBase::CmdHistoryBase() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = true; _accepts_filter = true; _accepts_modifications = false; diff --git a/src/commands/CmdIDs.cpp b/src/commands/CmdIDs.cpp index 36024163c..acb2df9e7 100644 --- a/src/commands/CmdIDs.cpp +++ b/src/commands/CmdIDs.cpp @@ -46,6 +46,7 @@ CmdIDs::CmdIDs() { _read_only = true; _displays_id = true; _needs_gc = true; + _needs_recur_update = true; _uses_context = false; _accepts_filter = true; _accepts_modifications = false; @@ -56,8 +57,6 @@ CmdIDs::CmdIDs() { //////////////////////////////////////////////////////////////////////////////// int CmdIDs::execute(std::string& output) { // Apply filter. - handleUntil(); - handleRecurrence(); Filter filter; std::vector filtered; filter.subset(filtered); @@ -127,6 +126,7 @@ CmdCompletionIds::CmdCompletionIds() { _read_only = true; _displays_id = true; _needs_gc = true; + _needs_recur_update = true; _uses_context = false; _accepts_filter = true; _accepts_modifications = false; @@ -163,6 +163,7 @@ CmdZshCompletionIds::CmdZshCompletionIds() { _read_only = true; _displays_id = true; _needs_gc = true; + _needs_recur_update = true; _uses_context = false; _accepts_filter = true; _accepts_modifications = false; @@ -199,6 +200,7 @@ CmdUUIDs::CmdUUIDs() { _read_only = true; _displays_id = false; _needs_gc = true; + _needs_recur_update = true; _uses_context = false; _accepts_filter = true; _accepts_modifications = false; @@ -234,6 +236,7 @@ CmdCompletionUuids::CmdCompletionUuids() { _read_only = true; _displays_id = false; _needs_gc = true; + _needs_recur_update = true; _uses_context = false; _accepts_filter = true; _accepts_modifications = false; @@ -269,6 +272,7 @@ CmdZshCompletionUuids::CmdZshCompletionUuids() { _read_only = true; _displays_id = false; _needs_gc = true; + _needs_recur_update = true; _uses_context = false; _accepts_filter = true; _accepts_modifications = false; diff --git a/src/commands/CmdImport.cpp b/src/commands/CmdImport.cpp index 31a2e141a..b3ccc0c2a 100644 --- a/src/commands/CmdImport.cpp +++ b/src/commands/CmdImport.cpp @@ -45,6 +45,7 @@ CmdImport::CmdImport() { _read_only = false; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/CmdImportV2.cpp b/src/commands/CmdImportV2.cpp index e34e597a2..a4619fdce 100644 --- a/src/commands/CmdImportV2.cpp +++ b/src/commands/CmdImportV2.cpp @@ -46,6 +46,7 @@ CmdImportV2::CmdImportV2() { _read_only = false; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/CmdInfo.cpp b/src/commands/CmdInfo.cpp index cfb3263e8..7ffb56942 100644 --- a/src/commands/CmdInfo.cpp +++ b/src/commands/CmdInfo.cpp @@ -59,6 +59,7 @@ CmdInfo::CmdInfo() { // Once the test suite is completely modified, this can be corrected. _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = true; _accepts_modifications = false; diff --git a/src/commands/CmdLog.cpp b/src/commands/CmdLog.cpp index af3e9f361..6263cf299 100644 --- a/src/commands/CmdLog.cpp +++ b/src/commands/CmdLog.cpp @@ -40,6 +40,7 @@ CmdLog::CmdLog() { _read_only = false; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = true; _accepts_filter = false; _accepts_modifications = true; diff --git a/src/commands/CmdLogo.cpp b/src/commands/CmdLogo.cpp index 37efec23d..75db2c837 100644 --- a/src/commands/CmdLogo.cpp +++ b/src/commands/CmdLogo.cpp @@ -39,6 +39,7 @@ CmdLogo::CmdLogo() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/CmdModify.cpp b/src/commands/CmdModify.cpp index ba86ea1f9..ed6e3d609 100644 --- a/src/commands/CmdModify.cpp +++ b/src/commands/CmdModify.cpp @@ -48,6 +48,7 @@ CmdModify::CmdModify() { _read_only = false; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = true; _accepts_modifications = true; diff --git a/src/commands/CmdNews.cpp b/src/commands/CmdNews.cpp index 27202ff64..6eeec1ba6 100644 --- a/src/commands/CmdNews.cpp +++ b/src/commands/CmdNews.cpp @@ -57,6 +57,7 @@ CmdNews::CmdNews() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/CmdPrepend.cpp b/src/commands/CmdPrepend.cpp index 79d67a881..1f148db48 100644 --- a/src/commands/CmdPrepend.cpp +++ b/src/commands/CmdPrepend.cpp @@ -44,6 +44,7 @@ CmdPrepend::CmdPrepend() { _read_only = false; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = true; _accepts_filter = true; _accepts_modifications = true; diff --git a/src/commands/CmdProjects.cpp b/src/commands/CmdProjects.cpp index dc98f8af3..612ba93ed 100644 --- a/src/commands/CmdProjects.cpp +++ b/src/commands/CmdProjects.cpp @@ -47,6 +47,7 @@ CmdProjects::CmdProjects() { _read_only = true; _displays_id = false; _needs_gc = true; + _needs_recur_update = true; _uses_context = true; _accepts_filter = true; _accepts_modifications = false; @@ -59,8 +60,6 @@ int CmdProjects::execute(std::string& output) { int rc = 0; // Get all the tasks. - handleUntil(); - handleRecurrence(); auto tasks = Context::getContext().tdb2.pending_tasks(); if (Context::getContext().config.getBoolean("list.all.projects")) @@ -141,6 +140,7 @@ CmdCompletionProjects::CmdCompletionProjects() { _read_only = true; _displays_id = false; _needs_gc = true; + _needs_recur_update = true; _uses_context = false; _accepts_filter = true; _accepts_modifications = false; @@ -151,8 +151,6 @@ CmdCompletionProjects::CmdCompletionProjects() { //////////////////////////////////////////////////////////////////////////////// int CmdCompletionProjects::execute(std::string& output) { // Get all the tasks. - handleUntil(); - handleRecurrence(); auto tasks = Context::getContext().tdb2.pending_tasks(); if (Context::getContext().config.getBoolean("list.all.projects")) diff --git a/src/commands/CmdPurge.cpp b/src/commands/CmdPurge.cpp index 5bb309ddb..e7374064e 100644 --- a/src/commands/CmdPurge.cpp +++ b/src/commands/CmdPurge.cpp @@ -43,6 +43,7 @@ CmdPurge::CmdPurge() { _displays_id = false; _needs_confirm = true; _needs_gc = true; + _needs_recur_update = false; _uses_context = true; _accepts_filter = true; _accepts_modifications = false; diff --git a/src/commands/CmdReports.cpp b/src/commands/CmdReports.cpp index 1b2d83eed..4aa65e712 100644 --- a/src/commands/CmdReports.cpp +++ b/src/commands/CmdReports.cpp @@ -43,6 +43,7 @@ CmdReports::CmdReports() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/CmdShow.cpp b/src/commands/CmdShow.cpp index a5f76e1f2..60e4f1657 100644 --- a/src/commands/CmdShow.cpp +++ b/src/commands/CmdShow.cpp @@ -53,6 +53,7 @@ CmdShow::CmdShow() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/CmdStart.cpp b/src/commands/CmdStart.cpp index 10a5c9e5c..5216fab88 100644 --- a/src/commands/CmdStart.cpp +++ b/src/commands/CmdStart.cpp @@ -44,6 +44,7 @@ CmdStart::CmdStart() { _read_only = false; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = true; _accepts_filter = true; _accepts_modifications = true; diff --git a/src/commands/CmdStats.cpp b/src/commands/CmdStats.cpp index 3450d8f11..7639594d9 100644 --- a/src/commands/CmdStats.cpp +++ b/src/commands/CmdStats.cpp @@ -49,6 +49,7 @@ CmdStats::CmdStats() { _read_only = true; _displays_id = false; _needs_gc = true; + _needs_recur_update = false; _uses_context = true; _accepts_filter = true; _accepts_modifications = false; diff --git a/src/commands/CmdStop.cpp b/src/commands/CmdStop.cpp index 2698a8436..1c2bf7596 100644 --- a/src/commands/CmdStop.cpp +++ b/src/commands/CmdStop.cpp @@ -43,6 +43,7 @@ CmdStop::CmdStop() { _read_only = false; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = true; _accepts_filter = true; _accepts_modifications = true; diff --git a/src/commands/CmdSummary.cpp b/src/commands/CmdSummary.cpp index 76a83a29b..6bea3aae1 100644 --- a/src/commands/CmdSummary.cpp +++ b/src/commands/CmdSummary.cpp @@ -49,6 +49,7 @@ CmdSummary::CmdSummary() { _read_only = true; _displays_id = false; _needs_gc = true; + _needs_recur_update = false; _uses_context = true; _accepts_filter = true; _accepts_modifications = false; @@ -65,8 +66,6 @@ int CmdSummary::execute(std::string& output) { bool showAllProjects = Context::getContext().config.getBoolean("summary.all.projects"); // Apply filter. - handleUntil(); - handleRecurrence(); Filter filter; std::vector filtered; filter.subset(filtered); diff --git a/src/commands/CmdSync.cpp b/src/commands/CmdSync.cpp index e4f07e8f6..427cca5dd 100644 --- a/src/commands/CmdSync.cpp +++ b/src/commands/CmdSync.cpp @@ -49,6 +49,7 @@ CmdSync::CmdSync() { _read_only = false; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/CmdTags.cpp b/src/commands/CmdTags.cpp index a0317d4fb..4c79832ad 100644 --- a/src/commands/CmdTags.cpp +++ b/src/commands/CmdTags.cpp @@ -46,6 +46,7 @@ CmdTags::CmdTags() { _read_only = true; _displays_id = false; _needs_gc = true; + _needs_recur_update = false; _uses_context = true; _accepts_filter = true; _accepts_modifications = false; @@ -136,6 +137,7 @@ CmdCompletionTags::CmdCompletionTags() { _read_only = true; _displays_id = false; _needs_gc = true; + _needs_recur_update = true; _uses_context = false; _accepts_filter = true; _accepts_modifications = false; diff --git a/src/commands/CmdTimesheet.cpp b/src/commands/CmdTimesheet.cpp index bd076acd3..13b8d13c1 100644 --- a/src/commands/CmdTimesheet.cpp +++ b/src/commands/CmdTimesheet.cpp @@ -48,6 +48,7 @@ CmdTimesheet::CmdTimesheet() { _read_only = true; _displays_id = false; _needs_gc = true; + _needs_recur_update = true; _uses_context = false; _accepts_filter = true; _accepts_modifications = false; @@ -90,8 +91,6 @@ int CmdTimesheet::execute(std::string& output) { } // Apply filter to get a set of tasks. - handleUntil(); - handleRecurrence(); Filter filter; std::vector filtered; filter.subset(filtered); diff --git a/src/commands/CmdUDAs.cpp b/src/commands/CmdUDAs.cpp index 540d1726b..78742ca0a 100644 --- a/src/commands/CmdUDAs.cpp +++ b/src/commands/CmdUDAs.cpp @@ -48,6 +48,7 @@ CmdUDAs::CmdUDAs() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; @@ -156,6 +157,7 @@ CmdCompletionUDAs::CmdCompletionUDAs() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/CmdUndo.cpp b/src/commands/CmdUndo.cpp index a5257ab93..cf808f6a5 100644 --- a/src/commands/CmdUndo.cpp +++ b/src/commands/CmdUndo.cpp @@ -45,6 +45,7 @@ CmdUndo::CmdUndo() { _read_only = false; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/CmdUnique.cpp b/src/commands/CmdUnique.cpp index 6833afb24..4b24c0043 100644 --- a/src/commands/CmdUnique.cpp +++ b/src/commands/CmdUnique.cpp @@ -43,6 +43,7 @@ CmdUnique::CmdUnique() { _read_only = true; _displays_id = true; _needs_gc = true; + _needs_recur_update = false; _uses_context = false; _accepts_filter = true; _accepts_modifications = false; diff --git a/src/commands/CmdUrgency.cpp b/src/commands/CmdUrgency.cpp index 4d2b4a31f..cbd1b45e3 100644 --- a/src/commands/CmdUrgency.cpp +++ b/src/commands/CmdUrgency.cpp @@ -45,6 +45,7 @@ CmdUrgency::CmdUrgency() { _read_only = true; _displays_id = false; _needs_gc = true; + _needs_recur_update = false; _uses_context = false; _accepts_filter = true; _accepts_modifications = false; diff --git a/src/commands/CmdVersion.cpp b/src/commands/CmdVersion.cpp index fd82bda98..e4dd57e10 100644 --- a/src/commands/CmdVersion.cpp +++ b/src/commands/CmdVersion.cpp @@ -48,6 +48,7 @@ CmdVersion::CmdVersion() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; @@ -101,6 +102,7 @@ CmdCompletionVersion::CmdCompletionVersion() { _read_only = true; _displays_id = false; _needs_gc = false; + _needs_recur_update = false; _uses_context = false; _accepts_filter = false; _accepts_modifications = false; diff --git a/src/commands/Command.cpp b/src/commands/Command.cpp index dc6b36d87..366a10666 100644 --- a/src/commands/Command.cpp +++ b/src/commands/Command.cpp @@ -295,6 +295,7 @@ Command::Command() _displays_id(true), _needs_confirm(false), _needs_gc(true), + _needs_recur_update(false), _uses_context(false), _accepts_filter(false), _accepts_modifications(false), @@ -322,6 +323,9 @@ bool Command::displays_id() const { return _displays_id; } //////////////////////////////////////////////////////////////////////////////// bool Command::needs_gc() const { return _needs_gc; } +//////////////////////////////////////////////////////////////////////////////// +bool Command::needs_recur_update() const { return _needs_recur_update; } + //////////////////////////////////////////////////////////////////////////////// bool Command::uses_context() const { return _uses_context; } diff --git a/src/commands/Command.h b/src/commands/Command.h index 43d6ced89..02ff51ce6 100644 --- a/src/commands/Command.h +++ b/src/commands/Command.h @@ -62,6 +62,7 @@ class Command { bool read_only() const; bool displays_id() const; bool needs_gc() const; + bool needs_recur_update() const; virtual bool uses_context() const; bool accepts_filter() const; bool accepts_modifications() const; @@ -81,6 +82,7 @@ class Command { bool _displays_id; bool _needs_confirm; bool _needs_gc; + bool _needs_recur_update; bool _uses_context; bool _accepts_filter; bool _accepts_modifications; diff --git a/src/main.h b/src/main.h index 4b2ff2a57..9220a1345 100644 --- a/src/main.h +++ b/src/main.h @@ -47,9 +47,6 @@ std::optional getNextRecurrence(Datetime&, std::string&); bool generateDueDates(Task&, std::vector&); void updateRecurrenceMask(Task&); -// recur2.cpp -void handleRecurrence2(); - // nag.cpp void nag(std::vector&); diff --git a/test/commands.test.py b/test/commands.test.py index ee2951852..7ee9e38a3 100755 --- a/test/commands.test.py +++ b/test/commands.test.py @@ -44,7 +44,7 @@ class TestCommands(TestCase): code, out, err = self.t("commands") self.assertRegex(out, r"add\s+operation\s+RW\s+Ctxt\s+Mods\s+Adds a new task") self.assertRegex( - out, r"list\s+report\s+RO\s+ID\s+GC\s+Ctxt\s+Filt\s+Most details of" + out, r"list\s+report\s+RO\s+ID\s+GC\s+Recur\s+Ctxt\s+Filt\s+Most details of" ) self.assertRegex(out, r"modify\s+operation\s+RW\s+Filt\s+Mods\s+Modifies the") @@ -53,7 +53,7 @@ class TestCommands(TestCase): code, out, err = self.t("commands rc._forcecolor:on") self.assertRegex(out, r"add\s+operation\s+RW\s+Ctxt\s+Mods\s+Adds a new task") self.assertRegex( - out, r"list\s+report\s+RO\s+ID\s+GC\s+Ctxt\s+Filt\s+Most details of" + out, r"list\s+report\s+RO\s+ID\s+GC\s+Recur\s+Ctxt\s+Filt\s+Most details of" ) self.assertRegex(out, r"modify\s+operation\s+RW\s+Filt\s+Mods\s+Modifies the") From 20417b311e8fadca79bf72208d002d538ebe2820 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 13:27:51 -0500 Subject: [PATCH 11/76] [pre-commit.ci] pre-commit autoupdate (#3762) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/mirrors-clang-format: v19.1.6 → v19.1.7](https://github.com/pre-commit/mirrors-clang-format/compare/v19.1.6...v19.1.7) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ea9333263..7314def8e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: check-yaml - id: check-added-large-files - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v19.1.6 + rev: v19.1.7 hooks: - id: clang-format types_or: [c++, c] From 8d210b526327b72b919ebe3beadbde61c9b56e2d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 18:00:57 -0500 Subject: [PATCH 12/76] Bump docker/build-push-action from 6.11.0 to 6.12.0 (#3761) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.11.0 to 6.12.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v6.11.0...v6.12.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index d774bd3ed..ffc082981 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -44,7 +44,7 @@ jobs: - name: Build and push Taskwarrior Docker image id: build-and-push - uses: docker/build-push-action@v6.11.0 + uses: docker/build-push-action@v6.12.0 with: context: . file: "./docker/task.dockerfile" From 3ae7413ebde0117fd9fb7cb76e0d3077c85369f9 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sat, 1 Feb 2025 20:37:43 +0000 Subject: [PATCH 13/76] Update task.md json lines end with \n (0xA) not \r (0xD) (#3752) Update task.md to fix mistake in json format. In the code the json lines end with \n (0xA) not \r (0xD) --- doc/devel/rfcs/task.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/devel/rfcs/task.md b/doc/devel/rfcs/task.md index 312b8ee72..89eb7a9de 100644 --- a/doc/devel/rfcs/task.md +++ b/doc/devel/rfcs/task.md @@ -25,7 +25,7 @@ In brief: "MUST" (or "REQUIRED") means that the item is an absolute requirement ## General Format -The format is JSON, specifically a JSON object as a single line of text, terminated by a newline (U+000D). +The format is JSON, specifically a JSON object as a single line of text, terminated by a line feed (U+000A). The JSON looks like this: From 244513fad7fe1a88a6480c64ac0e1d562f794983 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Feb 2025 15:51:35 -0500 Subject: [PATCH 14/76] Bump docker/build-push-action from 6.12.0 to 6.13.0 (#3766) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.12.0 to 6.13.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v6.12.0...v6.13.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index ffc082981..ee51263da 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -44,7 +44,7 @@ jobs: - name: Build and push Taskwarrior Docker image id: build-and-push - uses: docker/build-push-action@v6.12.0 + uses: docker/build-push-action@v6.13.0 with: context: . file: "./docker/task.dockerfile" From e1fc283da5f7781124fc8271f72d3d5858c9ce4e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 13:13:57 -0500 Subject: [PATCH 15/76] [pre-commit.ci] pre-commit autoupdate (#3773) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 24.10.0 → 25.1.0](https://github.com/psf/black/compare/24.10.0...25.1.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7314def8e..7e9ce69fa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,6 +14,6 @@ repos: - id: clang-format types_or: [c++, c] - repo: https://github.com/psf/black - rev: 24.10.0 + rev: 25.1.0 hooks: - id: black From fdb7e5e0202403b7574d5cf8c4d140e12242aa55 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Wed, 5 Feb 2025 08:20:35 -0500 Subject: [PATCH 16/76] Test for unusual task data (#3770) * Test for unusual task data A task might have any combination of keys and values, but Taskwarrior often assumes that only valid values can occur, and crashes otherwise. This is highly inconvenient, as it's often impossible to do anything with the invalid task -- Taskwarrior just fails without modifying it. So, this is the beginning of some testing for such invalid tasks, with the goal of making Taskwarrior due something reasonable. In general, an invalid attribute value is treated as if it was not set. This is not exhaustive, and there are likely still bugs of this sort, but as we find them we can fix and add regression tests to this script. This introduces a new test-only binary that creates a "bare" task using TaskChampion, avoiding Taskwarrior's efforts to not create "unusual" tasks. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- src/TDB2.cpp | 4 - src/Task.cpp | 19 ++-- src/commands/CmdAdd.cpp | 5 + src/commands/CmdInfo.cpp | 60 +++++++---- src/commands/CmdModify.cpp | 2 +- src/feedback.cpp | 7 +- src/recur.cpp | 15 ++- test/CMakeLists.txt | 10 ++ test/basetest/utils.py | 5 +- test/make_tc_task.cpp | 80 +++++++++++++++ test/unusual_task.test.py | 202 +++++++++++++++++++++++++++++++++++++ 11 files changed, 368 insertions(+), 41 deletions(-) create mode 100644 test/make_tc_task.cpp create mode 100755 test/unusual_task.test.py diff --git a/src/TDB2.cpp b/src/TDB2.cpp index 2e37640ef..6f55eedab 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -57,10 +57,6 @@ void TDB2::open_replica(const std::string& location, bool create_if_missing) { //////////////////////////////////////////////////////////////////////////////// // Add the new task to the replica. void TDB2::add(Task& task) { - // Validate a task for addition. This is stricter than `task.validate`, as any - // inconsistency is probably user error. - task.validate_add(); - // Ensure the task is consistent, and provide defaults if necessary. // bool argument to validate() is "applyDefault", to apply default values for // properties not otherwise given. diff --git a/src/Task.cpp b/src/Task.cpp index bab293341..a41f4d5ae 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -321,8 +321,8 @@ void Task::setStatus(Task::status status) { //////////////////////////////////////////////////////////////////////////////// // Determines status of a date attribute. Task::dateState Task::getDateState(const std::string& name) const { - std::string value = get(name); - if (value.length()) { + time_t value = get_date(name); + if (value > 0) { Datetime reference(value); Datetime now; Datetime today("today"); @@ -804,13 +804,16 @@ std::string Task::composeJSON(bool decorate /*= false*/) const { // Date fields are written as ISO 8601. if (type == "date") { - Datetime d(i.second); - out << '"' << (i.first == "modification" ? "modified" : i.first) - << "\":\"" - // Date was deleted, do not export parsed empty string - << (i.second == "" ? "" : d.toISO()) << '"'; + time_t epoch = get_date(i.first); + if (epoch != 0) { + Datetime d(i.second); + out << '"' << (i.first == "modification" ? "modified" : i.first) + << "\":\"" + // Date was deleted, do not export parsed empty string + << (i.second == "" ? "" : d.toISO()) << '"'; - ++attributes_written; + ++attributes_written; + } } /* diff --git a/src/commands/CmdAdd.cpp b/src/commands/CmdAdd.cpp index 5778ab737..429ac9480 100644 --- a/src/commands/CmdAdd.cpp +++ b/src/commands/CmdAdd.cpp @@ -56,6 +56,11 @@ int CmdAdd::execute(std::string& output) { // the task is empty, but DOM references can refer to earlier parts of the // command line, e.g., `task add due:20110101 wait:due`. task.modify(Task::modReplace, true); + + // Validate a task for addition. This is stricter than `task.validate`, as any + // inconsistency is probably user error. + task.validate_add(); + Context::getContext().tdb2.add(task); // Do not display ID 0, users cannot query by that diff --git a/src/commands/CmdInfo.cpp b/src/commands/CmdInfo.cpp index 7ffb56942..b805277b9 100644 --- a/src/commands/CmdInfo.cpp +++ b/src/commands/CmdInfo.cpp @@ -120,9 +120,11 @@ int CmdInfo::execute(std::string& output) { description += '\n' + std::string(indent, ' ') + Datetime(anno.first.substr(11)).toString(dateformatanno) + ' ' + anno.second; - row = view.addRow(); - view.set(row, 0, "Description"); - view.set(row, 1, description, c); + if (task.has("description")) { + row = view.addRow(); + view.set(row, 0, "Description"); + view.set(row, 1, description, c); + } // status row = view.addRow(); @@ -215,64 +217,76 @@ int CmdInfo::execute(std::string& output) { } // entry - row = view.addRow(); - view.set(row, 0, "Entered"); - Datetime dt(task.get_date("entry")); - std::string entry = dt.toString(dateformat); + if (task.has("entry") && task.get_date("entry")) { + row = view.addRow(); + view.set(row, 0, "Entered"); + Datetime dt(task.get_date("entry")); + std::string entry = dt.toString(dateformat); - std::string age; - auto created = task.get("entry"); - if (created.length()) { - Datetime dt(strtoll(created.c_str(), nullptr, 10)); - age = Duration(now - dt).formatVague(); + std::string age; + auto created = task.get("entry"); + if (created.length()) { + Datetime dt(strtoll(created.c_str(), nullptr, 10)); + age = Duration(now - dt).formatVague(); + } + + view.set(row, 1, entry + " (" + age + ')'); } - view.set(row, 1, entry + " (" + age + ')'); + auto validDate = [&](const char* prop) { + if (!task.has(prop)) { + return false; + } + if (task.get_date(prop) == 0) { + return false; + } + return true; + }; // wait - if (task.has("wait")) { + if (validDate("wait")) { row = view.addRow(); view.set(row, 0, "Waiting until"); view.set(row, 1, Datetime(task.get_date("wait")).toString(dateformat)); } // scheduled - if (task.has("scheduled")) { + if (validDate("scheduled")) { row = view.addRow(); view.set(row, 0, "Scheduled"); view.set(row, 1, Datetime(task.get_date("scheduled")).toString(dateformat)); } // start - if (task.has("start")) { + if (validDate("start")) { row = view.addRow(); view.set(row, 0, "Start"); view.set(row, 1, Datetime(task.get_date("start")).toString(dateformat)); } // due (colored) - if (task.has("due")) { + if (validDate("due")) { row = view.addRow(); view.set(row, 0, "Due"); view.set(row, 1, Datetime(task.get_date("due")).toString(dateformat)); } // end - if (task.has("end")) { + if (validDate("end")) { row = view.addRow(); view.set(row, 0, "End"); view.set(row, 1, Datetime(task.get_date("end")).toString(dateformat)); } // until - if (task.has("until")) { + if (validDate("until")) { row = view.addRow(); view.set(row, 0, "Until"); view.set(row, 1, Datetime(task.get_date("until")).toString(dateformat)); } // modified - if (task.has("modified")) { + if (validDate("modified")) { row = view.addRow(); view.set(row, 0, "Last modified"); @@ -632,7 +646,11 @@ std::optional CmdInfo::formatForInfo(const std::vector& } else { // Record the last start time for later duration calculation. if (prop == "start") { - last_start = Datetime(value.value()).toEpoch(); + try { + last_start = Datetime(value.value()).toEpoch(); + } catch (std::string) { + // ignore invalid dates + } } out << format("{1} set to '{2}'.", Lexer::ucFirst(prop), diff --git a/src/commands/CmdModify.cpp b/src/commands/CmdModify.cpp index ed6e3d609..8a92fb802 100644 --- a/src/commands/CmdModify.cpp +++ b/src/commands/CmdModify.cpp @@ -119,7 +119,7 @@ void CmdModify::checkConsistency(Task &before, Task &after) { throw std::string("You cannot remove the recurrence from a recurring task."); if ((before.getStatus() == Task::pending) && (after.getStatus() == Task::pending) && - (after.get("end") != "")) + (before.get("end") == "") && (after.get("end") != "")) throw format("Could not modify task {1}. You cannot set an end date on a pending task.", before.identifier(true)); } diff --git a/src/feedback.cpp b/src/feedback.cpp index 60d89a686..22b9f9dc5 100644 --- a/src/feedback.cpp +++ b/src/feedback.cpp @@ -51,7 +51,12 @@ std::string renderAttribute(const std::string& name, const std::string& value, if (Context::getContext().columns.find(name) != Context::getContext().columns.end()) { Column* col = Context::getContext().columns[name]; if (col && col->type() == "date" && value != "") { - Datetime d((time_t)strtoll(value.c_str(), nullptr, 10)); + int64_t epoch = strtoll(value.c_str(), nullptr, 10); + // Do not try to render an un-parseable value. + if (epoch == 0) { + return value; + } + Datetime d((time_t)epoch); if (format == "") return d.toString(Context::getContext().config.get("dateformat")); return d.toString(format); diff --git a/src/recur.cpp b/src/recur.cpp index d6bb47454..4168b6691 100644 --- a/src/recur.cpp +++ b/src/recur.cpp @@ -288,9 +288,11 @@ std::optional getNextRecurrence(Datetime& current, std::string& period else if (unicodeLatinDigit(period[0]) && period[period.length() - 1] == 'q') { int increment = strtol(period.substr(0, period.length() - 1).c_str(), nullptr, 10); - if (increment <= 0) - throw format("Recurrence period '{1}' is equivalent to {2} and hence invalid.", period, - increment); + if (increment <= 0) { + Context::getContext().footnote(format( + "Recurrence period '{1}' is equivalent to {2} and hence invalid.", period, increment)); + return std::nullopt; + } m += 3 * increment; while (m > 12) { @@ -346,8 +348,11 @@ std::optional getNextRecurrence(Datetime& current, std::string& period // Add the period to current, and we're done. std::string::size_type idx = 0; Duration p; - if (!p.parse(period, idx)) - throw std::string(format("The recurrence value '{1}' is not valid.", period)); + if (!p.parse(period, idx)) { + Context::getContext().footnote( + format("Warning: The recurrence value '{1}' is not valid.", period)); + return std::nullopt; + } return checked_add_datetime(current, p.toTime_t()); } diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 08051bab2..8b9678e6d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -188,6 +188,7 @@ set (pythonTests undo.test.py unicode.test.py unique.test.py + unusual_task.test.py upgrade.test.py urgency.test.py urgency_inherit.test.py @@ -207,6 +208,15 @@ foreach (python_Test ${pythonTests}) ) endforeach(python_Test) +# Create a `make_tc_task` binary, used for unusual_task.test.py. In order to build this +# for the tests, it's added as a dependency of `test_runner`. +add_executable (make_tc_task make_tc_task.cpp) +target_link_libraries (make_tc_task task commands columns libshared task commands columns libshared task commands columns libshared ${TASK_LIBRARIES}) +if (DARWIN) + target_link_libraries (make_tc_task "-framework CoreFoundation -framework Security -framework SystemConfiguration") +endif (DARWIN) +add_dependencies(test_runner make_tc_task) + # -- Shell tests set (shell_SRCS diff --git a/test/basetest/utils.py b/test/basetest/utils.py index 2d665d8c3..d2ba9aae0 100644 --- a/test/basetest/utils.py +++ b/test/basetest/utils.py @@ -28,8 +28,11 @@ ON_POSIX = "posix" in sys.builtin_module_names # Directory relative to basetest module location CURRENT_DIR = os.path.dirname(os.path.abspath(__file__)) +# From the CMAKE value of the same name. This is substituted at configure. +CMAKE_BINARY_DIR = os.path.abspath("${CMAKE_BINARY_DIR}") + # Location of binary files (usually the src/ folder) -BIN_PREFIX = os.path.abspath(os.path.join("${CMAKE_BINARY_DIR}", "src")) +BIN_PREFIX = os.path.abspath(os.path.join(CMAKE_BINARY_DIR, "src")) # Default location of test hooks DEFAULT_HOOK_PATH = os.path.abspath( diff --git a/test/make_tc_task.cpp b/test/make_tc_task.cpp new file mode 100644 index 000000000..2cd5d0cc8 --- /dev/null +++ b/test/make_tc_task.cpp @@ -0,0 +1,80 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Copyright 2025, Dustin J. Mitchell +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// https://www.opensource.org/licenses/mit-license.php +// +//////////////////////////////////////////////////////////////////////////////// + +#include +// cmake.h include header must come first + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "format.h" + +namespace { + +//////////////////////////////////////////////////////////////////////////////// +int usage() { + std::cerr << "USAGE: make_tc_task DATADIR KEY=VALUE ..\n"; + return 1; +} + +} // namespace + +//////////////////////////////////////////////////////////////////////////////// +int main(int argc, char **argv) { + if (!--argc) { + return usage(); + } + char *datadir = *++argv; + + auto replica = tc::new_replica_on_disk(datadir, true); + auto uuid = tc::uuid_v4(); + auto operations = tc::new_operations(); + auto task = tc::create_task(uuid, operations); + + while (--argc) { + std::string arg = *++argv; + size_t eq_idx = arg.find('='); + if (eq_idx == std::string::npos) { + return usage(); + } + std::string property = arg.substr(0, eq_idx); + std::string value = arg.substr(eq_idx + 1); + task->update(property, value, operations); + } + replica->commit_operations(std::move(operations)); + + std::cout << static_cast(uuid.to_string()) << "\n"; + return 0; +} + +//////////////////////////////////////////////////////////////////////////////// diff --git a/test/unusual_task.test.py b/test/unusual_task.test.py new file mode 100755 index 000000000..8eb5bbaf7 --- /dev/null +++ b/test/unusual_task.test.py @@ -0,0 +1,202 @@ +#!/usr/bin/env python3 +############################################################################### +# +# Copyright 2025 Dustin J. Mitchell +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +# https://www.opensource.org/licenses/mit-license.php +# +############################################################################### + +import sys +import os +import re +import time +import unittest + +# Ensure python finds the local simpletap module +sys.path.append(os.path.dirname(os.path.abspath(__file__))) + +from basetest import Task, TestCase +from basetest.utils import run_cmd_wait, CMAKE_BINARY_DIR + + +class TestUnusualTasks(TestCase): + def setUp(self): + """Executed before each test in the class""" + self.t = Task() + self.t.config( + "report.custom-report.columns", + "id,description,entry,start,end,due,scheduled,modified,until", + ) + self.t.config("verbose", "nothing") + + def make_task(self, **props): + make_tc_task = os.path.abspath( + os.path.join(CMAKE_BINARY_DIR, "test", "make_tc_task") + ) + cmd = [make_tc_task, self.t.datadir] + for p, v in props.items(): + cmd.append(f"{p}={v}") + _, out, _ = run_cmd_wait(cmd) + return out.strip() + + def test_empty_task_info(self): + uuid = self.make_task() + _, out, _ = self.t(f"{uuid} info") + self.assertNotIn("Entered", out) + self.assertNotIn("Waiting", out) + self.assertNotIn("Last modified", out) + self.assertNotIn("Start", out) + self.assertNotIn("End", out) + self.assertNotIn("Due", out) + self.assertNotIn("Until", out) + self.assertRegex(out, r"Status\s+Pending") + + def test_modify_empty_task(self): + uuid = self.make_task() + self.t(f"{uuid} modify a description +taggy due:tomorrow") + _, out, _ = self.t(f"{uuid} info") + self.assertRegex(out, r"Description\s+a description") + self.assertRegex(out, r"Tags\s+taggy") + + def test_empty_task_recurring(self): + uuid = self.make_task(status="recurring") + _, out, _ = self.t(f"{uuid} info") + self.assertRegex(out, r"Status\s+Recurring") + _, out, _ = self.t(f"{uuid} custom-report") + + def test_recurring_invalid_rtype(self): + uuid = self.make_task( + status="recurring", due=str(int(time.time())), rtype="occasional" + ) + _, out, _ = self.t(f"{uuid} info") + self.assertRegex(out, r"Status\s+Recurring") + self.assertRegex(out, r"Recurrence type\s+occasional") + _, out, _ = self.t(f"{uuid} custom-report") + + def test_recurring_invalid_recur(self): + uuid = self.make_task( + status="recurring", + due=str(int(time.time())), + rtype="periodic", + recur="xxxxx", + ) + _, out, _ = self.t(f"{uuid} info") + self.assertRegex(out, r"Status\s+Recurring") + self.assertRegex(out, r"Recurrence type\s+periodic") + _, out, _ = self.t(f"{uuid} custom-report") + + def test_recurring_bad_quarters_rtype(self): + uuid = self.make_task( + status="recurring", due=str(int(time.time())), rtype="periodic", recur="9aq" + ) + _, out, _ = self.t(f"{uuid} custom-report") + + def test_invalid_entry_info(self): + uuid = self.make_task(entry="abcdef") + _, out, _ = self.t(f"{uuid} info") + self.assertNotIn("Entered", out) + + def test_invalid_modified_info(self): + uuid = self.make_task(modified="abcdef") + _, out, _ = self.t(f"{uuid} info") + self.assertNotIn(r"Last modified", out) + + def test_invalid_start_info(self): + uuid = self.make_task(start="abcdef") + _, out, _ = self.t(f"{uuid} info") + + def test_invalid_dates_report(self): + uuid = self.make_task( + wait="wait", + scheduled="scheduled", + start="start", + due="due", + end="end", + until="until", + modified="modified", + ) + _, out, _ = self.t(f"{uuid} custom-report") + + def test_invalid_dates_stop(self): + uuid = self.make_task( + wait="wait", + scheduled="scheduled", + start="start", + due="due", + end="end", + until="until", + modified="modified", + ) + _, out, _ = self.t(f"{uuid} stop") + + def test_invalid_dates_modify(self): + uuid = self.make_task( + wait="wait", + scheduled="scheduled", + start="start", + due="due", + end="end", + until="until", + modified="modified", + ) + _, out, _ = self.t(f"{uuid} mod a description +tag") + + def test_invalid_dates_info(self): + uuid = self.make_task( + wait="wait", + scheduled="scheduled", + start="start", + due="due", + end="end", + until="until", + modified="modified", + ) + _, out, _ = self.t(f"{uuid} info") + self.assertNotRegex("^Entered\s+", out) + self.assertNotRegex("^Start\s+", out) + self.assertIn(r"Wait set to 'wait'", out) + self.assertIn(r"Scheduled set to 'scheduled'", out) + self.assertIn(r"Start set to 'start'", out) + self.assertIn(r"Due set to 'due'", out) + self.assertIn(r"End set to 'end'", out) + self.assertIn(r"Until set to 'until'", out) + # (note that 'modified' is not shown in the journal) + + def test_invalid_dates_export(self): + uuid = self.make_task( + wait="wait", + scheduled="scheduled", + start="start", + due="due", + end="end", + until="until", + modified="modified", + ) + _, out, _ = self.t(f"{uuid} export") + + +if __name__ == "__main__": + from simpletap import TAPTestRunner + + unittest.main(testRunner=TAPTestRunner()) + +# vim: ai sts=4 et sw=4 ft=python From 7871617e9c4b9aaa12afe93adbd5619775044c89 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Thu, 6 Feb 2025 02:30:41 -0500 Subject: [PATCH 17/76] Only handleRecurrence/handleUntil when rc.gc=1 (#3772) --- src/Context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Context.cpp b/src/Context.cpp index ed4c65770..9fe1e468b 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -869,7 +869,7 @@ int Context::dispatch(std::string& out) { if (config.getBoolean("debug") && config.getInteger("debug.parser") == 1) debug(cli2.dump("Parse Tree (before command-specifіc processing)")); - if (c->needs_recur_update()) { + if (c->needs_recur_update() && Context::getContext().config.getBoolean("gc")) { handleUntil(); handleRecurrence(); } From d6658fe26f50e5a0f87a3a3705a12da5f0fa81bc Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Thu, 6 Feb 2025 02:31:33 -0500 Subject: [PATCH 18/76] Remove missed handleRecurrence/handleUntil calls (#3771) These were missed in #3753. --- src/commands/CmdEdit.cpp | 4 +--- src/commands/CmdHistory.cpp | 4 +--- src/commands/CmdIDs.cpp | 10 ---------- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/src/commands/CmdEdit.cpp b/src/commands/CmdEdit.cpp index b7890bdee..92dcbc828 100644 --- a/src/commands/CmdEdit.cpp +++ b/src/commands/CmdEdit.cpp @@ -64,7 +64,7 @@ CmdEdit::CmdEdit() { _read_only = false; _displays_id = false; _needs_gc = false; - _needs_recur_update = false; + _needs_recur_update = true; _uses_context = true; _accepts_filter = true; _accepts_modifications = false; @@ -78,8 +78,6 @@ CmdEdit::CmdEdit() { // wrench. To be used sparingly. int CmdEdit::execute(std::string&) { // Filter the tasks. - handleUntil(); - handleRecurrence(); Filter filter; std::vector filtered; filter.subset(filtered); diff --git a/src/commands/CmdHistory.cpp b/src/commands/CmdHistory.cpp index d6f1f9147..73788b01a 100644 --- a/src/commands/CmdHistory.cpp +++ b/src/commands/CmdHistory.cpp @@ -55,7 +55,7 @@ CmdHistoryBase::CmdHistoryBase() { _read_only = true; _displays_id = false; _needs_gc = false; - _needs_recur_update = false; + _needs_recur_update = true; _uses_context = true; _accepts_filter = true; _accepts_modifications = false; @@ -294,8 +294,6 @@ int CmdHistoryBase::execute(std::string& output) { completedGroup.clear(); // Apply filter. - handleUntil(); - handleRecurrence(); Filter filter; std::vector filtered; filter.subset(filtered); diff --git a/src/commands/CmdIDs.cpp b/src/commands/CmdIDs.cpp index acb2df9e7..5782aaf63 100644 --- a/src/commands/CmdIDs.cpp +++ b/src/commands/CmdIDs.cpp @@ -137,8 +137,6 @@ CmdCompletionIds::CmdCompletionIds() { //////////////////////////////////////////////////////////////////////////////// int CmdCompletionIds::execute(std::string& output) { // Apply filter. - handleUntil(); - handleRecurrence(); Filter filter; std::vector filtered; filter.subset(filtered); @@ -174,8 +172,6 @@ CmdZshCompletionIds::CmdZshCompletionIds() { //////////////////////////////////////////////////////////////////////////////// int CmdZshCompletionIds::execute(std::string& output) { // Apply filter. - handleUntil(); - handleRecurrence(); Filter filter; std::vector filtered; filter.subset(filtered); @@ -211,8 +207,6 @@ CmdUUIDs::CmdUUIDs() { //////////////////////////////////////////////////////////////////////////////// int CmdUUIDs::execute(std::string& output) { // Apply filter. - handleUntil(); - handleRecurrence(); Filter filter; std::vector filtered; filter.subset(filtered); @@ -247,8 +241,6 @@ CmdCompletionUuids::CmdCompletionUuids() { //////////////////////////////////////////////////////////////////////////////// int CmdCompletionUuids::execute(std::string& output) { // Apply filter. - handleUntil(); - handleRecurrence(); Filter filter; std::vector filtered; filter.subset(filtered); @@ -283,8 +275,6 @@ CmdZshCompletionUuids::CmdZshCompletionUuids() { //////////////////////////////////////////////////////////////////////////////// int CmdZshCompletionUuids::execute(std::string& output) { // Apply filter. - handleUntil(); - handleRecurrence(); Filter filter; std::vector filtered; filter.subset(filtered); From a97deb0c8446b8dfb44cc5c492b8426011dc749e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 10:10:51 -0500 Subject: [PATCH 19/76] Bump sigstore/cosign-installer from 3.7.0 to 3.8.0 (#3778) Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.7.0 to 3.8.0. - [Release notes](https://github.com/sigstore/cosign-installer/releases) - [Commits](https://github.com/sigstore/cosign-installer/compare/v3.7.0...v3.8.0) --- updated-dependencies: - dependency-name: sigstore/cosign-installer dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index ee51263da..0101a225a 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -33,7 +33,7 @@ jobs: submodules: "recursive" - name: Install cosign - uses: sigstore/cosign-installer@v3.7.0 + uses: sigstore/cosign-installer@v3.8.0 - name: Log into registry ${{ env.REGISTRY }} uses: docker/login-action@v3.3.0 From a701f8fc7dbae219a7c56b53b2d953e0f3c97244 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Fri, 14 Feb 2025 04:25:19 -0500 Subject: [PATCH 20/76] Open Replica read-only when possible (#3776) * Open Replica read-only when possible Specifically, when either - the command is read-only; or - the command requires GC (including recurrence updates) but GC is disabled by config * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- src/Context.cpp | 18 +++++-- src/TDB2.cpp | 14 +++--- src/TDB2.h | 3 +- src/taskchampion-cpp/src/lib.rs | 12 +++-- test/CMakeLists.txt | 1 + test/make_tc_task.cpp | 2 +- test/read-only.test.py | 83 +++++++++++++++++++++++++++++++++ test/tdb2_test.cpp | 4 +- test/view_test.cpp | 1 + 9 files changed, 121 insertions(+), 17 deletions(-) create mode 100755 test/read-only.test.py diff --git a/src/Context.cpp b/src/Context.cpp index 9fe1e468b..611cbdf4c 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -598,9 +598,6 @@ int Context::initialize(int argc, const char** argv) { createDefaultConfig(); - bool create_if_missing = !config.getBoolean("exit.on.missing.db"); - tdb2.open_replica(data_dir, create_if_missing); - //////////////////////////////////////////////////////////////////////////// // // [3] Instantiate Command objects and capture command entities. @@ -674,6 +671,21 @@ int Context::initialize(int argc, const char** argv) { if (foundAssumed) header("No command specified - assuming 'information'."); } + //////////////////////////////////////////////////////////////////////////// + // + // [7.5] Open the Replica. + // + //////////////////////////////////////////////////////////////////////////// + + bool create_if_missing = !config.getBoolean("exit.on.missing.db"); + Command* c = commands[cli2.getCommand()]; + + // We must allow writes if either 'gc' is enabled and the command performs GC, or the command + // itself is read-write. + bool read_write = + (config.getBoolean("gc") && (c->needs_gc() || c->needs_recur_update())) || !c->read_only(); + tdb2.open_replica(data_dir, create_if_missing, read_write); + //////////////////////////////////////////////////////////////////////////// // // [8] Initialize hooks. diff --git a/src/TDB2.cpp b/src/TDB2.cpp index 6f55eedab..227e22965 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -50,10 +50,13 @@ bool TDB2::debug_mode = false; static void dependency_scan(std::vector&); //////////////////////////////////////////////////////////////////////////////// -void TDB2::open_replica(const std::string& location, bool create_if_missing) { - _replica = tc::new_replica_on_disk(location, create_if_missing); +void TDB2::open_replica(const std::string& location, bool create_if_missing, bool read_write) { + _replica = tc::new_replica_on_disk(location, create_if_missing, read_write); } +//////////////////////////////////////////////////////////////////////////////// +void TDB2::open_replica_in_memory() { _replica = tc::new_replica_in_memory(); } + //////////////////////////////////////////////////////////////////////////////// // Add the new task to the replica. void TDB2::add(Task& task) { @@ -190,11 +193,8 @@ void TDB2::purge(Task& task) { //////////////////////////////////////////////////////////////////////////////// rust::Box& TDB2::replica() { - // Create a replica in-memory if `open_replica` has not been called. This - // occurs in tests. - if (!_replica) { - _replica = tc::new_replica_in_memory(); - } + // One of the open_replica_ methods must be called before this one. + assert(_replica); return _replica.value(); } diff --git a/src/TDB2.h b/src/TDB2.h index 3dafe6748..1720cf9ba 100644 --- a/src/TDB2.h +++ b/src/TDB2.h @@ -46,7 +46,8 @@ class TDB2 { TDB2() = default; - void open_replica(const std::string &, bool create_if_missing); + void open_replica(const std::string &, bool create_if_missing, bool read_write); + void open_replica_in_memory(); void add(Task &); void modify(Task &); void purge(Task &); diff --git a/src/taskchampion-cpp/src/lib.rs b/src/taskchampion-cpp/src/lib.rs index 66017fc59..45a146edc 100644 --- a/src/taskchampion-cpp/src/lib.rs +++ b/src/taskchampion-cpp/src/lib.rs @@ -104,8 +104,11 @@ mod ffi { fn new_replica_in_memory() -> Result>; /// Create a new replica stored on-disk. - fn new_replica_on_disk(taskdb_dir: String, create_if_missing: bool) - -> Result>; + fn new_replica_on_disk( + taskdb_dir: String, + create_if_missing: bool, + read_write: bool, + ) -> Result>; /// Commit the given operations to the replica. fn commit_operations(&mut self, ops: Vec) -> Result<()>; @@ -490,11 +493,14 @@ impl From for Replica { fn new_replica_on_disk( taskdb_dir: String, create_if_missing: bool, + read_write: bool, ) -> Result, CppError> { + use tc::storage::AccessMode::*; + let access_mode = if read_write { ReadWrite } else { ReadOnly }; let storage = tc::StorageConfig::OnDisk { taskdb_dir: PathBuf::from(taskdb_dir), create_if_missing, - access_mode: tc::storage::AccessMode::ReadWrite, + access_mode, } .into_storage()?; Ok(Box::new(tc::Replica::new(storage).into())) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 8b9678e6d..acff66c67 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -157,6 +157,7 @@ set (pythonTests purge.test.py quotes.test.py rc.override.test.py + read-only.test.py recurrence.test.py reports.test.py search.test.py diff --git a/test/make_tc_task.cpp b/test/make_tc_task.cpp index 2cd5d0cc8..b14560a8e 100644 --- a/test/make_tc_task.cpp +++ b/test/make_tc_task.cpp @@ -56,7 +56,7 @@ int main(int argc, char **argv) { } char *datadir = *++argv; - auto replica = tc::new_replica_on_disk(datadir, true); + auto replica = tc::new_replica_on_disk(datadir, /*create_if_missing=*/true, /*read_write=*/true); auto uuid = tc::uuid_v4(); auto operations = tc::new_operations(); auto task = tc::create_task(uuid, operations); diff --git a/test/read-only.test.py b/test/read-only.test.py new file mode 100755 index 000000000..9385a1b5c --- /dev/null +++ b/test/read-only.test.py @@ -0,0 +1,83 @@ +#!/usr/bin/env python3 +############################################################################### +# +# Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +# https://www.opensource.org/licenses/mit-license.php +# +############################################################################### + +import sys +import os +import platform +import time +import unittest + +# Ensure python finds the local simpletap module +sys.path.append(os.path.dirname(os.path.abspath(__file__))) + +from basetest import Task, TestCase + + +class TestReadOnly(TestCase): + def setUp(self): + self.t = Task() + self.t("add foo") + + # set the mtime of the taskdb to an hour ago, so we can see any changes + self.taskdb = self.t.datadir + "/taskchampion.sqlite3" + os.utime(self.taskdb, (time.time() - 3600,) * 2) + + def assertNotModified(self): + self.assertLess(os.stat(self.taskdb).st_mtime, time.time() - 1800) + + def assertModified(self): + self.assertGreater(os.stat(self.taskdb).st_mtime, time.time() - 1800) + + def test_read_only_command(self): + code, out, err = self.t("reports") + self.assertNotModified() + + def test_report(self): + code, out, err = self.t("list") + self.assertModified() + + def test_burndown(self): + code, out, err = self.t("burndown") + self.assertModified() + + def test_report_gc_0(self): + self.t.config("gc", "0") + code, out, err = self.t("list") + self.assertNotModified() + + def test_burndown_gc_0(self): + self.t.config("gc", "0") + code, out, err = self.t("burndown") + self.assertNotModified() + + +if __name__ == "__main__": + from simpletap import TAPTestRunner + + unittest.main(testRunner=TAPTestRunner()) + +# vim: ai sts=4 et sw=4 ft=python diff --git a/test/tdb2_test.cpp b/test/tdb2_test.cpp index 22134d250..76a27cc33 100644 --- a/test/tdb2_test.cpp +++ b/test/tdb2_test.cpp @@ -61,7 +61,7 @@ int TEST_NAME(int, char**) { context.config.set("gc", 1); context.config.set("debug", 1); - context.tdb2.open_replica(".", true); + context.tdb2.open_replica(".", /*create_if_missing=*/true, /*read_write=*/true); // Try reading an empty database. std::vector pending = context.tdb2.pending_tasks(); @@ -108,7 +108,7 @@ int TEST_NAME(int, char**) { // Reset for reuse. cleardb(); - context.tdb2.open_replica(".", true); + context.tdb2.open_replica(".", /*create_if_missing=*/true, /*read_write=*/true); // TODO complete a task // TODO gc diff --git a/test/view_test.cpp b/test/view_test.cpp index 76a27541a..51423e4db 100644 --- a/test/view_test.cpp +++ b/test/view_test.cpp @@ -47,6 +47,7 @@ int TEST_NAME(int, char**) { UnitTest t(1); Context context; Context::setContext(&context); + context.tdb2.open_replica_in_memory(); // Ensure environment has no influence. unsetenv("TASKDATA"); From 284948d9f9d5e7147ca73bd7e72918652c3fa9c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 09:30:06 -0500 Subject: [PATCH 21/76] Bump docker/build-push-action from 6.13.0 to 6.14.0 (#3791) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.13.0 to 6.14.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v6.13.0...v6.14.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index 0101a225a..577a96907 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -44,7 +44,7 @@ jobs: - name: Build and push Taskwarrior Docker image id: build-and-push - uses: docker/build-push-action@v6.13.0 + uses: docker/build-push-action@v6.14.0 with: context: . file: "./docker/task.dockerfile" From 8e90dc15713fe1778c87c97311b1953a0502fb1d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 09:30:15 -0500 Subject: [PATCH 22/76] Bump sigstore/cosign-installer from 3.8.0 to 3.8.1 (#3790) Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.8.0 to 3.8.1. - [Release notes](https://github.com/sigstore/cosign-installer/releases) - [Commits](https://github.com/sigstore/cosign-installer/compare/v3.8.0...v3.8.1) --- updated-dependencies: - dependency-name: sigstore/cosign-installer dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index 577a96907..7c4ea0733 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -33,7 +33,7 @@ jobs: submodules: "recursive" - name: Install cosign - uses: sigstore/cosign-installer@v3.8.0 + uses: sigstore/cosign-installer@v3.8.1 - name: Log into registry ${{ env.REGISTRY }} uses: docker/login-action@v3.3.0 From 55c02f5420f43b57d0532ce34d1740c49c011eae Mon Sep 17 00:00:00 2001 From: Tobias Predel Date: Sat, 1 Mar 2025 16:42:40 +0100 Subject: [PATCH 23/76] Remove unused includes (#3795) * Remove unused include in Variant.h * Remove unused include in util.h * Remove unused include directives in util.cpp * Remove unused include directives in TF2.h * Remove unused include directives in TF2.cpp * Remove unused include directive in TDB2.h * Remove unused include directives in TDB2.cpp * Remove unused include directives in Task.h * Remove unused include directive in rules.cpp * Remove unused include directives in rules.cpp * Remove unused include directives in nag.cpp * Remove unused include directive in main.h * Remove unused include directive in legacy.cpph * Remove unused include directive in Hooks.cpp * Remove unused include directive in Filter.h * Remove unused include directive in Filter.cpp * Remove unused include directive in feedback.cpp * Remove unused include directive in Eval.cpp * Remove unused include directives in dependency.cpp * Remove unused include directivess in Context.cpp --- src/Context.cpp | 3 --- src/Eval.cpp | 1 - src/Filter.cpp | 2 -- src/Filter.h | 1 - src/Hooks.cpp | 1 - src/TDB2.cpp | 3 --- src/TDB2.h | 1 - src/TF2.cpp | 8 -------- src/TF2.h | 3 --- src/Task.h | 1 - src/Variant.h | 1 - src/dependency.cpp | 2 -- src/feedback.cpp | 2 -- src/legacy.cpp | 1 - src/main.h | 1 - src/nag.cpp | 6 ------ src/recur.cpp | 7 ------- src/rules.cpp | 1 - src/util.cpp | 7 ------- src/util.h | 1 - 20 files changed, 53 deletions(-) diff --git a/src/Context.cpp b/src/Context.cpp index 611cbdf4c..ab5a8910c 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -40,12 +40,10 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -55,7 +53,6 @@ #include #endif -#include #include #ifdef SOLARIS diff --git a/src/Eval.cpp b/src/Eval.cpp index 5b869061e..7d82224ab 100644 --- a/src/Eval.cpp +++ b/src/Eval.cpp @@ -34,7 +34,6 @@ #include #include #include -#include #include diff --git a/src/Filter.cpp b/src/Filter.cpp index 0de77e88d..2e6d20a00 100644 --- a/src/Filter.cpp +++ b/src/Filter.cpp @@ -36,8 +36,6 @@ #include #include -#include - //////////////////////////////////////////////////////////////////////////////// // Take an input set of tasks and filter into a subset. void Filter::subset(const std::vector& input, std::vector& output) { diff --git a/src/Filter.h b/src/Filter.h index 2c47da6c4..bb7449318 100644 --- a/src/Filter.h +++ b/src/Filter.h @@ -30,7 +30,6 @@ #include #include -#include #include class Filter { diff --git a/src/Hooks.cpp b/src/Hooks.cpp index a8ad76b82..a703b2539 100644 --- a/src/Hooks.cpp +++ b/src/Hooks.cpp @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TDB2.cpp b/src/TDB2.cpp index 227e22965..08db87ddc 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -35,14 +35,11 @@ #include #include #include -#include #include #include #include #include -#include -#include #include #include diff --git a/src/TDB2.h b/src/TDB2.h index 1720cf9ba..89b5ae8e8 100644 --- a/src/TDB2.h +++ b/src/TDB2.h @@ -29,7 +29,6 @@ #include #include -#include #include #include diff --git a/src/TF2.cpp b/src/TF2.cpp index 9b7e2f940..6ab74c24d 100644 --- a/src/TF2.cpp +++ b/src/TF2.cpp @@ -33,16 +33,8 @@ #include #include #include -#include -#include #include -#include -#include -#include -#include -#include - #define STRING_TDB2_REVERTED "Modified task reverted." //////////////////////////////////////////////////////////////////////////////// diff --git a/src/TF2.h b/src/TF2.h index fbec1f12b..14f0f2485 100644 --- a/src/TF2.h +++ b/src/TF2.h @@ -29,12 +29,9 @@ #include #include -#include #include #include -#include -#include #include // TF2 Class represents a single 2.x-style file in the task database. diff --git a/src/Task.h b/src/Task.h index 66e18b13b..b430a2bc2 100644 --- a/src/Task.h +++ b/src/Task.h @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/src/Variant.h b/src/Variant.h index 3cbc5c6af..735779136 100644 --- a/src/Variant.h +++ b/src/Variant.h @@ -30,7 +30,6 @@ #include #include -#include #include class Variant { diff --git a/src/dependency.cpp b/src/dependency.cpp index 28b592470..8ac462aff 100644 --- a/src/dependency.cpp +++ b/src/dependency.cpp @@ -32,9 +32,7 @@ #include #include -#include #include -#include #include #define STRING_DEPEND_BLOCKED "Task {1} is blocked by:" diff --git a/src/feedback.cpp b/src/feedback.cpp index 22b9f9dc5..0fc7b84fc 100644 --- a/src/feedback.cpp +++ b/src/feedback.cpp @@ -32,12 +32,10 @@ #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/legacy.cpp b/src/legacy.cpp index 16b1f3292..a14be7f2f 100644 --- a/src/legacy.cpp +++ b/src/legacy.cpp @@ -30,7 +30,6 @@ #include #include -#include #include #define STRING_LEGACY_PRIORITY "Legacy attribute found. Please change '{1}' to '{2}'." diff --git a/src/main.h b/src/main.h index 9220a1345..c08f159a7 100644 --- a/src/main.h +++ b/src/main.h @@ -32,7 +32,6 @@ #include #include -#include #include #include #include diff --git a/src/nag.cpp b/src/nag.cpp index 057567582..356287f45 100644 --- a/src/nag.cpp +++ b/src/nag.cpp @@ -25,15 +25,9 @@ //////////////////////////////////////////////////////////////////////////////// #include - -#include // cmake.h include header must come first - #include -#include -#include -#include #include //////////////////////////////////////////////////////////////////////////////// diff --git a/src/recur.cpp b/src/recur.cpp index 4168b6691..857273926 100644 --- a/src/recur.cpp +++ b/src/recur.cpp @@ -32,24 +32,17 @@ #include #include #include -#include #include #include -#include #include -#include #include #include #include #include #include -#include -#include -#include #include #include -#include // Add a `time_t` delta to a Datetime, checking for and returning nullopt on integer overflow. std::optional checked_add_datetime(Datetime& base, time_t delta) { diff --git a/src/rules.cpp b/src/rules.cpp index 924644233..6843db465 100644 --- a/src/rules.cpp +++ b/src/rules.cpp @@ -31,7 +31,6 @@ #include #include #include -#include static std::map gsColor; static std::vector gsPrecedence; diff --git a/src/util.cpp b/src/util.cpp index 04593791f..78174028b 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -38,10 +38,7 @@ #include #include #include -#include -#include #include -#include #include #include #include @@ -51,11 +48,7 @@ #include #include -#include -#include -#include #include -#include #include #include diff --git a/src/util.h b/src/util.h index a4f94a1a9..782311117 100644 --- a/src/util.h +++ b/src/util.h @@ -32,7 +32,6 @@ #include -#include #include #include #if defined(FREEBSD) || defined(OPENBSD) From 81ca04fc8cbab221363f5b0553725b796b96f23f Mon Sep 17 00:00:00 2001 From: Tobias Predel Date: Sat, 1 Mar 2025 20:47:42 +0100 Subject: [PATCH 24/76] Declare in corresponding header files and dissolve main.h (#3796) * Declare in corresponding header files and dissolve main.h Apply include-what-you-use * Remove further unncessary includes * Incorporate review comment * Do not declare static functions and variables in header * Adapt test * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- src/Context.cpp | 3 +- src/Operation.h | 7 +-- src/TDB2.cpp | 2 - src/TDB2.h | 1 - src/TF2.cpp | 4 +- src/Task.cpp | 3 +- src/Variant.h | 1 - src/ViewTask.cpp | 2 +- src/columns/ColDepends.cpp | 3 -- src/columns/ColTags.cpp | 2 +- src/commands/CmdAdd.cpp | 2 +- src/commands/CmdAnnotate.cpp | 2 +- src/commands/CmdAppend.cpp | 2 +- src/commands/CmdBurndown.cpp | 1 - src/commands/CmdCalendar.cpp | 1 - src/commands/CmdColor.cpp | 1 - src/commands/CmdColumns.cpp | 1 - src/commands/CmdContext.cpp | 2 +- src/commands/CmdCount.cpp | 1 - src/commands/CmdCustom.cpp | 6 +-- src/commands/CmdDelete.cpp | 4 +- src/commands/CmdDenotate.cpp | 2 +- src/commands/CmdDone.cpp | 5 +- src/commands/CmdDuplicate.cpp | 2 +- src/commands/CmdEdit.cpp | 1 - src/commands/CmdExport.cpp | 3 +- src/commands/CmdGet.cpp | 1 - src/commands/CmdHistory.cpp | 1 - src/commands/CmdIDs.cpp | 1 - src/commands/CmdInfo.cpp | 4 +- src/commands/CmdLog.cpp | 2 +- src/commands/CmdModify.cpp | 3 +- src/commands/CmdNews.cpp | 1 - src/commands/CmdPrepend.cpp | 2 +- src/commands/CmdProjects.cpp | 3 +- src/commands/CmdPurge.cpp | 2 +- src/commands/CmdShow.cpp | 2 +- src/commands/CmdStart.cpp | 5 +- src/commands/CmdStats.cpp | 1 - src/commands/CmdStop.cpp | 4 +- src/commands/CmdSummary.cpp | 3 +- src/commands/CmdTimesheet.cpp | 3 +- src/commands/CmdUDAs.cpp | 1 - src/commands/CmdUndo.cpp | 3 +- src/commands/CmdUrgency.cpp | 2 - src/commands/Command.cpp | 2 - src/dependency.cpp | 2 +- src/dependency.h | 43 ++++++++++++++++ src/feedback.cpp | 2 +- src/feedback.h | 54 ++++++++++++++++++++ src/legacy.h | 44 +++++++++++++++++ src/main.h | 93 ----------------------------------- src/nag.h | 43 ++++++++++++++++ src/recur.cpp | 3 +- src/recur.h | 57 +++++++++++++++++++++ src/rules.cpp | 2 +- src/rules.h | 47 ++++++++++++++++++ src/sort.h | 51 +++++++++++++++++++ src/util.cpp | 2 +- test/col_test.cpp | 2 - test/make_tc_task.cpp | 4 -- test/t_test.cpp | 3 +- test/tdb2_test.cpp | 4 +- test/tw_2689_test.cpp | 4 +- test/util_test.cpp | 5 +- test/view_test.cpp | 3 +- 66 files changed, 402 insertions(+), 176 deletions(-) create mode 100644 src/dependency.h create mode 100644 src/feedback.h create mode 100644 src/legacy.h delete mode 100644 src/main.h create mode 100644 src/nag.h create mode 100644 src/recur.h create mode 100644 src/rules.h create mode 100644 src/sort.h diff --git a/src/Context.cpp b/src/Context.cpp index ab5a8910c..f90dd984e 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -36,7 +36,8 @@ #include #include #include -#include +#include +#include #include #include #include diff --git a/src/Operation.h b/src/Operation.h index 485b422bd..82c2ea022 100644 --- a/src/Operation.h +++ b/src/Operation.h @@ -1,6 +1,7 @@ //////////////////////////////////////////////////////////////////////////////// // -// Copyright 2006 - 2024, Tomas Babej, Paul Beckingham, Federico Hernandez. +// Copyright 2006 - 2025, Tomas Babej, Paul Beckingham, Federico Hernandez, +// Tobias Predel. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -24,8 +25,8 @@ // //////////////////////////////////////////////////////////////////////////////// -#ifndef INCLUDED_OPERATIOn -#define INCLUDED_OPERATIOn +#ifndef INCLUDED_OPERATION +#define INCLUDED_OPERATION #include diff --git a/src/TDB2.cpp b/src/TDB2.cpp index 08db87ddc..c49f513d6 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -33,13 +33,11 @@ #include #include #include -#include #include #include #include #include -#include #include #include diff --git a/src/TDB2.h b/src/TDB2.h index 89b5ae8e8..51669ab6d 100644 --- a/src/TDB2.h +++ b/src/TDB2.h @@ -27,7 +27,6 @@ #ifndef INCLUDED_TDB2 #define INCLUDED_TDB2 -#include #include #include diff --git a/src/TF2.cpp b/src/TF2.cpp index 6ab74c24d..0b78fe531 100644 --- a/src/TF2.cpp +++ b/src/TF2.cpp @@ -31,7 +31,9 @@ #include #include #include -#include +#ifdef PRODUCT_TASKWARRIOR +#include +#endif #include #include diff --git a/src/Task.cpp b/src/Task.cpp index a41f4d5ae..536f17a24 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -58,7 +58,8 @@ #include #include #include -#include +#include +#include #define APPROACHING_INFINITY 1000 // Close enough. This isn't rocket surgery. diff --git a/src/Variant.h b/src/Variant.h index 735779136..5634473b9 100644 --- a/src/Variant.h +++ b/src/Variant.h @@ -28,7 +28,6 @@ #define INCLUDED_VARIANT #include -#include #include diff --git a/src/ViewTask.cpp b/src/ViewTask.cpp index ce4cbaa2a..ad04e9811 100644 --- a/src/ViewTask.cpp +++ b/src/ViewTask.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/columns/ColDepends.cpp b/src/columns/ColDepends.cpp index d0c77d0b3..446737d6d 100644 --- a/src/columns/ColDepends.cpp +++ b/src/columns/ColDepends.cpp @@ -30,13 +30,10 @@ #include #include #include -#include #include -#include #include #include -#include #include #define STRING_COLUMN_LABEL_DEP "Depends" diff --git a/src/columns/ColTags.cpp b/src/columns/ColTags.cpp index 50ccadf9e..2d0f278c0 100644 --- a/src/columns/ColTags.cpp +++ b/src/columns/ColTags.cpp @@ -32,8 +32,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/src/commands/CmdAdd.cpp b/src/commands/CmdAdd.cpp index 429ac9480..f951083dc 100644 --- a/src/commands/CmdAdd.cpp +++ b/src/commands/CmdAdd.cpp @@ -29,8 +29,8 @@ #include #include +#include #include -#include //////////////////////////////////////////////////////////////////////////////// CmdAdd::CmdAdd() { diff --git a/src/commands/CmdAnnotate.cpp b/src/commands/CmdAnnotate.cpp index f5a193236..efee759ea 100644 --- a/src/commands/CmdAnnotate.cpp +++ b/src/commands/CmdAnnotate.cpp @@ -30,8 +30,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/src/commands/CmdAppend.cpp b/src/commands/CmdAppend.cpp index ac9e35ae9..0cdad990b 100644 --- a/src/commands/CmdAppend.cpp +++ b/src/commands/CmdAppend.cpp @@ -30,8 +30,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/src/commands/CmdBurndown.cpp b/src/commands/CmdBurndown.cpp index b05af87f3..b0045cab8 100644 --- a/src/commands/CmdBurndown.cpp +++ b/src/commands/CmdBurndown.cpp @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/src/commands/CmdCalendar.cpp b/src/commands/CmdCalendar.cpp index bf365d262..c3b021298 100644 --- a/src/commands/CmdCalendar.cpp +++ b/src/commands/CmdCalendar.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/src/commands/CmdColor.cpp b/src/commands/CmdColor.cpp index 53e672df6..da17b9436 100644 --- a/src/commands/CmdColor.cpp +++ b/src/commands/CmdColor.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include diff --git a/src/commands/CmdColumns.cpp b/src/commands/CmdColumns.cpp index bf5e00f24..4a56e5d0f 100644 --- a/src/commands/CmdColumns.cpp +++ b/src/commands/CmdColumns.cpp @@ -31,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/src/commands/CmdContext.cpp b/src/commands/CmdContext.cpp index 77bc3152d..37c89682f 100644 --- a/src/commands/CmdContext.cpp +++ b/src/commands/CmdContext.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/commands/CmdCount.cpp b/src/commands/CmdCount.cpp index 3c158c225..e25af8fde 100644 --- a/src/commands/CmdCount.cpp +++ b/src/commands/CmdCount.cpp @@ -30,7 +30,6 @@ #include #include #include -#include //////////////////////////////////////////////////////////////////////////////// CmdCount::CmdCount() { diff --git a/src/commands/CmdCustom.cpp b/src/commands/CmdCustom.cpp index 9babfe668..8bba6c902 100644 --- a/src/commands/CmdCustom.cpp +++ b/src/commands/CmdCustom.cpp @@ -34,15 +34,15 @@ #include #include #include +#include #include -#include +#include #include -#include +#include #include #include #include -#include #include #include diff --git a/src/commands/CmdDelete.cpp b/src/commands/CmdDelete.cpp index b3ac931cb..35b5c7ecf 100644 --- a/src/commands/CmdDelete.cpp +++ b/src/commands/CmdDelete.cpp @@ -30,8 +30,10 @@ #include #include #include +#include +#include #include -#include +#include #include #include diff --git a/src/commands/CmdDenotate.cpp b/src/commands/CmdDenotate.cpp index e8a43ad63..7293f8ace 100644 --- a/src/commands/CmdDenotate.cpp +++ b/src/commands/CmdDenotate.cpp @@ -30,8 +30,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/src/commands/CmdDone.cpp b/src/commands/CmdDone.cpp index d1ea64adb..deb10a0dc 100644 --- a/src/commands/CmdDone.cpp +++ b/src/commands/CmdDone.cpp @@ -30,8 +30,11 @@ #include #include #include +#include +#include #include -#include +#include +#include #include #include diff --git a/src/commands/CmdDuplicate.cpp b/src/commands/CmdDuplicate.cpp index b6a68854d..6ef1feb5d 100644 --- a/src/commands/CmdDuplicate.cpp +++ b/src/commands/CmdDuplicate.cpp @@ -30,8 +30,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/src/commands/CmdEdit.cpp b/src/commands/CmdEdit.cpp index 92dcbc828..11cd8d937 100644 --- a/src/commands/CmdEdit.cpp +++ b/src/commands/CmdEdit.cpp @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/src/commands/CmdExport.cpp b/src/commands/CmdExport.cpp index c697ff221..2924645dd 100644 --- a/src/commands/CmdExport.cpp +++ b/src/commands/CmdExport.cpp @@ -31,8 +31,9 @@ #include #include #include -#include +#include #include +#include //////////////////////////////////////////////////////////////////////////////// CmdExport::CmdExport() { diff --git a/src/commands/CmdGet.cpp b/src/commands/CmdGet.cpp index 2954e6848..ec7c8da0a 100644 --- a/src/commands/CmdGet.cpp +++ b/src/commands/CmdGet.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include //////////////////////////////////////////////////////////////////////////////// diff --git a/src/commands/CmdHistory.cpp b/src/commands/CmdHistory.cpp index 73788b01a..d379a89dd 100644 --- a/src/commands/CmdHistory.cpp +++ b/src/commands/CmdHistory.cpp @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/src/commands/CmdIDs.cpp b/src/commands/CmdIDs.cpp index 5782aaf63..aa6bc6921 100644 --- a/src/commands/CmdIDs.cpp +++ b/src/commands/CmdIDs.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/src/commands/CmdInfo.cpp b/src/commands/CmdInfo.cpp index b805277b9..b3b3191fc 100644 --- a/src/commands/CmdInfo.cpp +++ b/src/commands/CmdInfo.cpp @@ -34,9 +34,9 @@ #include #include #include +#include #include -#include -#include +#include #include #include #include diff --git a/src/commands/CmdLog.cpp b/src/commands/CmdLog.cpp index 6263cf299..489001e0c 100644 --- a/src/commands/CmdLog.cpp +++ b/src/commands/CmdLog.cpp @@ -29,8 +29,8 @@ #include #include +#include #include -#include //////////////////////////////////////////////////////////////////////////////// CmdLog::CmdLog() { diff --git a/src/commands/CmdModify.cpp b/src/commands/CmdModify.cpp index 8a92fb802..a962ea10b 100644 --- a/src/commands/CmdModify.cpp +++ b/src/commands/CmdModify.cpp @@ -30,8 +30,9 @@ #include #include #include +#include #include -#include +#include #include #include diff --git a/src/commands/CmdNews.cpp b/src/commands/CmdNews.cpp index 6eeec1ba6..cbda073d5 100644 --- a/src/commands/CmdNews.cpp +++ b/src/commands/CmdNews.cpp @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/src/commands/CmdPrepend.cpp b/src/commands/CmdPrepend.cpp index 1f148db48..afdf73025 100644 --- a/src/commands/CmdPrepend.cpp +++ b/src/commands/CmdPrepend.cpp @@ -30,8 +30,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/src/commands/CmdProjects.cpp b/src/commands/CmdProjects.cpp index 612ba93ed..a74308757 100644 --- a/src/commands/CmdProjects.cpp +++ b/src/commands/CmdProjects.cpp @@ -32,10 +32,9 @@ #include #include #include -#include +#include #include -#include #include #include diff --git a/src/commands/CmdPurge.cpp b/src/commands/CmdPurge.cpp index e7374064e..d5b3c89fe 100644 --- a/src/commands/CmdPurge.cpp +++ b/src/commands/CmdPurge.cpp @@ -30,8 +30,8 @@ #include #include #include +#include #include -#include #include //////////////////////////////////////////////////////////////////////////////// diff --git a/src/commands/CmdShow.cpp b/src/commands/CmdShow.cpp index 60e4f1657..7d839e060 100644 --- a/src/commands/CmdShow.cpp +++ b/src/commands/CmdShow.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/commands/CmdStart.cpp b/src/commands/CmdStart.cpp index 5216fab88..057b61fc5 100644 --- a/src/commands/CmdStart.cpp +++ b/src/commands/CmdStart.cpp @@ -30,8 +30,11 @@ #include #include #include +#include +#include #include -#include +#include +#include #include #include diff --git a/src/commands/CmdStats.cpp b/src/commands/CmdStats.cpp index 7639594d9..8b5860ea1 100644 --- a/src/commands/CmdStats.cpp +++ b/src/commands/CmdStats.cpp @@ -34,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/src/commands/CmdStop.cpp b/src/commands/CmdStop.cpp index 1c2bf7596..9924c5a58 100644 --- a/src/commands/CmdStop.cpp +++ b/src/commands/CmdStop.cpp @@ -30,8 +30,10 @@ #include #include #include +#include +#include #include -#include +#include #include diff --git a/src/commands/CmdSummary.cpp b/src/commands/CmdSummary.cpp index 6bea3aae1..ca102638e 100644 --- a/src/commands/CmdSummary.cpp +++ b/src/commands/CmdSummary.cpp @@ -33,11 +33,10 @@ #include #include #include -#include +#include #include #include -#include #include #include diff --git a/src/commands/CmdTimesheet.cpp b/src/commands/CmdTimesheet.cpp index 13b8d13c1..9ce0bd4e8 100644 --- a/src/commands/CmdTimesheet.cpp +++ b/src/commands/CmdTimesheet.cpp @@ -33,8 +33,7 @@ #include #include #include -#include -#include +#include #include #include diff --git a/src/commands/CmdUDAs.cpp b/src/commands/CmdUDAs.cpp index 78742ca0a..c2fb751a9 100644 --- a/src/commands/CmdUDAs.cpp +++ b/src/commands/CmdUDAs.cpp @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/src/commands/CmdUndo.cpp b/src/commands/CmdUndo.cpp index cf808f6a5..4c2e6b7f7 100644 --- a/src/commands/CmdUndo.cpp +++ b/src/commands/CmdUndo.cpp @@ -31,12 +31,11 @@ #include #include #include +#include #include #include -#include "shared.h" - //////////////////////////////////////////////////////////////////////////////// CmdUndo::CmdUndo() { _keyword = "undo"; diff --git a/src/commands/CmdUrgency.cpp b/src/commands/CmdUrgency.cpp index cbd1b45e3..40731c81c 100644 --- a/src/commands/CmdUrgency.cpp +++ b/src/commands/CmdUrgency.cpp @@ -32,8 +32,6 @@ #include #include #include -#include -#include #include diff --git a/src/commands/Command.cpp b/src/commands/Command.cpp index 366a10666..3e52a4389 100644 --- a/src/commands/Command.cpp +++ b/src/commands/Command.cpp @@ -50,9 +50,7 @@ #include #include #include -#include #include -#include #include #include diff --git a/src/dependency.cpp b/src/dependency.cpp index 8ac462aff..380c471cb 100644 --- a/src/dependency.cpp +++ b/src/dependency.cpp @@ -28,8 +28,8 @@ // cmake.h include header must come first #include +#include #include -#include #include #include diff --git a/src/dependency.h b/src/dependency.h new file mode 100644 index 000000000..66cfbd7a2 --- /dev/null +++ b/src/dependency.h @@ -0,0 +1,43 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Copyright 2006 - 2025, Tomas Babej, Paul Beckingham, Federico Hernandez, +// Tobias Predel. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// https://www.opensource.org/licenses/mit-license.php +// +//////////////////////////////////////////////////////////////////////////////// + +#ifndef INCLUDED_DEPENDENCY +#define INCLUDED_DEPENDENCY + +#include +// cmake.h include header must come first + +#include + +#define STRING_DEPEND_BLOCKED "Task {1} is blocked by:" +bool dependencyIsCircular(const Task& task); +void dependencyChainOnComplete(Task& task); +void dependencyChainOnStart(Task& task); + +#endif + +//////////////////////////////////////////////////////////////////////////////// diff --git a/src/feedback.cpp b/src/feedback.cpp index 0fc7b84fc..efd2302b4 100644 --- a/src/feedback.cpp +++ b/src/feedback.cpp @@ -31,8 +31,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/src/feedback.h b/src/feedback.h new file mode 100644 index 000000000..55b565c00 --- /dev/null +++ b/src/feedback.h @@ -0,0 +1,54 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Copyright 2006 - 2025, Tomas Babej, Paul Beckingham, Federico Hernandez, +// Tobias Predel. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// https://www.opensource.org/licenses/mit-license.php +// +//////////////////////////////////////////////////////////////////////////////// + +#ifndef INCLUDED_FEEDBACK +#define INCLUDED_FEEDBACK + +#include +// cmake.h include header must come first + +#include + +#include +#include + +std::string renderAttribute(const std::string& name, const std::string& value, + const std::string& format = ""); +void feedback_affected(const std::string& effect); +void feedback_affected(const std::string& effect, int quantity); +void feedback_affected(const std::string& effect, const Task& task); +void feedback_reserved_tags(const std::string& tag); +void feedback_special_tags(const Task& task, const std::string& tag); +void feedback_unblocked(const Task& task); +void feedback_backlog(); +std::string onProjectChange(Task& task, bool scope = true); +std::string onProjectChange(Task& task1, Task& task2); +std::string onExpiration(Task& task); + +#endif + +//////////////////////////////////////////////////////////////////////////////// diff --git a/src/legacy.h b/src/legacy.h new file mode 100644 index 000000000..9e3258079 --- /dev/null +++ b/src/legacy.h @@ -0,0 +1,44 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Copyright 2006 - 2025, Tomas Babej, Paul Beckingham, Federico Hernandez, +// Tobias Predel. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// https://www.opensource.org/licenses/mit-license.php +// +//////////////////////////////////////////////////////////////////////////////// + +#ifndef INCLUDED_LEGACY +#define INCLUDED_LEGACY + +#include +// cmake.h include header must come first + +#include + +void legacyColumnMap(std::string& name); +void legacySortColumnMap(std::string& name); +std::string legacyCheckForDeprecatedVariables(); +std::string legacyCheckForDeprecatedColumns(); +void legacyAttributeMap(std::string& name); + +#endif + +//////////////////////////////////////////////////////////////////////////////// diff --git a/src/main.h b/src/main.h deleted file mode 100644 index c08f159a7..000000000 --- a/src/main.h +++ /dev/null @@ -1,93 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// https://www.opensource.org/licenses/mit-license.php -// -//////////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_MAIN -#define INCLUDED_MAIN - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -// recur.cpp -void handleRecurrence(); -void handleUntil(); -std::optional checked_add_datetime(Datetime& base, time_t delta); -std::optional getNextRecurrence(Datetime&, std::string&); -bool generateDueDates(Task&, std::vector&); -void updateRecurrenceMask(Task&); - -// nag.cpp -void nag(std::vector&); - -// rules.cpp -void initializeColorRules(); -void autoColorize(Task&, Color&); -std::string colorizeHeader(const std::string&); -std::string colorizeFootnote(const std::string&); -std::string colorizeError(const std::string&); -std::string colorizeDebug(const std::string&); - -// dependency.cpp -bool dependencyIsCircular(const Task&); -void dependencyChainOnComplete(Task&); -void dependencyChainOnStart(Task&); - -// feedback.cpp -std::string renderAttribute(const std::string&, const std::string&, const std::string& format = ""); -void feedback_affected(const std::string&); -void feedback_affected(const std::string&, int); -void feedback_affected(const std::string&, const Task&); -void feedback_reserved_tags(const std::string&); -void feedback_special_tags(const Task&, const std::string&); -void feedback_unblocked(const Task&); -void feedback_backlog(); -std::string onProjectChange(Task&, bool scope = true); -std::string onProjectChange(Task&, Task&); -std::string onExpiration(Task&); - -// sort.cpp -void sort_tasks(std::vector&, std::vector&, const std::string&); -void sort_projects(std::list>& sorted, - std::map& allProjects); -void sort_projects(std::list>& sorted, - std::map& allProjects); - -// legacy.cpp -void legacyColumnMap(std::string&); -void legacySortColumnMap(std::string&); -std::string legacyCheckForDeprecatedVariables(); -std::string legacyCheckForDeprecatedColumns(); -void legacyAttributeMap(std::string&); - -#endif -//////////////////////////////////////////////////////////////////////////////// diff --git a/src/nag.h b/src/nag.h new file mode 100644 index 000000000..6a8d2a1b5 --- /dev/null +++ b/src/nag.h @@ -0,0 +1,43 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Copyright 2006 - 2025, Tomas Babej, Paul Beckingham, Federico Hernandez, +// Tobias Predel. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// https://www.opensource.org/licenses/mit-license.php +// +//////////////////////////////////////////////////////////////////////////////// + +#ifndef INCLUDED_NAG +#define INCLUDED_NAG + +#include +// cmake.h include header must come first +#include + +#include + +//////////////////////////////////////////////////////////////////////////////// +// Generates a nag message when there are READY tasks of a higher urgency. +void nag(std::vector& tasks); + +#endif + +//////////////////////////////////////////////////////////////////////////////// diff --git a/src/recur.cpp b/src/recur.cpp index 857273926..482fc1060 100644 --- a/src/recur.cpp +++ b/src/recur.cpp @@ -31,9 +31,10 @@ #include #include #include +#include #include -#include #include +#include #include #include #include diff --git a/src/recur.h b/src/recur.h new file mode 100644 index 000000000..db0b6306d --- /dev/null +++ b/src/recur.h @@ -0,0 +1,57 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Copyright 2006 - 2025, Tomas Babej, Paul Beckingham, Federico Hernandez, +// Tobias Predel. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// https://www.opensource.org/licenses/mit-license.php +// +//////////////////////////////////////////////////////////////////////////////// + +#ifndef INCLUDED_RECUR +#define INCLUDED_RECUR + +#include +// cmake.h include header must come first + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +std::optional checked_add_datetime(Datetime& base, time_t delta); +void handleRecurrence(); +bool generateDueDates(Task& parent, std::vector& allDue); +std::optional getNextRecurrence(Datetime& current, std::string& period); +void updateRecurrenceMask(Task& task); +void handleUntil(); + +#endif + +//////////////////////////////////////////////////////////////////////////////// diff --git a/src/rules.cpp b/src/rules.cpp index 6843db465..21c46307d 100644 --- a/src/rules.cpp +++ b/src/rules.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include static std::map gsColor; diff --git a/src/rules.h b/src/rules.h new file mode 100644 index 000000000..d0d8c7f85 --- /dev/null +++ b/src/rules.h @@ -0,0 +1,47 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Copyright 2006 - 2025, Tomas Babej, Paul Beckingham, Federico Hernandez, +// Tobias Predel. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// https://www.opensource.org/licenses/mit-license.php +// +//////////////////////////////////////////////////////////////////////////////// + +#ifndef INCLUDED_RULES +#define INCLUDED_RULES + +#include +// cmake.h include header must come first + +#include +#include +#include + +void initializeColorRules(); +void autoColorize(Task& task, Color& c); +std::string colorizeHeader(const std::string& input); +std::string colorizeFootnote(const std::string& input); +std::string colorizeError(const std::string& input); +std::string colorizeDebug(const std::string& input); + +#endif + +//////////////////////////////////////////////////////////////////////////////// diff --git a/src/sort.h b/src/sort.h new file mode 100644 index 000000000..6972f9c2e --- /dev/null +++ b/src/sort.h @@ -0,0 +1,51 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Copyright 2006 - 2025, Tomas Babej, Paul Beckingham, Federico Hernandez, +// Tobias Predel. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// https://www.opensource.org/licenses/mit-license.php +// +//////////////////////////////////////////////////////////////////////////////// + +#ifndef INCLUDED_SORT +#define INCLUDED_SORT + +#include +// cmake.h include header must come first + +#include + +#include +#include +#include +#include + +void sort_tasks(std::vector& data, std::vector& order, const std::string& keys); + +void sort_projects(std::list>& sorted, + std::map& allProjects); + +void sort_projects(std::list>& sorted, + std::map& allProjects); + +#endif + +//////////////////////////////////////////////////////////////////////////////// diff --git a/src/util.cpp b/src/util.cpp index 78174028b..ebbbf2191 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -34,8 +34,8 @@ #ifdef FREEBSD #define _WITH_GETLINE #endif +#include #include -#include #include #include #include diff --git a/test/col_test.cpp b/test/col_test.cpp index d2ffd378c..d6a8f5e1d 100644 --- a/test/col_test.cpp +++ b/test/col_test.cpp @@ -28,8 +28,6 @@ // cmake.h include header must come first #include -#include -#include #include //////////////////////////////////////////////////////////////////////////////// diff --git a/test/make_tc_task.cpp b/test/make_tc_task.cpp index b14560a8e..37f1d963f 100644 --- a/test/make_tc_task.cpp +++ b/test/make_tc_task.cpp @@ -28,16 +28,12 @@ // cmake.h include header must come first #include -#include #include #include #include #include #include -#include - -#include "format.h" namespace { diff --git a/test/t_test.cpp b/test/t_test.cpp index a7063b19f..f953914fd 100644 --- a/test/t_test.cpp +++ b/test/t_test.cpp @@ -27,10 +27,11 @@ #include // cmake.h include header must come first -#include #include #include +#include "Context.h" + //////////////////////////////////////////////////////////////////////////////// int TEST_NAME(int, char**) { UnitTest test(48); diff --git a/test/tdb2_test.cpp b/test/tdb2_test.cpp index 76a27cc33..f1baf2444 100644 --- a/test/tdb2_test.cpp +++ b/test/tdb2_test.cpp @@ -27,12 +27,10 @@ #include // cmake.h include header must come first -#include -#include #include #include -#include +#include "Context.h" namespace { diff --git a/test/tw_2689_test.cpp b/test/tw_2689_test.cpp index cbbad40f1..81610eeba 100644 --- a/test/tw_2689_test.cpp +++ b/test/tw_2689_test.cpp @@ -26,11 +26,9 @@ #include -#include // cmake.h include header must come first -#include -#include +#include #include //////////////////////////////////////////////////////////////////////////////// diff --git a/test/util_test.cpp b/test/util_test.cpp index 8e52a723a..43a9c9bcd 100644 --- a/test/util_test.cpp +++ b/test/util_test.cpp @@ -27,12 +27,11 @@ #include // cmake.h include header must come first -#include -#include +#include +#include #include #include -#include #include //////////////////////////////////////////////////////////////////////////////// diff --git a/test/view_test.cpp b/test/view_test.cpp index 51423e4db..09b0c774c 100644 --- a/test/view_test.cpp +++ b/test/view_test.cpp @@ -31,9 +31,8 @@ #include #include #include -#include +#include #include -#include #include #include From a3e0dada30eca94e550b742248fdcf3b3291fa19 Mon Sep 17 00:00:00 2001 From: Tobias Predel Date: Sun, 2 Mar 2025 17:03:18 +0100 Subject: [PATCH 25/76] Remove unused includes (#3798) --- src/commands/CmdImportV2.h | 1 - src/commands/CmdSync.cpp | 3 --- src/commands/CmdTags.cpp | 1 - src/commands/CmdVersion.cpp | 1 - src/commands/Command.h | 1 - 5 files changed, 7 deletions(-) diff --git a/src/commands/CmdImportV2.h b/src/commands/CmdImportV2.h index 049d66d0e..5cfddd63d 100644 --- a/src/commands/CmdImportV2.h +++ b/src/commands/CmdImportV2.h @@ -31,7 +31,6 @@ #include #include -#include class CmdImportV2 : public Command { public: diff --git a/src/commands/CmdSync.cpp b/src/commands/CmdSync.cpp index 427cca5dd..c0fa93c36 100644 --- a/src/commands/CmdSync.cpp +++ b/src/commands/CmdSync.cpp @@ -32,13 +32,10 @@ #include #include #include -#include #include -#include #include #include -#include #include //////////////////////////////////////////////////////////////////////////////// diff --git a/src/commands/CmdTags.cpp b/src/commands/CmdTags.cpp index 4c79832ad..ee4b6b018 100644 --- a/src/commands/CmdTags.cpp +++ b/src/commands/CmdTags.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include diff --git a/src/commands/CmdVersion.cpp b/src/commands/CmdVersion.cpp index e4dd57e10..21bce985a 100644 --- a/src/commands/CmdVersion.cpp +++ b/src/commands/CmdVersion.cpp @@ -31,7 +31,6 @@ #include #include #include -#include #include #ifdef HAVE_COMMIT diff --git a/src/commands/Command.h b/src/commands/Command.h index 02ff51ce6..6292160be 100644 --- a/src/commands/Command.h +++ b/src/commands/Command.h @@ -31,7 +31,6 @@ #include #include -#include class Command { public: From 3bb71390a9db32a5399b11a99cc018019d40a2c1 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Mon, 3 Mar 2025 11:43:20 -0500 Subject: [PATCH 26/76] Ignore "target" in creating `source_package` (#3799) Cargo creates this directory if run directly, but it shouldn't be in the release tarball. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a6cbadc3f..3e34703f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -162,6 +162,6 @@ endforeach (doc_FILE) set (CPACK_SOURCE_GENERATOR "TGZ") set (CPACK_SOURCE_PACKAGE_FILE_NAME ${PACKAGE_NAME}-${PACKAGE_VERSION}) -set (CPACK_SOURCE_IGNORE_FILES "build" "test" "misc/*" "performance" "swp$" "src/lex$" "task-.*.tar.gz" +set (CPACK_SOURCE_IGNORE_FILES "build" "target" "test" "misc/*" "performance" "swp$" "src/lex$" "task-.*.tar.gz" "commit.h" "cmake.h$" "\\\\.gitmodules" "src/libshared/\\\\.git" ".github/" ".*\\\\.gitignore$" "docker-compose.yml" "\\\\.git/") include (CPack) From 1567ea5c060aafba6a5bfb61b42a6a285f88dd75 Mon Sep 17 00:00:00 2001 From: Tobias Predel Date: Mon, 3 Mar 2025 18:14:39 +0100 Subject: [PATCH 27/76] Remove header files out of CMakeLists (#3797) It does not make any difference. --- src/CMakeLists.txt | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 45b027c4a..5905696d2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,20 +6,20 @@ include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src/libshared/src ${TASK_INCLUDE_DIRS}) -add_library (task STATIC CLI2.cpp CLI2.h - Context.cpp Context.h - DOM.cpp DOM.h - Eval.cpp Eval.h - Filter.cpp Filter.h - Hooks.cpp Hooks.h - Lexer.cpp Lexer.h - Operation.cpp Operation.h - TF2.cpp TF2.h - TDB2.cpp TDB2.h - Task.cpp Task.h - Variant.cpp Variant.h - Version.cpp Version.h - ViewTask.cpp ViewTask.h +add_library (task STATIC CLI2.cpp + Context.cpp + DOM.cpp + Eval.cpp + Filter.cpp + Hooks.cpp + Lexer.cpp + Operation.cpp + TF2.cpp + TDB2.cpp + Task.cpp + Variant.cpp + Version.cpp + ViewTask.cpp dependency.cpp feedback.cpp legacy.cpp @@ -27,7 +27,7 @@ add_library (task STATIC CLI2.cpp CLI2.h recur.cpp rules.cpp sort.cpp - util.cpp util.h) + util.cpp) target_link_libraries(task taskchampion-cpp) add_library (libshared STATIC libshared/src/Color.cpp libshared/src/Color.h From bcb3f820ab7b1e3381c62642fc92b1ebea05d94f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 16:30:31 -0500 Subject: [PATCH 28/76] Bump docker/build-push-action from 6.14.0 to 6.15.0 (#3800) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.14.0 to 6.15.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v6.14.0...v6.15.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index 7c4ea0733..a0414c233 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -44,7 +44,7 @@ jobs: - name: Build and push Taskwarrior Docker image id: build-and-push - uses: docker/build-push-action@v6.14.0 + uses: docker/build-push-action@v6.15.0 with: context: . file: "./docker/task.dockerfile" From 3c12c0dfd080212a5dac82db1a14ffa8a84cccdd Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Thu, 6 Mar 2025 06:59:04 -0500 Subject: [PATCH 29/76] Fix errors finding Rust toolchain (#3802) * switch to dtolnay/toolchain * Add .dockerignore to avoid copying target/ into images * update corrosion --- .dockerignore | 1 + .github/workflows/checks.yml | 46 +++++++++++++--------------- .github/workflows/release-check.yaml | 10 +++--- .github/workflows/tests.yaml | 45 ++++++++++++--------------- src/taskchampion-cpp/corrosion | 2 +- 5 files changed, 48 insertions(+), 56 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..eb5a316cb --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +target diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 78d5c74ee..c99fae36a 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -15,25 +15,25 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Cache cargo registry - uses: actions/cache@v4 - with: - path: ~/.cargo/registry - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - - - name: Cache cargo build - uses: actions/cache@v4 - with: - path: target - key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} - - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@master + id: toolchain with: # If this version is old enough to cause errors, or older than the # TaskChampion MSRV, bump it to the MSRV of the currently-required # TaskChampion package; if necessary, bump that version as well. toolchain: "1.81.0" # MSRV - override: true + + - name: Cache cargo registry + uses: actions/cache@v4 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }} + + - name: Cache cargo build + uses: actions/cache@v4 + with: + path: target + key: ${{ runner.os }}-cargo-build-target-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }} - uses: actions-rs/cargo@v1.0.3 with: @@ -53,12 +53,11 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@master + id: toolchain with: - profile: minimal - components: rustfmt - toolchain: stable - override: true + toolchain: "stable" + components: "rustfmt" - uses: actions-rs/cargo@v1.0.3 with: @@ -71,12 +70,11 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@master + id: toolchain with: - profile: minimal - components: rustfmt - toolchain: stable - override: true + toolchain: "stable" + components: "rustfmt" - name: "Check metadata" run: ".github/workflows/metadata-check.sh" diff --git a/.github/workflows/release-check.yaml b/.github/workflows/release-check.yaml index 8138356a7..57cfa0dc7 100644 --- a/.github/workflows/release-check.yaml +++ b/.github/workflows/release-check.yaml @@ -6,16 +6,14 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + id: toolchain + - name: Cache cargo registry uses: actions/cache@v4 with: path: ~/.cargo/registry - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - - - uses: actions-rs/toolchain@v1 - with: - toolchain: "stable" - override: true + key: ${{ runner.os }}-cargo-registry-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }} - name: Install uuid-dev run: sudo apt install uuid-dev diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 78c6b74dc..bdc3347ee 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -43,22 +43,20 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + id: toolchain + - name: Cache cargo registry uses: actions/cache@v4 with: path: ~/.cargo/registry - key: ${{ runner.os }}-stable-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-cargo-registry-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo build uses: actions/cache@v4 with: path: target - key: ${{ runner.os }}-stable-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} - - - uses: actions-rs/toolchain@v1 - with: - toolchain: "stable" - override: true + key: ${{ runner.os }}-cargo-build-target-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }} - name: Test MacOS run: bash test/scripts/test_macos.sh @@ -72,22 +70,20 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + id: toolchain + - name: Cache cargo registry uses: actions/cache@v4 with: path: ~/.cargo/registry - key: ${{ runner.os }}-stable-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-cargo-registry-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo build uses: actions/cache@v4 with: path: target - key: ${{ runner.os }}-stable-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} - - - uses: actions-rs/toolchain@v1 - with: - toolchain: "stable" - override: true + key: ${{ runner.os }}-cargo-build-target-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }} - name: Test MacOS run: bash test/scripts/test_macos.sh @@ -101,26 +97,25 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master + id: toolchain + with: + # If this version is old enough to cause errors, or older than the + # TaskChampion MSRV, bump it to the MSRV of the currently-required + # TaskChampion package; if necessary, bump that version as well. + toolchain: "1.81.0" # MSRV + - name: Cache cargo registry uses: actions/cache@v4 with: path: ~/.cargo/registry - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-cargo-registry-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo build uses: actions/cache@v4 with: path: target - key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} - - - uses: actions-rs/toolchain@v1 - with: - # If this version is old enough to cause errors, or older than the - # TaskChampion MSRV, bump it to the MSRV of the currently-required - # TaskChampion package; if necessary, bump that version as well. - # This should match the MSRV in `src/taskchampion-cpp/Cargo.toml`. - toolchain: "1.81.0" # MSRV - override: true + key: ${{ runner.os }}-cargo-build-target-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }} - uses: actions-rs/cargo@v1.0.3 with: diff --git a/src/taskchampion-cpp/corrosion b/src/taskchampion-cpp/corrosion index 64289b1d7..fcd8b4198 160000 --- a/src/taskchampion-cpp/corrosion +++ b/src/taskchampion-cpp/corrosion @@ -1 +1 @@ -Subproject commit 64289b1d79d6d19cd2e241db515381a086bb8407 +Subproject commit fcd8b41981cb1e80f4dcc20fa8970dc6aa981c9f From 5ec0f4ebc03c222503b55d8e136e097705abe502 Mon Sep 17 00:00:00 2001 From: Yong Li Date: Thu, 6 Mar 2025 12:33:37 +0000 Subject: [PATCH 30/76] Update task.1.in (#3804) Clearly this is an error. The example command should use foo. --- doc/man/task.1.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/task.1.in b/doc/man/task.1.in index 52bbcaab5..c779b2075 100644 --- a/doc/man/task.1.in +++ b/doc/man/task.1.in @@ -1037,7 +1037,7 @@ modifier requires that the attribute contain the whole word specified, such that this: .nf - task description.word:bar list + task description.word:foo list .fi Will match the description 'foo bar baz' but does not match 'dog food'. From 022650dbffe04221d3d33f43570920be7a067523 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Thu, 6 Mar 2025 07:43:41 -0500 Subject: [PATCH 31/76] Make updates after releasing (#3803) * add symlinks for ease of access * Update things after making a release, to maximize testing time --- CONTRIBUTING.md | 1 + RELEASING.md | 1 + doc/devel/contrib/releasing.md | 3 +++ 3 files changed, 5 insertions(+) create mode 120000 CONTRIBUTING.md create mode 120000 RELEASING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 120000 index 000000000..a5e92ccc7 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1 @@ +doc/devel/contrib/development.md \ No newline at end of file diff --git a/RELEASING.md b/RELEASING.md new file mode 120000 index 000000000..51170bf7a --- /dev/null +++ b/RELEASING.md @@ -0,0 +1 @@ +doc/devel/contrib/releasing.md \ No newline at end of file diff --git a/doc/devel/contrib/releasing.md b/doc/devel/contrib/releasing.md index d8b4fa125..ffaf1ea67 100644 --- a/doc/devel/contrib/releasing.md +++ b/doc/devel/contrib/releasing.md @@ -24,3 +24,6 @@ To release Taskwarrior, follow this process: - Add a new item in `content/news` - Update `data/projects.json` with the latest version and a fake next version for "devel" - Update `data/releases.json` with the new version, and copy the tarball into `content/download`. +- Update various things, in a new PR: + - `cargo update` + - `git submodule update --remote --merge` From 74276b400ccbe051003f36f55b70b5c6e5a7892b Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Thu, 6 Mar 2025 10:59:14 -0500 Subject: [PATCH 32/76] Generate valid JSON even with invalid dates (#3801) --- src/Task.cpp | 8 ++++++-- test/unusual_task.test.py | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Task.cpp b/src/Task.cpp index 536f17a24..9779ed3bf 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -798,8 +798,6 @@ std::string Task::composeJSON(bool decorate /*= false*/) const { // If value is an empty string, do not ever output it if (i.second == "") continue; - if (attributes_written) out << ','; - std::string type = Task::attributes[i.first]; if (type == "") type = "string"; @@ -808,6 +806,8 @@ std::string Task::composeJSON(bool decorate /*= false*/) const { time_t epoch = get_date(i.first); if (epoch != 0) { Datetime d(i.second); + if (attributes_written) out << ','; + out << '"' << (i.first == "modification" ? "modified" : i.first) << "\":\"" // Date was deleted, do not export parsed empty string @@ -824,6 +824,8 @@ std::string Task::composeJSON(bool decorate /*= false*/) const { } */ else if (type == "numeric") { + if (attributes_written) out << ','; + out << '"' << i.first << "\":" << i.second; ++attributes_written; @@ -831,6 +833,8 @@ std::string Task::composeJSON(bool decorate /*= false*/) const { // Everything else is a quoted value. else { + if (attributes_written) out << ','; + out << '"' << i.first << "\":\"" << (type == "string" ? json::encode(i.second) : i.second) << '"'; diff --git a/test/unusual_task.test.py b/test/unusual_task.test.py index 8eb5bbaf7..18f8efffe 100755 --- a/test/unusual_task.test.py +++ b/test/unusual_task.test.py @@ -29,6 +29,7 @@ import sys import os import re import time +import json import unittest # Ensure python finds the local simpletap module @@ -192,6 +193,7 @@ class TestUnusualTasks(TestCase): modified="modified", ) _, out, _ = self.t(f"{uuid} export") + json.loads(out) if __name__ == "__main__": From 0c9205aa175655a5a96814760763b8e73cff4a4d Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Thu, 6 Mar 2025 19:33:38 -0500 Subject: [PATCH 33/76] Update ring (#3806) --- Cargo.lock | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b2120f98a..bd42bbad3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -587,9 +587,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.30" +version = "1.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945" +checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" dependencies = [ "shlex", ] @@ -2095,15 +2095,14 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.8" +version = "0.17.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "70ac5d832aa16abd7d1def883a8545280c20a60f523a370aa3a9617c2b8550ee" dependencies = [ "cc", "cfg-if", "getrandom", "libc", - "spin", "untrusted", "windows-sys 0.52.0", ] @@ -2457,12 +2456,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - [[package]] name = "spki" version = "0.6.0" From 5814526429d09d6a750a5a8bf36389ea636cc5fa Mon Sep 17 00:00:00 2001 From: Tobias Predel Date: Sat, 8 Mar 2025 15:04:01 +0100 Subject: [PATCH 34/76] Remove headers (#3807) --- src/CMakeLists.txt | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5905696d2..eaf5025e5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -30,23 +30,22 @@ add_library (task STATIC CLI2.cpp util.cpp) target_link_libraries(task taskchampion-cpp) -add_library (libshared STATIC libshared/src/Color.cpp libshared/src/Color.h - libshared/src/Configuration.cpp libshared/src/Configuration.h - libshared/src/Datetime.cpp libshared/src/Datetime.h - libshared/src/Duration.cpp libshared/src/Duration.h - libshared/src/FS.cpp libshared/src/FS.h - libshared/src/JSON.cpp libshared/src/JSON.h - libshared/src/Msg.cpp libshared/src/Msg.h - libshared/src/Pig.cpp libshared/src/Pig.h - libshared/src/RX.cpp libshared/src/RX.h - libshared/src/Table.cpp libshared/src/Table.h - libshared/src/Timer.cpp libshared/src/Timer.h - libshared/src/format.cpp libshared/src/format.h +add_library (libshared STATIC libshared/src/Color.cpp + libshared/src/Configuration.cpp + libshared/src/Datetime.cpp + libshared/src/Duration.cpp + libshared/src/FS.cpp + libshared/src/JSON.cpp + libshared/src/Msg.cpp + libshared/src/Pig.cpp + libshared/src/RX.cpp + libshared/src/Table.cpp + libshared/src/Timer.cpp + libshared/src/format.cpp libshared/src/ip.cpp - libshared/src/shared.cpp libshared/src/shared.h - libshared/src/unicode.cpp libshared/src/unicode.h - libshared/src/utf8.cpp libshared/src/utf8.h - libshared/src/wcwidth.h) + libshared/src/shared.cpp + libshared/src/unicode.cpp + libshared/src/utf8.cpp) add_executable (task_executable main.cpp) add_executable (calc_executable calc.cpp) From 5c67d22540999902d012f989d4087034a8d01b0d Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Sat, 8 Mar 2025 14:20:21 +0000 Subject: [PATCH 35/76] Remove sponsorship outro from 'task news' --- src/commands/CmdNews.cpp | 56 ---------------------------------------- 1 file changed, 56 deletions(-) diff --git a/src/commands/CmdNews.cpp b/src/commands/CmdNews.cpp index cbda073d5..e94ea07f9 100644 --- a/src/commands/CmdNews.cpp +++ b/src/commands/CmdNews.cpp @@ -572,62 +572,6 @@ int CmdNews::execute(std::string& output) { } wait_for_enter(); - // Display outro - Datetime now; - Datetime beginning(2006, 11, 29); - Duration development_time = Duration(now - beginning); - - Color underline = Color("underline"); - - std::stringstream outro; - outro << underline.colorize(bold.colorize("Taskwarrior crowdfunding\n")); - outro << format( - "Taskwarrior has been in development for {1} years but its survival\n" - "depends on your support!\n\n" - "Please consider joining our {2} fundraiser to help us fund maintenance\n" - "and development of new features:\n\n", - std::lround(static_cast(development_time.days()) / 365.25), now.year()); - outro << bold.colorize(" https://github.com/sponsors/GothenburgBitFactory/\n\n"); - outro << "Perks are available for our sponsors.\n"; - - std::cout << outro.str(); - - // Set a mark in the config to remember which version's release notes were displayed - if (news_version < current_version) { - CmdConfig::setConfigVariable("news.version", std::string(current_version), false); - - // Revert back to default signal handling after displaying the outro - signal(SIGINT, SIG_DFL); - - std::string question = format( - "\nWould you like to open Taskwarrior {1} fundraising campaign to read more?", now.year()); - - std::vector options{"yes", "no"}; - std::vector matches; - - std::cout << question << " (YES/no) "; - - std::string answer; - std::getline(std::cin, answer); - - if (std::cin.eof() || trim(answer).empty()) - answer = "yes"; - else - lowerCase(trim(answer)); - - autoComplete(answer, options, matches, 1); // Hard-coded 1. - - if (matches.size() == 1 && matches[0] == "yes") -#if defined(DARWIN) - system("open 'https://github.com/sponsors/GothenburgBitFactory/'"); -#else - system("xdg-open 'https://github.com/sponsors/GothenburgBitFactory/'"); -#endif - - std::cout << std::endl; - } else - wait_for_enter(); // Do not display the outro and footnote at once - return 0; } From f73b42d23f6318d8e14d2c7113fcda0865964e4c Mon Sep 17 00:00:00 2001 From: Ram-Z Date: Wed, 12 Mar 2025 20:48:49 +0000 Subject: [PATCH 36/76] Allow dur/dur division (#3812) It is perfectly valid to divide two durations, it is a ratio with no unit. --- src/Variant.cpp | 5 +++-- test/variant_divide_test.cpp | 11 ++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Variant.cpp b/src/Variant.cpp index a5b68f172..ef0a08ac3 100644 --- a/src/Variant.cpp +++ b/src/Variant.cpp @@ -75,7 +75,6 @@ #define STRING_VARIANT_DIV_DUR_BOOL "Cannot divide duration by Boolean" #define STRING_VARIANT_DIV_DUR_STR "Cannot divide durations by strings" #define STRING_VARIANT_DIV_DUR_DATE "Cannot divide durations by dates" -#define STRING_VARIANT_DIV_DUR_DUR "Cannot divide durations by durations" #define STRING_VARIANT_MOD_BOOL "Cannot modulo Booleans" #define STRING_VARIANT_MOD_DATE "Cannot modulo date values" #define STRING_VARIANT_MOD_DUR "Cannot modulo duration values" @@ -1760,7 +1759,9 @@ Variant& Variant::operator/=(const Variant& other) { throw std::string(STRING_VARIANT_DIV_DUR_DATE); case type_duration: - throw std::string(STRING_VARIANT_DIV_DUR_DUR); + _type = type_real; + _real = static_cast(_duration) / static_cast(right._duration); + break; } break; } diff --git a/test/variant_divide_test.cpp b/test/variant_divide_test.cpp index c1df0c158..b1fc973d3 100644 --- a/test/variant_divide_test.cpp +++ b/test/variant_divide_test.cpp @@ -302,13 +302,10 @@ int TEST_NAME(int, char**) { } // duration / duration -> duration - try { - Variant v55 = v5 / v5; - t.fail("1200 / 1200 --> error"); - } catch (...) { - t.pass("1200 / 1200 --> error"); - } - + Variant v55 = v5 / v5; + t.is(v55.type(), Variant::type_real, "1200 / 1200 --> real"); + t.is(v55.get_real(), 1.0, "1200 / 1200 --> 1.0"); + t.is((v5 / v52).get_real(), 3.14136, EPSILON, "1200 / 382 --> 3.14136"); return 0; } From 063325b0525ed523a32fd0b670f0de0aa65d40ac Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Wed, 12 Mar 2025 17:58:49 -0400 Subject: [PATCH 37/76] Release 3.4.0 (#3811) --- CMakeLists.txt | 2 +- ChangeLog | 27 +++++++++++++++++++++++---- doc/man/taskrc.5.in | 3 +++ src/commands/CmdNews.cpp | 16 ++++++++++++++++ src/commands/CmdNews.h | 1 + 5 files changed, 44 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e34703f8..4509430b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ enable_testing() set (CMAKE_EXPORT_COMPILE_COMMANDS ON) project (task - VERSION 3.3.0 + VERSION 3.4.0 DESCRIPTION "Taskwarrior - a command-line TODO list manager" HOMEPAGE_URL https://taskwarrior.org/) diff --git a/ChangeLog b/ChangeLog index 7e7540fc9..13c037a7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,32 @@ ------ current release --------------------------- +3.4.0 - + +- Where possible, the task DB is now opened in read-only mode, which improves + performance. This is the case for reports (task lists) only when the `gc` + config is false. +- An updated version of corrosion fixes build errors trying to find the Rust + toolchain. + +Thanks to the following people for contributions to this release: + + - Dustin J. Mitchell + - Kalle Kietäväinen + - Karl + - Matthew + - Tejada-Omar + - Tobias Predel + - Yong Li + - jrmarino + +------ old releases ------------------------------ + +3.3.0 - + - Sync now supports AWS S3 as a backend. - A new `task import-v2` command allows importing Taskwarrior-2.x data files directly. -3.3.0 - - Thanks to the following people for contributions to this release: - Chongyun Lee @@ -18,8 +39,6 @@ Thanks to the following people for contributions to this release: - Scott Mcdermott - Thomas Lauf ------- old releases ------------------------------ - 3.2.0 - - Support for the journal in `task info` has been restored (#3671) and the diff --git a/doc/man/taskrc.5.in b/doc/man/taskrc.5.in index 7ad152ab6..6f60a6439 100644 --- a/doc/man/taskrc.5.in +++ b/doc/man/taskrc.5.in @@ -212,6 +212,9 @@ This is a path to the hook scripts directory. By default it is ~/.task/hooks. .TP .B gc=1 Can be used to temporarily suspend rebuilding, so that task IDs don't change. +Rebuilding requires read/write access to the database, so disabling `gc` may +result in better performance. + Note that this should be used in the form of a command line override (task rc.gc=0 ...), and not permanently used in the .taskrc file, as this significantly affects performance in the long term. diff --git a/src/commands/CmdNews.cpp b/src/commands/CmdNews.cpp index e94ea07f9..cce5f079c 100644 --- a/src/commands/CmdNews.cpp +++ b/src/commands/CmdNews.cpp @@ -160,6 +160,7 @@ std::vector NewsItem::all() { version3_1_0(items); version3_2_0(items); version3_3_0(items); + version3_4_0(items); return items; } @@ -530,6 +531,21 @@ void NewsItem::version3_3_0(std::vector& items) { items.push_back(info); } +void NewsItem::version3_4_0(std::vector& items) { + Version version("3.4.0"); + NewsItem info{version, + /*title=*/"Read-Only Access", + /*bg_title=*/"", + /*background=*/"", + /*punchline=*/"Some Taskwarrior commands operate faster in read-only mode", + /*update=*/ + "Some commands do not need to write to the DB, so can open it in read-only\n" + "mode and thus more quickly. This does not include reports (task lists),\n" + "unless the `gc` config is false. Use `rc.gc=0` in command-lines to allow\n" + "read-only access.\n\n"}; + items.push_back(info); +} + //////////////////////////////////////////////////////////////////////////////// int CmdNews::execute(std::string& output) { auto words = Context::getContext().cli2.getWords(); diff --git a/src/commands/CmdNews.h b/src/commands/CmdNews.h index 6b70c0132..294c0f862 100644 --- a/src/commands/CmdNews.h +++ b/src/commands/CmdNews.h @@ -53,6 +53,7 @@ class NewsItem { static void version3_1_0(std::vector&); static void version3_2_0(std::vector&); static void version3_3_0(std::vector&); + static void version3_4_0(std::vector&); private: NewsItem(Version, const std::string&, const std::string& = "", const std::string& = "", From b792018c005eb7650a300f67e7424b1d18eb22db Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Wed, 12 Mar 2025 18:27:55 -0400 Subject: [PATCH 38/76] Updates after 3.4.0 (#3816) * Cargo update * Update submodules --- Cargo.lock | 1150 ++++++++++++++++++++++++++++++++++--------------- src/libshared | 2 +- 2 files changed, 801 insertions(+), 351 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bd42bbad3..92c5bef32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -26,7 +26,7 @@ dependencies = [ "cfg-if", "once_cell", "version_check", - "zerocopy", + "zerocopy 0.7.35", ] [[package]] @@ -40,9 +40,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "android-tzdata" @@ -67,9 +67,9 @@ checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anyhow" -version = "1.0.89" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" +checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" [[package]] name = "async-stream" @@ -95,15 +95,21 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.83" +version = "0.1.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "d556ec1359574147ec0c4fc5eb525f3f23263a592b1a9c07e0a75b427de55c97" dependencies = [ "proc-macro2", "quote", "syn", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.4.0" @@ -112,9 +118,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-config" -version = "1.5.10" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b49afaa341e8dd8577e1a2200468f98956d6eda50bcf4a53246cc00174ba924" +checksum = "6a84fe2c5e9965fba0fbc2001db252f1d57527d82a905cca85127df227bca748" dependencies = [ "aws-credential-types", "aws-runtime", @@ -123,7 +129,7 @@ dependencies = [ "aws-sdk-sts", "aws-smithy-async", "aws-smithy-http", - "aws-smithy-json 0.60.7", + "aws-smithy-json", "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", @@ -131,7 +137,7 @@ dependencies = [ "bytes", "fastrand", "hex", - "http 0.2.12", + "http 1.3.1", "ring", "time", "tokio", @@ -142,9 +148,9 @@ dependencies = [ [[package]] name = "aws-credential-types" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60e8f6b615cb5fc60a98132268508ad104310f0cfb25a1c22eee76efdf9154da" +checksum = "4471bef4c22a06d2c7a1b6492493d3fdf24a805323109d6874f9c94d5906ac14" dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", @@ -153,10 +159,33 @@ dependencies = [ ] [[package]] -name = "aws-runtime" -version = "1.4.4" +name = "aws-lc-rs" +version = "1.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5ac934720fbb46206292d2c75b57e67acfc56fe7dfd34fb9a02334af08409ea" +checksum = "dabb68eb3a7aa08b46fddfd59a3d55c978243557a90ab804769f7e20e67d2b01" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bbe221bbf523b625a4dd8585c7f38166e31167ec2ca98051dbcb4c3b6e825d2" +dependencies = [ + "bindgen", + "cc", + "cmake", + "dunce", + "fs_extra", +] + +[[package]] +name = "aws-runtime" +version = "1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aff45ffe35196e593ea3b9dd65b320e51e2dda95aff4390bc459e461d09c6ad" dependencies = [ "aws-credential-types", "aws-sigv4", @@ -180,9 +209,9 @@ dependencies = [ [[package]] name = "aws-sdk-s3" -version = "1.65.0" +version = "1.79.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3ba2c5c0f2618937ce3d4a5ad574b86775576fa24006bcb3128c6e2cbf3c34e" +checksum = "a8f63ba8f5fca32061c7d62d866ef65470edde38d4c5f8a0ebb8ff40a0521e1c" dependencies = [ "aws-credential-types", "aws-runtime", @@ -191,7 +220,7 @@ dependencies = [ "aws-smithy-checksums", "aws-smithy-eventstream", "aws-smithy-http", - "aws-smithy-json 0.61.1", + "aws-smithy-json", "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", @@ -202,6 +231,7 @@ dependencies = [ "hex", "hmac", "http 0.2.12", + "http 1.3.1", "http-body 0.4.6", "lru", "once_cell", @@ -214,15 +244,15 @@ dependencies = [ [[package]] name = "aws-sdk-sso" -version = "1.50.0" +version = "1.62.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ca43a4ef210894f93096039ef1d6fa4ad3edfabb3be92b80908b9f2e4b4eab" +checksum = "1d5330ad4e8a1ff49e9f26b738611caa72b105c41d41733801d1a36e8f9de936" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", "aws-smithy-http", - "aws-smithy-json 0.61.1", + "aws-smithy-json", "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", @@ -236,15 +266,15 @@ dependencies = [ [[package]] name = "aws-sdk-ssooidc" -version = "1.51.0" +version = "1.63.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abaf490c2e48eed0bb8e2da2fb08405647bd7f253996e0f93b981958ea0f73b0" +checksum = "7956b1a85d49082347a7d17daa2e32df191f3e23c03d47294b99f95413026a78" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", "aws-smithy-http", - "aws-smithy-json 0.61.1", + "aws-smithy-json", "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", @@ -258,15 +288,15 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.51.0" +version = "1.63.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b68fde0d69c8bfdc1060ea7da21df3e39f6014da316783336deff0a9ec28f4bf" +checksum = "065c533fbe6f84962af33fcf02b0350b7c1f79285baab5924615d2be3b232855" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", "aws-smithy-http", - "aws-smithy-json 0.61.1", + "aws-smithy-json", "aws-smithy-query", "aws-smithy-runtime", "aws-smithy-runtime-api", @@ -281,9 +311,9 @@ dependencies = [ [[package]] name = "aws-sigv4" -version = "1.2.6" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d3820e0c08d0737872ff3c7c1f21ebbb6693d832312d6152bf18ef50a5471c2" +checksum = "69d03c3c05ff80d54ff860fe38c726f6f494c639ae975203a101335f223386db" dependencies = [ "aws-credential-types", "aws-smithy-eventstream", @@ -296,7 +326,7 @@ dependencies = [ "hex", "hmac", "http 0.2.12", - "http 1.2.0", + "http 1.3.1", "once_cell", "p256", "percent-encoding", @@ -310,9 +340,9 @@ dependencies = [ [[package]] name = "aws-smithy-async" -version = "1.2.1" +version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62220bc6e97f946ddd51b5f1361f78996e704677afc518a4ff66b7a72ea1378c" +checksum = "1e190749ea56f8c42bf15dd76c65e14f8f765233e6df9b0506d9d934ebef867c" dependencies = [ "futures-util", "pin-project-lite", @@ -321,15 +351,16 @@ dependencies = [ [[package]] name = "aws-smithy-checksums" -version = "0.60.13" +version = "0.63.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1a71073fca26775c8b5189175ea8863afb1c9ea2cceb02a5de5ad9dfbaa795" +checksum = "b65d21e1ba6f2cdec92044f904356a19f5ad86961acf015741106cdfafd747c0" dependencies = [ "aws-smithy-http", "aws-smithy-types", "bytes", "crc32c", "crc32fast", + "crc64fast-nvme", "hex", "http 0.2.12", "http-body 0.4.6", @@ -342,9 +373,9 @@ dependencies = [ [[package]] name = "aws-smithy-eventstream" -version = "0.60.5" +version = "0.60.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cef7d0a272725f87e51ba2bf89f8c21e4df61b9e49ae1ac367a6d69916ef7c90" +checksum = "7c45d3dddac16c5c59d553ece225a88870cf81b7b813c9cc17b78cf4685eac7a" dependencies = [ "aws-smithy-types", "bytes", @@ -353,9 +384,9 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.60.11" +version = "0.62.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8bc3e8fdc6b8d07d976e301c02fe553f72a39b7a9fea820e023268467d7ab6" +checksum = "c5949124d11e538ca21142d1fba61ab0a2a2c1bc3ed323cdb3e4b878bfb83166" dependencies = [ "aws-smithy-eventstream", "aws-smithy-runtime-api", @@ -364,6 +395,7 @@ dependencies = [ "bytes-utils", "futures-core", "http 0.2.12", + "http 1.3.1", "http-body 0.4.6", "once_cell", "percent-encoding", @@ -373,19 +405,38 @@ dependencies = [ ] [[package]] -name = "aws-smithy-json" -version = "0.60.7" +name = "aws-smithy-http-client" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4683df9469ef09468dad3473d129960119a0d3593617542b7d52086c8486f2d6" +checksum = "0497ef5d53065b7cd6a35e9c1654bd1fefeae5c52900d91d1b188b0af0f29324" dependencies = [ + "aws-smithy-async", + "aws-smithy-runtime-api", "aws-smithy-types", + "h2 0.4.8", + "http 0.2.12", + "http 1.3.1", + "http-body 0.4.6", + "hyper 0.14.32", + "hyper 1.6.0", + "hyper-rustls 0.24.2", + "hyper-rustls 0.27.5", + "hyper-util", + "pin-project-lite", + "rustls 0.21.12", + "rustls 0.23.23", + "rustls-native-certs 0.8.1", + "rustls-pki-types", + "tokio", + "tower", + "tracing", ] [[package]] name = "aws-smithy-json" -version = "0.61.1" +version = "0.61.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4e69cc50921eb913c6b662f8d909131bb3e6ad6cb6090d3a39b66fc5c52095" +checksum = "92144e45819cae7dc62af23eac5a038a58aa544432d2102609654376a900bd07" dependencies = [ "aws-smithy-types", ] @@ -402,42 +453,39 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.7.4" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f20685047ca9d6f17b994a07f629c813f08b5bce65523e47124879e60103d45" +checksum = "f6328865e36c6fd970094ead6b05efd047d3a80ec5fc3be5e743910da9f2ebf8" dependencies = [ "aws-smithy-async", "aws-smithy-http", + "aws-smithy-http-client", "aws-smithy-runtime-api", "aws-smithy-types", "bytes", "fastrand", - "h2", "http 0.2.12", + "http 1.3.1", "http-body 0.4.6", "http-body 1.0.1", - "httparse", - "hyper 0.14.30", - "hyper-rustls 0.24.2", "once_cell", "pin-project-lite", "pin-utils", - "rustls 0.21.12", "tokio", "tracing", ] [[package]] name = "aws-smithy-runtime-api" -version = "1.7.3" +version = "1.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92165296a47a812b267b4f41032ff8069ab7ff783696d217f0994a0d7ab585cd" +checksum = "3da37cf5d57011cb1753456518ec76e31691f1f474b73934a284eb2a1c76510f" dependencies = [ "aws-smithy-async", "aws-smithy-types", "bytes", "http 0.2.12", - "http 1.2.0", + "http 1.3.1", "pin-project-lite", "tokio", "tracing", @@ -446,16 +494,16 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.2.9" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbd94a32b3a7d55d3806fe27d98d3ad393050439dd05eb53ece36ec5e3d3510" +checksum = "836155caafba616c0ff9b07944324785de2ab016141c3550bd1c07882f8cee8f" dependencies = [ "base64-simd", "bytes", "bytes-utils", "futures-core", "http 0.2.12", - "http 1.2.0", + "http 1.3.1", "http-body 0.4.6", "http-body 1.0.1", "http-body-util", @@ -481,9 +529,9 @@ dependencies = [ [[package]] name = "aws-types" -version = "1.3.3" +version = "1.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5221b91b3e441e6675310829fd8984801b772cb1546ef6c0e54dec9f1ac13fef" +checksum = "3873f8deed8927ce8d04487630dc9ff73193bab64742a61d050e57a68dec4125" dependencies = [ "aws-credential-types", "aws-smithy-async", @@ -505,7 +553,7 @@ dependencies = [ "miniz_oxide", "object", "rustc-demangle", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -538,15 +586,38 @@ dependencies = [ [[package]] name = "base64ct" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +checksum = "bb97d56060ee67d285efb8001fec9d2a4c710c32efd2e14b5cbb5ba71930fc2d" + +[[package]] +name = "bindgen" +version = "0.69.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "itertools", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash 1.1.0", + "shlex", + "syn", + "which", +] [[package]] name = "bitflags" -version = "2.6.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" [[package]] name = "block-buffer" @@ -559,9 +630,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "byteorder" @@ -571,9 +642,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.2" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "bytes-utils" @@ -591,9 +662,20 @@ version = "1.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" dependencies = [ + "jobserver", + "libc", "shlex", ] +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + [[package]] name = "cfg-if" version = "1.0.0" @@ -608,9 +690,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" dependencies = [ "android-tzdata", "iana-time-zone", @@ -618,23 +700,34 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets", + "windows-link", +] + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", ] [[package]] name = "clap" -version = "4.5.21" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" +checksum = "6088f3ae8c3608d19260cd7445411865a485688711b78b5be70d78cd96136f83" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.21" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" +checksum = "22a7ef7f676155edfb82daa97f99441f3ebf4a58d5e32f295a56259f1b6facc8" dependencies = [ "anstyle", "clap_lex", @@ -643,9 +736,18 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" + +[[package]] +name = "cmake" +version = "0.1.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" +dependencies = [ + "cc", +] [[package]] name = "codespan-reporting" @@ -673,6 +775,16 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -681,13 +793,28 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] +[[package]] +name = "crc" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + [[package]] name = "crc32c" version = "0.6.8" @@ -706,6 +833,15 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crc64fast-nvme" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4955638f00a809894c947f85a024020a20815b65a5eea633798ea7924edab2b3" +dependencies = [ + "crc", +] + [[package]] name = "crypto-bigint" version = "0.4.9" @@ -740,9 +876,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.133" +version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e1ec88093d2abd9cf1b09ffd979136b8e922bf31cad966a8fe0d73233112ef" +checksum = "4615b1496a78e2c624b792d982e5d2152db2e5b53d401605776ec819e50891ce" dependencies = [ "cc", "cxxbridge-cmd", @@ -754,9 +890,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.133" +version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afa390d956ee7ccb41aeed7ed7856ab3ffb4fc587e7216be7e0f83e949b4e6c" +checksum = "147bafb46dc3ad9d24717723751371147373ffa8cf5f816e0031e34d6998b339" dependencies = [ "cc", "codespan-reporting", @@ -768,9 +904,9 @@ dependencies = [ [[package]] name = "cxxbridge-cmd" -version = "1.0.133" +version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c23bfff654d6227cbc83de8e059d2f8678ede5fc3a6c5a35d5c379983cc61e6" +checksum = "07d4631e3095af42e8de3c73ee2b7d49fe541578ccd9f6b19920ac3c5fef528c" dependencies = [ "clap", "codespan-reporting", @@ -781,15 +917,15 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.133" +version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c01b36e22051bc6928a78583f1621abaaf7621561c2ada1b00f7878fbe2caa" +checksum = "f05c4a04df781bb50f52a16cfd7c580d0d904af8e7c411678be52d84ed3416ab" [[package]] name = "cxxbridge-macro" -version = "1.0.133" +version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6e14013136fac689345d17b9a6df55977251f11d333c0a571e8d963b55e1f95" +checksum = "93be4a484f2b719c2cb56ab5f06e05377987477c7b3bf7a1cf28a266ec8cfaa1" dependencies = [ "proc-macro2", "quote", @@ -850,6 +986,12 @@ dependencies = [ "syn", ] +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "ecdsa" version = "0.14.8" @@ -864,9 +1006,9 @@ dependencies = [ [[package]] name = "either" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "elliptic-curve" @@ -890,18 +1032,28 @@ dependencies = [ [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] [[package]] name = "fallible-iterator" @@ -933,9 +1085,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.34" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc" dependencies = [ "crc32fast", "miniz_oxide", @@ -949,9 +1101,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foldhash" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" [[package]] name = "form_urlencoded" @@ -962,6 +1114,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "futures-channel" version = "0.3.31" @@ -1042,16 +1200,34 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets 0.52.6", +] + [[package]] name = "gimli" version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +[[package]] +name = "glob" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" + [[package]] name = "google-cloud-auth" version = "0.17.2" @@ -1067,7 +1243,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "thiserror 1.0.64", + "thiserror 1.0.69", "time", "tokio", "tracing", @@ -1076,12 +1252,12 @@ dependencies = [ [[package]] name = "google-cloud-metadata" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f945a208886a13d07636f38fb978da371d0abc3e34bad338124b9f8c135a8f" +checksum = "d901aeb453fd80e51d64df4ee005014f6cf39f2d736dd64f7239c132d9d39a6a" dependencies = [ "reqwest", - "thiserror 1.0.64", + "thiserror 1.0.69", "tokio", ] @@ -1111,7 +1287,7 @@ dependencies = [ "serde", "serde_json", "sha2", - "thiserror 1.0.64", + "thiserror 1.0.69", "time", "tokio", "tracing", @@ -1157,6 +1333,25 @@ dependencies = [ "tracing", ] +[[package]] +name = "h2" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.3.1", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "hashbrown" version = "0.14.5" @@ -1192,12 +1387,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - [[package]] name = "hex" version = "0.4.3" @@ -1215,11 +1404,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1235,9 +1424,9 @@ dependencies = [ [[package]] name = "http" -version = "1.2.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ "bytes", "fnv", @@ -1262,27 +1451,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.2.0", + "http 1.3.1", ] [[package]] name = "http-body-util" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", - "futures-util", - "http 1.2.0", + "futures-core", + "http 1.3.1", "http-body 1.0.1", "pin-project-lite", ] [[package]] name = "httparse" -version = "1.9.5" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "httpdate" @@ -1292,15 +1481,15 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", - "h2", + "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", "httparse", @@ -1316,14 +1505,15 @@ dependencies = [ [[package]] name = "hyper" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.2.0", + "h2 0.4.8", + "http 1.3.1", "http-body 1.0.1", "httparse", "itoa", @@ -1341,7 +1531,7 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.30", + "hyper 0.14.32", "log", "rustls 0.21.12", "rustls-native-certs 0.6.3", @@ -1351,18 +1541,19 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.3" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", - "http 1.2.0", - "hyper 1.5.1", + "http 1.3.1", + "hyper 1.6.0", "hyper-util", - "rustls 0.23.19", + "rustls 0.23.23", + "rustls-native-certs 0.8.1", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.1", + "tokio-rustls 0.26.2", "tower-service", "webpki-roots", ] @@ -1376,9 +1567,9 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", - "hyper 1.5.1", + "hyper 1.6.0", "pin-project-lite", "socket2", "tokio", @@ -1550,9 +1741,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" dependencies = [ "equivalent", "hashbrown 0.15.2", @@ -1560,32 +1751,51 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.10.1" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] [[package]] name = "jsonwebtoken" -version = "9.3.0" +version = "9.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" +checksum = "5a87cc7a48537badeae96744432de36f4be2b4a34a05a5ef32e9dd8a1c169dde" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "js-sys", "pem", "ring", @@ -1595,10 +1805,32 @@ dependencies = [ ] [[package]] -name = "libc" -version = "0.2.159" +name = "lazy_static" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.171" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" + +[[package]] +name = "libloading" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +dependencies = [ + "cfg-if", + "windows-targets 0.52.6", +] [[package]] name = "libsqlite3-sys" @@ -1613,18 +1845,24 @@ dependencies = [ [[package]] name = "link-cplusplus" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d240c6f7e1ba3a28b0249f774e6a9dd0175054b52dfbb61b16eb8505c3785c9" +checksum = "4a6f6da007f968f9def0d65a05b187e2960183de70c160204ecfccf0ee330212" dependencies = [ "cc", ] [[package]] -name = "litemap" -version = "0.7.4" +name = "linux-raw-sys" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "litemap" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" [[package]] name = "lock_api" @@ -1638,9 +1876,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.22" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" [[package]] name = "lru" @@ -1684,26 +1922,41 @@ dependencies = [ ] [[package]] -name = "miniz_oxide" -version = "0.8.0" +name = "minimal-lexical" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" dependencies = [ "adler2", ] [[package]] name = "mio" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "hermit-abi", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + [[package]] name = "num-bigint" version = "0.4.6" @@ -1740,30 +1993,30 @@ dependencies = [ [[package]] name = "object" -version = "0.36.5" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.20.2" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "cde51589ab56b20a6f686b2c68f7a0bd6add753d697abf720d63f8db3ab7b1ad" [[package]] name = "openssl-probe" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "outref" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a" +checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e" [[package]] name = "p256" @@ -1796,14 +2049,14 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] name = "pem" -version = "3.0.4" +version = "3.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" +checksum = "38af38e8470ac9dee3ce1bae1af9c1671fffc44ddfd8bd1d0a3445bf349a8ef3" dependencies = [ "base64 0.22.1", "serde", @@ -1826,9 +2079,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -1858,9 +2111,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "powerfmt" @@ -1870,18 +2123,28 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ - "zerocopy", + "zerocopy 0.8.23", +] + +[[package]] +name = "prettyplease" +version = "0.2.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1ccf34da56fc294e7d4ccf69a85992b7dfb826b7cf57bac6a70bba3494cc08a" +dependencies = [ + "proc-macro2", + "syn", ] [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" dependencies = [ "unicode-ident", ] @@ -1896,10 +2159,10 @@ dependencies = [ "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash", - "rustls 0.23.19", + "rustc-hash 2.1.1", + "rustls 0.23.23", "socket2", - "thiserror 2.0.6", + "thiserror 2.0.12", "tokio", "tracing", ] @@ -1911,14 +2174,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" dependencies = [ "bytes", - "getrandom", + "getrandom 0.2.15", "rand", "ring", - "rustc-hash", - "rustls 0.23.19", + "rustc-hash 2.1.1", + "rustls 0.23.23", "rustls-pki-types", "slab", - "thiserror 2.0.6", + "thiserror 2.0.12", "tinyvec", "tracing", "web-time", @@ -1926,9 +2189,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.8" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52cd4b1eff68bf27940dd39811292c49e007f4d0b4c357358dc9b0197be6b527" +checksum = "e46f3055866785f6b92bc6164b76be02ca8f2eb4b002c0354b28cf4c119e5944" dependencies = [ "cfg_aliases", "libc", @@ -1940,9 +2203,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] @@ -1974,23 +2237,23 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", ] [[package]] name = "redox_syscall" -version = "0.5.7" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1" dependencies = [ "bitflags", ] [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -2000,9 +2263,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -2023,20 +2286,20 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.9" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" +checksum = "989e327e510263980e231de548a33e63d34962d29ae61b467389a1a09627a254" dependencies = [ "base64 0.22.1", "bytes", "encoding_rs", "futures-core", "futures-util", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.5.1", - "hyper-rustls 0.27.3", + "hyper 1.6.0", + "hyper-rustls 0.27.5", "hyper-util", "ipnet", "js-sys", @@ -2047,7 +2310,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.19", + "rustls 0.23.23", "rustls-pemfile 2.2.0", "rustls-pki-types", "serde", @@ -2055,8 +2318,9 @@ dependencies = [ "serde_urlencoded", "sync_wrapper", "tokio", - "tokio-rustls 0.26.1", + "tokio-rustls 0.26.2", "tokio-util", + "tower", "tower-service", "url", "wasm-bindgen", @@ -2069,16 +2333,16 @@ dependencies = [ [[package]] name = "reqwest-middleware" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1ccd3b55e711f91a9885a2fa6fbbb2e39db1776420b062efc058c6410f7e5e3" +checksum = "64e8975513bd9a7a43aad01030e79b3498e05db14e9d945df6483e8cf9b8c4c4" dependencies = [ "anyhow", "async-trait", - "http 1.2.0", + "http 1.3.1", "reqwest", "serde", - "thiserror 1.0.64", + "thiserror 1.0.69", "tower-service", ] @@ -2095,13 +2359,13 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.13" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ac5d832aa16abd7d1def883a8545280c20a60f523a370aa3a9617c2b8550ee" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", "untrusted", "windows-sys 0.52.0", @@ -2129,9 +2393,15 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" -version = "2.1.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustc_version" @@ -2142,6 +2412,19 @@ dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", +] + [[package]] name = "rustls" version = "0.21.12" @@ -2156,10 +2439,11 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.19" +version = "0.23.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" +checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395" dependencies = [ + "aws-lc-rs", "log", "once_cell", "ring", @@ -2178,7 +2462,7 @@ dependencies = [ "openssl-probe", "rustls-pemfile 1.0.4", "schannel", - "security-framework", + "security-framework 2.11.1", ] [[package]] @@ -2191,7 +2475,19 @@ dependencies = [ "rustls-pemfile 2.2.0", "rustls-pki-types", "schannel", - "security-framework", + "security-framework 2.11.1", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework 3.2.0", ] [[package]] @@ -2214,9 +2510,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" dependencies = [ "web-time", ] @@ -2237,6 +2533,7 @@ version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -2244,21 +2541,21 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "schannel" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ "windows-sys 0.59.0", ] @@ -2271,9 +2568,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "scratch" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" +checksum = "9f6280af86e5f559536da57a45ebc84948833b3bee313a7dd25232e09c878a52" [[package]] name = "sct" @@ -2306,7 +2603,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags", - "core-foundation", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" +dependencies = [ + "bitflags", + "core-foundation 0.10.0", "core-foundation-sys", "libc", "security-framework-sys", @@ -2314,9 +2624,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -2324,24 +2634,24 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" [[package]] name = "serde" -version = "1.0.210" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", @@ -2350,9 +2660,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ "itoa", "memchr", @@ -2421,13 +2731,13 @@ dependencies = [ [[package]] name = "simple_asn1" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" +checksum = "297f631f50729c8c99b84667867963997ec0b50f32b2a7dbcab828ef0541e8bb" dependencies = [ "num-bigint", "num-traits", - "thiserror 1.0.64", + "thiserror 2.0.12", "time", ] @@ -2442,15 +2752,15 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2515,9 +2825,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.90" +version = "2.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" dependencies = [ "proc-macro2", "quote", @@ -2565,7 +2875,7 @@ dependencies = [ "serde_json", "strum", "strum_macros", - "thiserror 2.0.6", + "thiserror 2.0.12", "tokio", "ureq", "url", @@ -2592,27 +2902,27 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl 1.0.64", + "thiserror-impl 1.0.69", ] [[package]] name = "thiserror" -version = "2.0.6" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec2a1820ebd077e2b90c4df007bebf344cd394098a13c563957d0afc83ea47" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" dependencies = [ - "thiserror-impl 2.0.6", + "thiserror-impl 2.0.12", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", @@ -2621,9 +2931,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.6" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d65750cab40f4ff1929fb1ba509e9914eb756131cef4210da8d5d700d26f6312" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", @@ -2632,9 +2942,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "dad298b01a40a23aac4580b67e3dbedb7cc8402f3592d7f49469de2ea4aecdd8" dependencies = [ "deranged", "itoa", @@ -2647,15 +2957,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "765c97a5b985b7c11d7bc27fa927dc4fe6af3a6dfb021d28deb60d3bf51e76ef" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "e8093bc3e81c3bc5f7879de09619d06c9a5a5e45ca44dfeeb7225bae38005c5c" dependencies = [ "num-conv", "time-core", @@ -2673,9 +2983,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" dependencies = [ "tinyvec_macros", ] @@ -2688,9 +2998,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "9975ea0f48b5aa3972bf2d888c238182458437cc2a19374b81b25cdf1023fb3a" dependencies = [ "backtrace", "bytes", @@ -2706,9 +3016,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", @@ -2727,19 +3037,19 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" +checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" dependencies = [ - "rustls 0.23.19", + "rustls 0.23.23", "tokio", ] [[package]] name = "tokio-util" -version = "0.7.12" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ "bytes", "futures-core", @@ -2748,6 +3058,27 @@ dependencies = [ "tokio", ] +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + [[package]] name = "tower-service" version = "0.3.3" @@ -2756,9 +3087,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -2767,9 +3098,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", @@ -2778,9 +3109,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", ] @@ -2793,24 +3124,21 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typenum" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" [[package]] name = "unicase" -version = "2.7.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "unicode-width" @@ -2834,7 +3162,7 @@ dependencies = [ "flate2", "log", "once_cell", - "rustls 0.23.19", + "rustls 0.23.23", "rustls-native-certs 0.7.3", "rustls-pki-types", "url", @@ -2872,11 +3200,11 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "uuid" -version = "1.11.0" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +checksum = "e0f540e3240398cce6128b64ba83fdbdd86129c16a3aa1a3a252efd66eb3d587" dependencies = [ - "getrandom", + "getrandom 0.3.1", "serde", ] @@ -2914,25 +3242,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] -name = "wasm-bindgen" -version = "0.2.95" +name = "wasi" +version = "0.13.3+wasi-0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn", @@ -2941,21 +3278,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.45" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2963,9 +3301,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -2976,15 +3314,18 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "wasm-streams" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", @@ -2995,9 +3336,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.72" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", @@ -3015,13 +3356,25 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.6" +version = "0.26.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" +checksum = "2210b291f7ea53617fbafcc4939f10914214ec15aace5ba62293a668f322c5c9" dependencies = [ "rustls-pki-types", ] +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + [[package]] name = "winapi-util" version = "0.1.9" @@ -3037,37 +3390,42 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] -name = "windows-registry" -version = "0.2.0" +name = "windows-link" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3" + +[[package]] +name = "windows-registry" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" dependencies = [ "windows-result", "windows-strings", - "windows-targets", + "windows-targets 0.53.0", ] [[package]] name = "windows-result" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +checksum = "06374efe858fab7e4f881500e6e86ec8bc28f9462c47e5a9941a0142ad86b189" dependencies = [ - "windows-targets", + "windows-link", ] [[package]] name = "windows-strings" -version = "0.1.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" dependencies = [ - "windows-result", - "windows-targets", + "windows-link", ] [[package]] @@ -3076,7 +3434,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -3085,7 +3443,7 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -3094,14 +3452,30 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", ] [[package]] @@ -3110,48 +3484,105 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + +[[package]] +name = "wit-bindgen-rt" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags", +] + [[package]] name = "write16" version = "1.0.0" @@ -3200,8 +3631,16 @@ version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ - "byteorder", - "zerocopy-derive", + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd97444d05a4328b90e75e503a34bad781f14e28a823ad3557f0750df1ebcbc6" +dependencies = [ + "zerocopy-derive 0.8.23", ] [[package]] @@ -3216,19 +3655,30 @@ dependencies = [ ] [[package]] -name = "zerofrom" -version = "0.1.5" +name = "zerocopy-derive" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +checksum = "6352c01d0edd5db859a63e2605f4ea3183ddbd15e2c4a9e7d32184df75e4f154" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", diff --git a/src/libshared b/src/libshared index 1a06cb4ca..2aa844cb9 160000 --- a/src/libshared +++ b/src/libshared @@ -1 +1 @@ -Subproject commit 1a06cb4caebdae3c5e58fe83e2fd2211d2959815 +Subproject commit 2aa844cb9b015fca81b947c57fde07999ede002b From 2ee5fb287cf8bc28a4755b662c54ef4334be548e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kalle=20Kiet=C3=A4v=C3=A4inen?= <1026741+kietavainen@users.noreply.github.com> Date: Fri, 14 Mar 2025 02:01:16 +0200 Subject: [PATCH 39/76] Fix suppressing news nag after reading the news (#3817) The news nag suppression regressed again in 5c67d22. That commit intended to remove the sponsorship outro from the news, but also removed the bookkeeping that marks the news as read. This commit reverts that part back to its previous state. --- src/commands/CmdNews.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/commands/CmdNews.cpp b/src/commands/CmdNews.cpp index cce5f079c..b6a6f75cb 100644 --- a/src/commands/CmdNews.cpp +++ b/src/commands/CmdNews.cpp @@ -588,6 +588,11 @@ int CmdNews::execute(std::string& output) { } wait_for_enter(); + // Set a mark in the config to remember which version's release notes were displayed + if (news_version < current_version) { + CmdConfig::setConfigVariable("news.version", std::string(current_version), false); + } + return 0; } From 1f6e7de569cea7bced2a334ad9982a42e6ba614e Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Fri, 14 Mar 2025 05:20:52 -0400 Subject: [PATCH 40/76] Release 3.4.1 (#3818) --- CMakeLists.txt | 2 +- ChangeLog | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4509430b5..9323dc5a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ enable_testing() set (CMAKE_EXPORT_COMPILE_COMMANDS ON) project (task - VERSION 3.4.0 + VERSION 3.4.1 DESCRIPTION "Taskwarrior - a command-line TODO list manager" HOMEPAGE_URL https://taskwarrior.org/) diff --git a/ChangeLog b/ChangeLog index 13c037a7b..5d372307b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ ------ current release --------------------------- +3.4.1 - + +- The nagging to read `task news` has been fixed. + +------ old releases ------------------------------ + 3.4.0 - - Where possible, the task DB is now opened in read-only mode, which improves @@ -19,8 +25,6 @@ Thanks to the following people for contributions to this release: - Yong Li - jrmarino ------- old releases ------------------------------ - 3.3.0 - - Sync now supports AWS S3 as a backend. From f9c17d9b5be16947007323d287f4390c5e690e72 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 19:50:44 -0400 Subject: [PATCH 41/76] [pre-commit.ci] pre-commit autoupdate (#3822) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/pre-commit/mirrors-clang-format: v19.1.7 → v20.1.0](https://github.com/pre-commit/mirrors-clang-format/compare/v19.1.7...v20.1.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- test/lexer_test.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7e9ce69fa..c0c0596dd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: check-yaml - id: check-added-large-files - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v19.1.7 + rev: v20.1.0 hooks: - id: clang-format types_or: [c++, c] diff --git a/test/lexer_test.cpp b/test/lexer_test.cpp index 715c46081..0189699bb 100644 --- a/test/lexer_test.cpp +++ b/test/lexer_test.cpp @@ -293,7 +293,10 @@ int TEST_NAME(int, char**) { "'wonder'+0 : 'prowonderbread'+3 --> 6"); // Test all Lexer types. -#define NO {"", Lexer::Type::word} +#define NO \ + { \ + "", Lexer::Type::word \ + } struct { const char* input; struct { From 768d45197b6242e049c56d58789c33032fd6ecc2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 20:11:14 -0400 Subject: [PATCH 42/76] Bump docker/login-action from 3.3.0 to 3.4.0 (#3821) Bumps [docker/login-action](https://github.com/docker/login-action) from 3.3.0 to 3.4.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v3.3.0...v3.4.0) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index a0414c233..454dadf20 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -36,7 +36,7 @@ jobs: uses: sigstore/cosign-installer@v3.8.1 - name: Log into registry ${{ env.REGISTRY }} - uses: docker/login-action@v3.3.0 + uses: docker/login-action@v3.4.0 with: registry: ${{ env.REGISTRY }} username: ${{ github.repository_owner }} From 7bf3be2f07b6666c50889c025171b23b9d8489cb Mon Sep 17 00:00:00 2001 From: Felix Schurk <75752337+felixschurk@users.noreply.github.com> Date: Thu, 20 Mar 2025 00:47:52 +0100 Subject: [PATCH 43/76] Update dependabot.yml (#3825) --- .github/dependabot.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4490fcc9a..6e2bb8297 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,6 +5,11 @@ updates: directory: "/" schedule: interval: "weekly" + # Enable version updates for git submodules + - package-ecosystem: "gitsubmodule" + directory: "/" + schedule: + interval: "daily" # Enable updates for Rust packages - package-ecosystem: "cargo" directory: "/" # Location of package manifests From bc1629727459f271aa465c68eeecc32a0c203225 Mon Sep 17 00:00:00 2001 From: soerenschneider <56670304+soerenschneider@users.noreply.github.com> Date: Fri, 21 Mar 2025 13:26:31 +0100 Subject: [PATCH 44/76] docs: Add note to disable AWS lifecycle policies (#3828) * docs: Add note to disable AWS lifecycle policies * fix grammar --------- Co-authored-by: Dustin J. Mitchell --- doc/man/task-sync.5.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/man/task-sync.5.in b/doc/man/task-sync.5.in index a2dacf23b..1560e2d8a 100644 --- a/doc/man/task-sync.5.in +++ b/doc/man/task-sync.5.in @@ -143,7 +143,9 @@ Then configure Taskwarrior with: To synchronize your tasks to AWS, select a region near you and use the AWS console to create a new S3 bucket. The default settings for the bucket are -adequate. +adequate. In particular, ensure that no lifecycle policies are enabled, as they +may automatically delete or transition objects, potentially impacting data +availability. You will also need an AWS IAM user with the following policy, where BUCKETNAME is the name of the bucket. The same user can be configured for multiple From a3b44bdef52fd3b8d7923f9c541b9d5e4062ed98 Mon Sep 17 00:00:00 2001 From: Ram-Z Date: Mon, 24 Mar 2025 23:07:27 +0000 Subject: [PATCH 45/76] Replace inacurate comment (#3829) --- src/columns/ColTypeDuration.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/columns/ColTypeDuration.cpp b/src/columns/ColTypeDuration.cpp index 34ae53db1..ea8511475 100644 --- a/src/columns/ColTypeDuration.cpp +++ b/src/columns/ColTypeDuration.cpp @@ -56,11 +56,9 @@ void ColumnTypeDuration::modify(Task& task, const std::string& value) { evaluatedValue = Variant(value); } - // The duration is stored in raw form, but it must still be valid, - // and therefore is parsed first. + // The duration is first parsed, then stored inside the variant as a `time_t` std::string label = " MODIFICATION "; if (evaluatedValue.type() == Variant::type_duration) { - // Store the raw value, for 'recur'. Context::getContext().debug(label + _name + " <-- " + (std::string)evaluatedValue + " <-- '" + value + '\''); task.set(_name, evaluatedValue); From 4a464c13a8305bea79d4067073e479139cef663d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 17:58:09 -0400 Subject: [PATCH 46/76] Bump src/taskchampion-cpp/corrosion from `fcd8b41` to `c484074` (#3836) Bumps [src/taskchampion-cpp/corrosion](https://github.com/corrosion-rs/corrosion) from `fcd8b41` to `c484074`. - [Release notes](https://github.com/corrosion-rs/corrosion/releases) - [Commits](https://github.com/corrosion-rs/corrosion/compare/fcd8b41981cb1e80f4dcc20fa8970dc6aa981c9f...c4840742d23d1c1a187152e2c5ae65886b9c9007) --- updated-dependencies: - dependency-name: src/taskchampion-cpp/corrosion dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/taskchampion-cpp/corrosion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/taskchampion-cpp/corrosion b/src/taskchampion-cpp/corrosion index fcd8b4198..c4840742d 160000 --- a/src/taskchampion-cpp/corrosion +++ b/src/taskchampion-cpp/corrosion @@ -1 +1 @@ -Subproject commit fcd8b41981cb1e80f4dcc20fa8970dc6aa981c9f +Subproject commit c4840742d23d1c1a187152e2c5ae65886b9c9007 From db23195f4d339a5a5c985dbc6439de91e42e46bd Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Tue, 1 Apr 2025 16:42:42 -0400 Subject: [PATCH 47/76] Remove duplicate word (#3834) * Remove duplicate word * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- src/commands/CmdContext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/CmdContext.cpp b/src/commands/CmdContext.cpp index 37c89682f..fae5d3818 100644 --- a/src/commands/CmdContext.cpp +++ b/src/commands/CmdContext.cpp @@ -218,8 +218,8 @@ void CmdContext::defineContext(const std::vector& words, std::strin if (!valid_write_context) { std::stringstream warning; warning - << format("The filter '{1}' is not a valid modification string, because it contains {2}.", - value, reason) + << format("The filter '{1}' is not a valid modification string, because it {2}.", value, + reason) << "\nAs such, value for the write context cannot be set (context will not apply on task " "add / task log).\n\n" << format( From f1cb656f7555abf783b93b0668ad36f1ef2b9a9d Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Mon, 7 Apr 2025 20:40:06 -0400 Subject: [PATCH 48/76] Update tokio to 1.44.2 (#3842) --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 92c5bef32..299662c96 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2998,9 +2998,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.44.0" +version = "1.44.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9975ea0f48b5aa3972bf2d888c238182458437cc2a19374b81b25cdf1023fb3a" +checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" dependencies = [ "backtrace", "bytes", From 5b70ce6be2f8d5c07c2d89d68b82ad60a02bf125 Mon Sep 17 00:00:00 2001 From: Adrian Wilkins Date: Thu, 10 Apr 2025 13:33:52 +0100 Subject: [PATCH 50/76] Add note about uninstallation (#3845) * Add note about uninstallation * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- INSTALL | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/INSTALL b/INSTALL index 1635fbb9e..beee2018f 100644 --- a/INSTALL +++ b/INSTALL @@ -34,7 +34,7 @@ Briefly, these shell commands will unpack, build and install Taskwarrior: $ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release . [3] $ cmake --build build [4] $ sudo cmake --install build [5] - $ cd .. ; rm -r task-X.Y.Z [6] + $ cd .. ; rm -r task-X.Y.Z [6] (see: Uninstallation) These commands are explained below: @@ -103,6 +103,13 @@ There is no uninstall option in CMake makefiles. This is a manual process. To uninstall Taskwarrior, remove the files listed in the install_manifest.txt file that was generated when you built Taskwarrior. +```sh +cd task-X.Y.Z +sudo xargs rm < build/install_manifest.txt +``` + +If you want to uninstall this way, you will need to omit step [6] above and +retain the source folder after installation. Taskwarrior Build Notes ----------------------- From 15bb71764e7820a9df4ad5cd5b13963bc90fd6ad Mon Sep 17 00:00:00 2001 From: Nick Grimshaw Date: Mon, 14 Apr 2025 18:08:32 +0100 Subject: [PATCH 51/76] =?UTF-8?q?Redact=20HTTP=20credentials=20from=20"Syn?= =?UTF-8?q?cing=E2=80=A6"=20message=20(#3846)=20(#3847)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/commands/CmdSync.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/commands/CmdSync.cpp b/src/commands/CmdSync.cpp index c0fa93c36..15e07469d 100644 --- a/src/commands/CmdSync.cpp +++ b/src/commands/CmdSync.cpp @@ -36,6 +36,7 @@ #include #include +#include #include //////////////////////////////////////////////////////////////////////////////// @@ -78,6 +79,10 @@ int CmdSync::execute(std::string& output) { out << "sync.server.origin is deprecated. Use sync.server.url instead.\n"; } + // redact credentials from `server_url`, if present + std::regex remove_creds_regex("^(https?://.+):(.+)@(.+)"); + std::string safe_server_url = std::regex_replace(server_url, remove_creds_regex, "$1:****@$3"); + if (server_dir != "") { if (verbose) { out << format("Syncing with {1}", server_dir) << '\n'; @@ -144,7 +149,7 @@ int CmdSync::execute(std::string& output) { throw std::string("sync.server.client_id and sync.encryption_secret are required"); } if (verbose) { - out << format("Syncing with sync server at {1}", server_url) << '\n'; + out << format("Syncing with sync server at {1}", safe_server_url) << '\n'; } replica->sync_to_remote(server_url, tc::uuid_from_string(client_id), encryption_secret, avoid_snapshots); From 2a64b5c880127b5fa6eff4961fef61319f83d0f1 Mon Sep 17 00:00:00 2001 From: Felix Schurk <75752337+felixschurk@users.noreply.github.com> Date: Wed, 16 Apr 2025 15:49:14 +0200 Subject: [PATCH 52/76] change implementation from has (#3849) Change from get(uuid, task) to get_task_data to always have a full uuid match and to improve read performance for the diagnostics command. See #3848 for details. --- src/TDB2.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/TDB2.cpp b/src/TDB2.cpp index c49f513d6..5676a509f 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -354,8 +354,7 @@ bool TDB2::get(const std::string& uuid, Task& task) { //////////////////////////////////////////////////////////////////////////////// // Locate task by UUID, wherever it is. bool TDB2::has(const std::string& uuid) { - Task task; - return get(uuid, task); + return replica()->get_task_data(tc::uuid_from_string(uuid)).is_some(); } //////////////////////////////////////////////////////////////////////////////// From bfea0f68367f8d91bff752f65aea85274a728b3b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 11:45:17 -0400 Subject: [PATCH 53/76] Bump src/taskchampion-cpp/corrosion from `c484074` to `bf065b8` (#3850) Bumps [src/taskchampion-cpp/corrosion](https://github.com/corrosion-rs/corrosion) from `c484074` to `bf065b8`. - [Release notes](https://github.com/corrosion-rs/corrosion/releases) - [Commits](https://github.com/corrosion-rs/corrosion/compare/c4840742d23d1c1a187152e2c5ae65886b9c9007...bf065b89a33c4d6ce16cae626e8f15f9914ce4dc) --- updated-dependencies: - dependency-name: src/taskchampion-cpp/corrosion dependency-version: bf065b89a33c4d6ce16cae626e8f15f9914ce4dc dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/taskchampion-cpp/corrosion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/taskchampion-cpp/corrosion b/src/taskchampion-cpp/corrosion index c4840742d..bf065b89a 160000 --- a/src/taskchampion-cpp/corrosion +++ b/src/taskchampion-cpp/corrosion @@ -1 +1 @@ -Subproject commit c4840742d23d1c1a187152e2c5ae65886b9c9007 +Subproject commit bf065b89a33c4d6ce16cae626e8f15f9914ce4dc From bae37d9448541c3cfe3707e4729dbc1ebc4192ca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Apr 2025 13:46:42 -0400 Subject: [PATCH 54/76] Bump src/taskchampion-cpp/corrosion from `bf065b8` to `715c235` (#3853) Bumps [src/taskchampion-cpp/corrosion](https://github.com/corrosion-rs/corrosion) from `bf065b8` to `715c235`. - [Release notes](https://github.com/corrosion-rs/corrosion/releases) - [Commits](https://github.com/corrosion-rs/corrosion/compare/bf065b89a33c4d6ce16cae626e8f15f9914ce4dc...715c235daef4b8ee67278f12256334ad3dd4c4ae) --- updated-dependencies: - dependency-name: src/taskchampion-cpp/corrosion dependency-version: 715c235daef4b8ee67278f12256334ad3dd4c4ae dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/taskchampion-cpp/corrosion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/taskchampion-cpp/corrosion b/src/taskchampion-cpp/corrosion index bf065b89a..715c235da 160000 --- a/src/taskchampion-cpp/corrosion +++ b/src/taskchampion-cpp/corrosion @@ -1 +1 @@ -Subproject commit bf065b89a33c4d6ce16cae626e8f15f9914ce4dc +Subproject commit 715c235daef4b8ee67278f12256334ad3dd4c4ae From 31829d61fca049abf5ac05832bab9bc8d20bb56d Mon Sep 17 00:00:00 2001 From: Ram-Z Date: Mon, 21 Apr 2025 01:51:38 +0100 Subject: [PATCH 55/76] Add uuid UDA type (#3827) Mainly so that UDAs that refer to another task can be formated as "short". --- doc/man/taskrc.5.in | 2 +- src/Task.cpp | 2 +- src/columns/ColUDA.cpp | 20 +++++++++++ src/columns/ColUDA.h | 8 +++++ src/columns/Column.cpp | 8 ++++- test/columns.test.py | 79 +++++++++++++++++++++++++++++++++++++----- 6 files changed, 107 insertions(+), 12 deletions(-) diff --git a/doc/man/taskrc.5.in b/doc/man/taskrc.5.in index 6f60a6439..9b8e4903a 100644 --- a/doc/man/taskrc.5.in +++ b/doc/man/taskrc.5.in @@ -1384,7 +1384,7 @@ if you define a UDA named 'estimate', Taskwarrior will not know that this value is weeks, hours, minutes, money, or some other resource count. .TP -.B uda..type=string|numeric|date|duration +.B uda..type=string|numeric|uuid|date|duration .RS Defines a UDA called '', of the specified type. .RE diff --git a/src/Task.cpp b/src/Task.cpp index 9779ed3bf..f6026b848 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -1999,7 +1999,7 @@ void Task::modify(modType type, bool text_required /* = false */) { // Delegate modification to the column object or their base classes. if (name == "depends" || name == "tags" || name == "recur" || column->type() == "date" || column->type() == "duration" || column->type() == "numeric" || - column->type() == "string") { + column->type() == "string" || column->type() == "uuid") { column->modify(*this, value); mods = true; } diff --git a/src/columns/ColUDA.cpp b/src/columns/ColUDA.cpp index 48686ba70..a6452c631 100644 --- a/src/columns/ColUDA.cpp +++ b/src/columns/ColUDA.cpp @@ -297,3 +297,23 @@ void ColumnUDADuration::render(std::vector& lines, Task& task, int } //////////////////////////////////////////////////////////////////////////////// +ColumnUDAUUID::ColumnUDAUUID() { + _name = ""; + _type = "uuid"; + _style = "long"; + _label = ""; + _modifiable = true; + _uda = true; + _styles = {"long", "short"}; + _examples = {"f30cb9c3-3fc0-483f-bfb2-3bf134f00694", "f30cb9c3"}; +} + +//////////////////////////////////////////////////////////////////////////////// +bool ColumnUDAUUID::validate(const std::string& input) const { + Lexer lex(input); + std::string token; + Lexer::Type type; + return lex.isUUID(token, type, true); +} + +//////////////////////////////////////////////////////////////////////////////// diff --git a/src/columns/ColUDA.h b/src/columns/ColUDA.h index ce8aaef97..04d57a8d7 100644 --- a/src/columns/ColUDA.h +++ b/src/columns/ColUDA.h @@ -31,6 +31,7 @@ #include #include #include +#include //////////////////////////////////////////////////////////////////////////////// class ColumnUDAString : public ColumnTypeString { @@ -83,5 +84,12 @@ class ColumnUDADuration : public ColumnTypeDuration { std::vector _values; }; +//////////////////////////////////////////////////////////////////////////////// +class ColumnUDAUUID : public ColumnUUID { + public: + ColumnUDAUUID(); + bool validate(const std::string&) const; +}; + #endif //////////////////////////////////////////////////////////////////////////////// diff --git a/src/columns/Column.cpp b/src/columns/Column.cpp index f9231af1a..131b48da4 100644 --- a/src/columns/Column.cpp +++ b/src/columns/Column.cpp @@ -246,9 +246,15 @@ Column* Column::uda(const std::string& name) { c->_label = label; if (values != "") c->_values = split(values, ','); return c; + } else if (type == "uuid") { + auto c = new ColumnUDAUUID(); + c->_name = name; + c->_label = label; + return c; } else if (type != "") throw std::string( - "User defined attributes may only be of type 'string', 'date', 'duration' or 'numeric'."); + "User defined attributes may only be of type 'string', 'uuid', date', 'duration' or " + "'numeric'."); return nullptr; } diff --git a/test/columns.test.py b/test/columns.test.py index 7e839414e..7f14c571e 100755 --- a/test/columns.test.py +++ b/test/columns.test.py @@ -109,29 +109,26 @@ class TestUUIDFormats(TestCase): def setUpClass(cls): """Executed once before any test in the class""" cls.t = Task() - cls.t.config("report.xxx.columns", "id,uuid") + cls.t.config("report.xxx.columns", "uuid") cls.t.config("verbose", "nothing") cls.t("add zero") code, out, err = cls.t("_get 1.uuid") cls.uuid = out.strip() - def setUp(self): - """Executed before each test in the class""" - def test_uuid_long(self): """Verify formatting of 'uuid.long' column""" - code, out, err = self.t("xxx rc.report.xxx.columns:id,uuid.long") - self.assertIn(self.uuid, out) + code, out, err = self.t("xxx rc.report.xxx.columns:uuid.long") + self.assertEqual(self.uuid, out.strip()) def test_uuid_short(self): """Verify formatting of 'uuid.short' column""" - code, out, err = self.t("xxx rc.report.xxx.columns:id,uuid.short") - self.assertIn(self.uuid[:7], out) + code, out, err = self.t("xxx rc.report.xxx.columns:uuid.short") + self.assertEqual(self.uuid[:8], out.strip()) def test_uuid_format_unrecognized(self): """Verify uuid.donkey formatting fails""" - code, out, err = self.t.runError("xxx rc.report.xxx.columns:id,uuid.donkey") + code, out, err = self.t.runError("xxx rc.report.xxx.columns:uuid.donkey") self.assertEqual(err, "Unrecognized column format 'uuid.donkey'\n") @@ -482,6 +479,70 @@ start active* ✓ """ +class TestUDAUUIDFormats(TestCase): + @classmethod + def setUpClass(cls): + """Executed once before any test in the class""" + cls.t = Task() + cls.t.config("verbose", "nothing") + cls.t.config("uda.uda_uuid.label", "uda_uuid") + cls.t.config("uda.uda_uuid.type", "uuid") + cls.t.config("report.xxx.columns", "uda_uuid") + + cls.t("add zero") + code, out, err = cls.t("_get 1.uuid") + cls.t("add uda_uuid:{} one".format(out.strip())) + code, out, err = cls.t("_get 2.uda_uuid") + cls.uda_uuid = out.strip() + + def test_uda_uuid_invalid_fails(self): + """Verify adding invalid uuid fails""" + code, out, err = self.t.runError("add uda_uuid:shrek three") + self.assertNotEqual(code, 0) + self.assertIn("uda_uuid", err.strip()) + self.assertIn("shrek", err.strip()) + + def test_uda_uuid_long(self): + """Verify formatting of 'uda_uuid.long' column""" + code, out, err = self.t("2 xxx rc.report.xxx.columns:uda_uuid.long") + self.assertEqual(self.uda_uuid, out.strip()) + + def test_uda_uuid_short(self): + """Verify formatting of 'uda_uuid.short' column""" + code, out, err = self.t("2 xxx rc.report.xxx.columns:uda_uuid.short") + self.assertEqual(self.uda_uuid[:8], out.strip()) + + def test_uda_uuid_format_unrecognized(self): + """Verify uda_uuid.donkey formatting fails""" + code, out, err = self.t.runError("xxx rc.report.xxx.columns:id,uda_uuid.donkey") + self.assertEqual(err, "Unrecognized column format 'uda_uuid.donkey'\n") + + +class TestUDAUUIDReconfiguredFromString(TestCase): + @classmethod + def setUpClass(cls): + """Executed once before any test in the class""" + cls.t = Task() + cls.t.config("verbose", "nothing") + cls.t.config("uda.uda_uuid.label", "uda_uuid") + cls.t.config("report.xxx.columns", "uda_uuid") + + cls.t.config("uda.uda_uuid.type", "string") + cls.expected_str = 3 * "littlepigs" + cls.t("add uda_uuid:{} one".format(cls.expected_str)) + cls.t.config("uda.uda_uuid.type", "uuid") + + def test_uda_uuid_long(self): + """Verify formatting of 'uda_uuid.long' column""" + code, out, err = self.t("1 xxx rc.report.xxx.columns:uda_uuid.long") + self.assertEqual(self.expected_str, out.strip()) + + def test_uda_uuid_short(self): + """Verify formatting of 'uda_uuid.short' column""" + code, out, err = self.t("1 xxx rc.report.xxx.columns:uda_uuid.short") + self.assertEqual(self.expected_str[:8], out.strip()) + + class TestFeature1061(TestCase): def setUp(self): """Executed before each test in the class""" From 36a449c9357a871b8c45ced549a64086fb272515 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:54:06 -0400 Subject: [PATCH 56/76] Bump sigstore/cosign-installer from 3.8.1 to 3.8.2 (#3855) Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.8.1 to 3.8.2. - [Release notes](https://github.com/sigstore/cosign-installer/releases) - [Commits](https://github.com/sigstore/cosign-installer/compare/v3.8.1...v3.8.2) --- updated-dependencies: - dependency-name: sigstore/cosign-installer dependency-version: 3.8.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index 454dadf20..cbed45d1a 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -33,7 +33,7 @@ jobs: submodules: "recursive" - name: Install cosign - uses: sigstore/cosign-installer@v3.8.1 + uses: sigstore/cosign-installer@v3.8.2 - name: Log into registry ${{ env.REGISTRY }} uses: docker/login-action@v3.4.0 From 7be313e91fb409558c0fc95d2a2ace8f9103ee55 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:54:21 -0400 Subject: [PATCH 57/76] Bump docker/build-push-action from 6.15.0 to 6.16.0 (#3856) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.15.0 to 6.16.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v6.15.0...v6.16.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-version: 6.16.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index cbed45d1a..b274c712b 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -44,7 +44,7 @@ jobs: - name: Build and push Taskwarrior Docker image id: build-and-push - uses: docker/build-push-action@v6.15.0 + uses: docker/build-push-action@v6.16.0 with: context: . file: "./docker/task.dockerfile" From b4e25fe42f0ba3118ceeb890a37d4275bb377e04 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Wed, 30 Apr 2025 19:22:44 -0400 Subject: [PATCH 58/76] Do not decode a non-JSON value (#3859) None of the other task modifications (modify, prepend, append) treat the input as JSON, so this one shouldn't either. This works around https://github.com/GothenburgBitFactory/libshared/issues/95 --- src/Task.cpp | 2 +- test/quotes.test.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Task.cpp b/src/Task.cpp index f6026b848..4eded903a 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -928,7 +928,7 @@ void Task::addAnnotation(const std::string& description) { ++now; } while (has(key)); - data[key] = json::decode(description); + data[key] = description; ++annotation_count; recalc_urgency = true; } diff --git a/test/quotes.test.py b/test/quotes.test.py index c17e229e6..56b5a5518 100755 --- a/test/quotes.test.py +++ b/test/quotes.test.py @@ -67,21 +67,23 @@ class TestBug268(TestCase): self.assertIn("a/b or c", out) -class TestBug880(TestCase): +class TestBug3858(TestCase): def setUp(self): """Executed before each test in the class""" self.t = Task() def test_backslash_at_eol(self): - """880: Backslash at end of description/annotation causes problems""" + """880: Backslashes at end of description/annotation are handled correctly""" self.t(r"add one\\") code, out, err = self.t("_get 1.description") self.assertEqual("one\\\n", out) - self.t(r"1 annotate 'two\\'") + self.t(r"1 annotate 'two\'") + self.t(r"1 annotate 'three\\'") code, out, err = self.t("info rc.verbose:nothing") self.assertIn("one\\\n", out) self.assertIn("two\\\n", out) + self.assertIn("three\\\\\n", out) class TestBug1436(TestCase): From 36e5f8895d8508374abb4f0df4ef8baf3926f2c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 May 2025 08:20:55 -0400 Subject: [PATCH 59/76] Bump src/libshared from `2aa844c` to `cb078b0` (#3860) Bumps [src/libshared](https://github.com/GothenburgBitFactory/libshared) from `2aa844c` to `cb078b0`. - [Commits](https://github.com/GothenburgBitFactory/libshared/compare/2aa844cb9b015fca81b947c57fde07999ede002b...cb078b00c5201e116c9dfd7d6951d954473eaa8f) --- updated-dependencies: - dependency-name: src/libshared dependency-version: cb078b00c5201e116c9dfd7d6951d954473eaa8f dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/libshared | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libshared b/src/libshared index 2aa844cb9..cb078b00c 160000 --- a/src/libshared +++ b/src/libshared @@ -1 +1 @@ -Subproject commit 2aa844cb9b015fca81b947c57fde07999ede002b +Subproject commit cb078b00c5201e116c9dfd7d6951d954473eaa8f From 416c6d3ca402aaece1317fdd87d4cde17e737723 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 07:56:13 -0400 Subject: [PATCH 60/76] Bump src/libshared from `cb078b0` to `8ad3646` (#3864) Bumps [src/libshared](https://github.com/GothenburgBitFactory/libshared) from `cb078b0` to `8ad3646`. - [Commits](https://github.com/GothenburgBitFactory/libshared/compare/cb078b00c5201e116c9dfd7d6951d954473eaa8f...8ad3646209c8d2e7820c3cd59319a2be3b3d221e) --- updated-dependencies: - dependency-name: src/libshared dependency-version: 8ad3646209c8d2e7820c3cd59319a2be3b3d221e dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/libshared | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libshared b/src/libshared index cb078b00c..8ad364620 160000 --- a/src/libshared +++ b/src/libshared @@ -1 +1 @@ -Subproject commit cb078b00c5201e116c9dfd7d6951d954473eaa8f +Subproject commit 8ad3646209c8d2e7820c3cd59319a2be3b3d221e From 499f931f67ccaae352da9d585b0c2d26c408e16e Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Mon, 5 May 2025 16:10:02 +0200 Subject: [PATCH 61/76] use cached urgency() for json exports (#3867) --- src/Hooks.cpp | 2 +- src/Hooks.h | 2 +- src/Task.cpp | 4 ++-- src/Task.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Hooks.cpp b/src/Hooks.cpp index a703b2539..1d1e440a4 100644 --- a/src/Hooks.cpp +++ b/src/Hooks.cpp @@ -275,7 +275,7 @@ void Hooks::onAdd(Task& task) const { // - all emitted non-JSON lines are considered feedback or error messages // depending on the status code. // -void Hooks::onModify(const Task& before, Task& after) const { +void Hooks::onModify(Task& before, Task& after) const { if (!_enabled) return; Timer timer; diff --git a/src/Hooks.h b/src/Hooks.h index 6496674b7..448c59744 100644 --- a/src/Hooks.h +++ b/src/Hooks.h @@ -40,7 +40,7 @@ class Hooks { void onLaunch() const; void onExit() const; void onAdd(Task&) const; - void onModify(const Task&, Task&) const; + void onModify(Task&, Task&) const; std::vector list() const; private: diff --git a/src/Task.cpp b/src/Task.cpp index 4eded903a..6608db850 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -777,7 +777,7 @@ void Task::parseLegacy(const std::string& line) { } //////////////////////////////////////////////////////////////////////////////// -std::string Task::composeJSON(bool decorate /*= false*/) const { +std::string Task::composeJSON(bool decorate /*= false*/) { std::stringstream out; out << '{'; @@ -894,7 +894,7 @@ std::string Task::composeJSON(bool decorate /*= false*/) const { #ifdef PRODUCT_TASKWARRIOR // Include urgency. - if (decorate) out << ',' << "\"urgency\":" << urgency_c(); + if (decorate) out << ',' << "\"urgency\":" << urgency(); #endif out << '}'; diff --git a/src/Task.h b/src/Task.h index b430a2bc2..0b577baff 100644 --- a/src/Task.h +++ b/src/Task.h @@ -68,7 +68,7 @@ class Task { Task(rust::Box); void parse(const std::string&); - std::string composeJSON(bool decorate = false) const; + std::string composeJSON(bool decorate = false); // Status values. enum status { pending, completed, deleted, recurring, waiting }; From 97bcc76ac14089a59a105a05d7cde1cea7afd67a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 16:55:43 +0000 Subject: [PATCH 62/76] [pre-commit.ci] pre-commit autoupdate (#3868) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/mirrors-clang-format: v20.1.0 → v20.1.3](https://github.com/pre-commit/mirrors-clang-format/compare/v20.1.0...v20.1.3) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c0c0596dd..85ff519ce 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: check-yaml - id: check-added-large-files - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v20.1.0 + rev: v20.1.3 hooks: - id: clang-format types_or: [c++, c] From 0e59a62ead21a208cbb803fbcad8cfd1d27b345e Mon Sep 17 00:00:00 2001 From: Antoni Borowski <83772804+antek5421@users.noreply.github.com> Date: Thu, 8 May 2025 00:29:19 +0200 Subject: [PATCH 63/76] Fix #3571: Added detailed feedback for successful task synchronization (#3758) * Fix #3571: Added detailed feedback for successful task synchronization * Refactor sync logic and add verbose output for synchronization operations * Give a count of local operations sent --------- Co-authored-by: Antoni Borowski Co-authored-by: Dustin J. Mitchell --- src/commands/CmdSync.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/commands/CmdSync.cpp b/src/commands/CmdSync.cpp index 15e07469d..e90c31061 100644 --- a/src/commands/CmdSync.cpp +++ b/src/commands/CmdSync.cpp @@ -83,6 +83,8 @@ int CmdSync::execute(std::string& output) { std::regex remove_creds_regex("^(https?://.+):(.+)@(.+)"); std::string safe_server_url = std::regex_replace(server_url, remove_creds_regex, "$1:****@$3"); + auto num_local_operations = replica->num_local_operations(); + if (server_dir != "") { if (verbose) { out << format("Syncing with {1}", server_dir) << '\n'; @@ -135,6 +137,7 @@ int CmdSync::execute(std::string& output) { replica->sync_to_aws_with_default_creds(aws_region, aws_bucket, encryption_secret, avoid_snapshots); } + } else if (gcp_bucket != "") { std::string gcp_credential_path = Context::getContext().config.get("sync.gcp.credential_path"); if (encryption_secret == "") { @@ -144,6 +147,7 @@ int CmdSync::execute(std::string& output) { out << format("Syncing with GCP bucket {1}", gcp_bucket) << '\n'; } replica->sync_to_gcp(gcp_bucket, gcp_credential_path, encryption_secret, avoid_snapshots); + } else if (server_url != "") { if (client_id == "" || encryption_secret == "") { throw std::string("sync.server.client_id and sync.encryption_secret are required"); @@ -153,6 +157,7 @@ int CmdSync::execute(std::string& output) { } replica->sync_to_remote(server_url, tc::uuid_from_string(client_id), encryption_secret, avoid_snapshots); + } else { throw std::string("No sync.* settings are configured. See task-sync(5)."); } @@ -161,6 +166,15 @@ int CmdSync::execute(std::string& output) { context.tdb2.expire_tasks(); } + if (verbose) { + out << "Success!\n"; + // Taskchampion does not provide a measure of the number of operations received from + // the server, but we can give some indication of the number sent. + if (num_local_operations) { + out << format("Sent {1} local operations to the server", num_local_operations) << '\n'; + } + } + output = out.str(); return status; } From 79eb38d582af11861f4e7a8e13799deb6313bbbf Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Thu, 8 May 2025 13:08:22 -0400 Subject: [PATCH 64/76] Fix compiler warning about unused variable (#3873) This was added to indicate that the return value of chdir was unused, but newer compilers "see through" this and determine it to be unused. The return value is not marked must-use, so just doing nothing with it is sufficient. --- src/commands/CmdEdit.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/commands/CmdEdit.cpp b/src/commands/CmdEdit.cpp index 11cd8d937..8f6e85927 100644 --- a/src/commands/CmdEdit.cpp +++ b/src/commands/CmdEdit.cpp @@ -619,10 +619,9 @@ CmdEdit::editResult CmdEdit::editFile(Task& task) { auto dateformat = Context::getContext().config.get("dateformat.edit"); if (dateformat == "") dateformat = Context::getContext().config.get("dateformat"); - // Change directory for the editor + // Change directory for the editor, doing nothing on error. auto current_dir = Directory::cwd(); - int ignored = chdir(location._data.c_str()); - ++ignored; // Keep compiler quiet. + chdir(location._data.c_str()); // Check if the file already exists, if so, bail out Path filepath = Path(file.str()); @@ -702,7 +701,7 @@ ARE_THESE_REALLY_HARMFUL: // Cleanup. File::remove(file.str()); - ignored = chdir(current_dir.c_str()); + chdir(current_dir.c_str()); return changes ? CmdEdit::editResult::changes : CmdEdit::editResult::nochanges; } From 6c60a8db84fee6a66846e6efff4220b9eddfacb7 Mon Sep 17 00:00:00 2001 From: Tobias Predel Date: Sat, 10 May 2025 02:26:21 +0200 Subject: [PATCH 65/76] Move `timegm` implementation to `libshared` (#3875) Move `timegm` implementation to libshared --- CMakeLists.txt | 1 - cmake.h.in | 3 --- src/util.cpp | 18 ------------------ src/util.h | 4 ---- 4 files changed, 26 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9323dc5a0..890d23ee3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,7 +67,6 @@ SET (TASK_BINDIR bin CACHE STRING "Installation directory for the bi # rust libs require these set (TASK_LIBRARIES dl pthread) -check_function_exists (timegm HAVE_TIMEGM) check_function_exists (get_current_dir_name HAVE_GET_CURRENT_DIR_NAME) check_function_exists (wordexp HAVE_WORDEXP) diff --git a/cmake.h.in b/cmake.h.in index ec294bf99..25c0d6acc 100644 --- a/cmake.h.in +++ b/cmake.h.in @@ -41,9 +41,6 @@ /* Found tm_gmtoff */ #cmakedefine HAVE_TM_GMTOFF -/* Found timegm */ -#cmakedefine HAVE_TIMEGM - /* Found st.st_birthtime struct member */ #cmakedefine HAVE_ST_BIRTHTIME diff --git a/src/util.cpp b/src/util.cpp index ebbbf2191..6b945f959 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -218,24 +218,6 @@ const std::vector extractParents(const std::string& project, return vec; } -//////////////////////////////////////////////////////////////////////////////// -#ifndef HAVE_TIMEGM -time_t timegm(struct tm* tm) { - time_t ret; - char* tz; - tz = getenv("TZ"); - setenv("TZ", "UTC", 1); - tzset(); - ret = mktime(tm); - if (tz) - setenv("TZ", tz, 1); - else - unsetenv("TZ"); - tzset(); - return ret; -} -#endif - //////////////////////////////////////////////////////////////////////////////// bool nontrivial(const std::string& input) { std::string::size_type i = 0; diff --git a/src/util.h b/src/util.h index 782311117..d2be723f5 100644 --- a/src/util.h +++ b/src/util.h @@ -54,10 +54,6 @@ const std::string indentProject(const std::string&, const std::string& whitespac const std::vector extractParents(const std::string&, const char& delimiter = '.'); -#ifndef HAVE_TIMEGM -time_t timegm(struct tm* tm); -#endif - bool nontrivial(const std::string&); const char* optionalBlankLine(); void setHeaderUnderline(Table&); From 4620b5fd258f1df04afd7b7fc249a7e0e9116fd0 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Mon, 12 May 2025 02:16:54 -0400 Subject: [PATCH 66/76] Make `tags.none:` filter work again (#3877) * Don't remove the legacy 'tags' property * Simulate the `tags` DOM property This refers to the deprecated "tags" property of tasks. This property usually still exists, for compatibility with older versions, but should not be relied on anymore. --- src/DOM.cpp | 7 +++++++ src/commands/CmdEdit.cpp | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/DOM.cpp b/src/DOM.cpp index fe47f2878..31a8e5dc0 100644 --- a/src/DOM.cpp +++ b/src/DOM.cpp @@ -286,6 +286,13 @@ bool getDOM(const std::string& name, const Task* task, Variant& value) { return true; } + // The "tags" property is deprecated, but it is documented as part of the DOM, so simulate it. + if (size == 1 && canonical == "tags") { + auto tags = ref->getTags(); + value = Variant(join(",", tags)); + return true; + } + Column* column = Context::getContext().columns[canonical]; if (size == 1 && column) { diff --git a/src/commands/CmdEdit.cpp b/src/commands/CmdEdit.cpp index 8f6e85927..b6535f1aa 100644 --- a/src/commands/CmdEdit.cpp +++ b/src/commands/CmdEdit.cpp @@ -317,7 +317,6 @@ void CmdEdit::parseTask(Task& task, const std::string& after, const std::string& // tags value = findValue(after, "\n Tags:"); - task.remove("tags"); task.setTags(split(value, ' ')); // description. From 89d84f0bdd3e736b8884c8dcf7ea4cb942de83a8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 14:01:34 -0400 Subject: [PATCH 67/76] [pre-commit.ci] pre-commit autoupdate (#3878) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/mirrors-clang-format: v20.1.3 → v20.1.4](https://github.com/pre-commit/mirrors-clang-format/compare/v20.1.3...v20.1.4) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 85ff519ce..60f0e3f5a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: check-yaml - id: check-added-large-files - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v20.1.3 + rev: v20.1.4 hooks: - id: clang-format types_or: [c++, c] From f6824e90a16f03c94f38760f7cf06650f587879d Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Mon, 26 May 2025 13:07:35 -0400 Subject: [PATCH 68/76] Correctly handle undo with multiple tasks (#3886) The `std::stringstream::clear` method does not, in fact, clear the string -- it just resets some internal flags. Assigning a new stringstream to the variable is not the most efficient way to do this, but it's the clearest. --- src/commands/CmdUndo.cpp | 2 +- test/undo.test.py | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/commands/CmdUndo.cpp b/src/commands/CmdUndo.cpp index 4c2e6b7f7..83156410e 100644 --- a/src/commands/CmdUndo.cpp +++ b/src/commands/CmdUndo.cpp @@ -102,7 +102,7 @@ bool CmdUndo::confirm_revert(const std::vector& undo_ops) { view.set(row, 1, mods.str()); } last_uuid = op.get_uuid(); - mods.clear(); + mods = std::stringstream(); } if (op.is_create()) { diff --git a/test/undo.test.py b/test/undo.test.py index c3ce12af0..5df49155c 100755 --- a/test/undo.test.py +++ b/test/undo.test.py @@ -27,6 +27,7 @@ import sys import os +import re import unittest # Ensure python finds the local simpletap module @@ -61,6 +62,25 @@ class TestUndo(TestCase): code, out, err = self.t("_get 1.status") self.assertEqual(out.strip(), "pending") + def test_modify_multiple_tasks(self): + """'add' then 'done' then 'undo'""" + self.t("add one") + self.t("add two") + self.t("add three") + self.t("rc.bulk=0 1,2,3 modify +sometag") + code, out, err = self.t("undo", input="y\n") + # This undo output should show one tag modification for each task, possibly with some + # modification-time updates if the modifications spanned a second boundary. + self.assertRegex( + out, + "\s+".join( + [ + r"""[0-9a-f-]{36} (Update property 'modified' from\s+'[0-9]+' to '[0-9]+'\s+)?Add tag 'sometag'\s+Add property 'tags' with value 'sometag'""" + ] + * 3 + ), + ) + def test_undo_en_passant(self): """Verify that en-passant changes during undo are an error""" self.t("add one") From 75d351afadf279d33a2908dd92481e7f51538935 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Mon, 2 Jun 2025 07:59:05 -0400 Subject: [PATCH 69/76] Do not auto-create .taskrc when stdout is not a TTY (#3888) * Do not auto-create .taskrc when stdout is not a TTY This avoids prompting or automatically creating such a file, both of which are unexpected when performing command-line completion. Fixes #3751. * Test case for taskrc creation no longer works A taskrc is only created when stdout is a tty, which would require allocating a pty, which is very platform-dependent and definitely not worth the trouble for this test. --- src/Context.cpp | 7 +++++++ test/taskrc.test.py | 1 + 2 files changed, 8 insertions(+) diff --git a/src/Context.cpp b/src/Context.cpp index f90dd984e..f3c87255b 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -1173,6 +1173,13 @@ void Context::staticInitialization() { void Context::createDefaultConfig() { // Do we need to create a default rc? if (rc_file._data != "" && !rc_file.exists()) { + // If stdout is not a file, we are probably executing in a completion context and should not + // prompt (as the user won't see it) or modify the config (as completion functions are typically + // read-only). + if (!isatty(STDOUT_FILENO)) { + throw std::string("Cannot proceed without rc file."); + } + if (config.getBoolean("confirmation") && !confirm(format("A configuration file could not be found in {1}\n\nWould you like a sample " "{2} created, so Taskwarrior can proceed?", diff --git a/test/taskrc.test.py b/test/taskrc.test.py index 044681881..868ad2382 100755 --- a/test/taskrc.test.py +++ b/test/taskrc.test.py @@ -40,6 +40,7 @@ class TestTaskrc(TestCase): """Executed before each test in the class""" self.t = Task() + @unittest.skip("taskrc generation requires a tty - see #3751") def test_default_taskrc(self): """Verify that a default .taskrc is generated""" os.remove(self.t.taskrc) From e5b69afee2332cbffcb5df49e68f5baf40dc95b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 09:01:38 -0400 Subject: [PATCH 70/76] Bump docker/build-push-action from 6.16.0 to 6.18.0 (#3889) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.16.0 to 6.18.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v6.16.0...v6.18.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-version: 6.18.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index b274c712b..c6d116b1c 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -44,7 +44,7 @@ jobs: - name: Build and push Taskwarrior Docker image id: build-and-push - uses: docker/build-push-action@v6.16.0 + uses: docker/build-push-action@v6.18.0 with: context: . file: "./docker/task.dockerfile" From 440d3f8c92d9ae99d5627e88b71f793bbd1a7bca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 09:01:53 -0400 Subject: [PATCH 71/76] Bump src/libshared from `8ad3646` to `121f757` (#3890) Bumps [src/libshared](https://github.com/GothenburgBitFactory/libshared) from `8ad3646` to `121f757`. - [Commits](https://github.com/GothenburgBitFactory/libshared/compare/8ad3646209c8d2e7820c3cd59319a2be3b3d221e...121f757c3ec1b1f548f7835208b8c72d85d141a7) --- updated-dependencies: - dependency-name: src/libshared dependency-version: 121f757c3ec1b1f548f7835208b8c72d85d141a7 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/libshared | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libshared b/src/libshared index 8ad364620..121f757c3 160000 --- a/src/libshared +++ b/src/libshared @@ -1 +1 @@ -Subproject commit 8ad3646209c8d2e7820c3cd59319a2be3b3d221e +Subproject commit 121f757c3ec1b1f548f7835208b8c72d85d141a7 From 6d81c8cda096ee3d4e7ba23ae22c0cea4654f684 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Jun 2025 11:49:04 -0400 Subject: [PATCH 72/76] Bump src/taskchampion-cpp/corrosion from `715c235` to `00af456` (#3891) Bumps [src/taskchampion-cpp/corrosion](https://github.com/corrosion-rs/corrosion) from `715c235` to `00af456`. - [Release notes](https://github.com/corrosion-rs/corrosion/releases) - [Commits](https://github.com/corrosion-rs/corrosion/compare/715c235daef4b8ee67278f12256334ad3dd4c4ae...00af4564881e9fc031f6b3303c1d6d19ecfe00f3) --- updated-dependencies: - dependency-name: src/taskchampion-cpp/corrosion dependency-version: 00af4564881e9fc031f6b3303c1d6d19ecfe00f3 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/taskchampion-cpp/corrosion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/taskchampion-cpp/corrosion b/src/taskchampion-cpp/corrosion index 715c235da..00af45648 160000 --- a/src/taskchampion-cpp/corrosion +++ b/src/taskchampion-cpp/corrosion @@ -1 +1 @@ -Subproject commit 715c235daef4b8ee67278f12256334ad3dd4c4ae +Subproject commit 00af4564881e9fc031f6b3303c1d6d19ecfe00f3 From ffa0d3e944b4e209ee05fe226b71931a1aa7e298 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Jun 2025 08:08:07 -0400 Subject: [PATCH 73/76] Bump src/taskchampion-cpp/corrosion from `00af456` to `4eccadd` (#3893) Bumps [src/taskchampion-cpp/corrosion](https://github.com/corrosion-rs/corrosion) from `00af456` to `4eccadd`. - [Release notes](https://github.com/corrosion-rs/corrosion/releases) - [Commits](https://github.com/corrosion-rs/corrosion/compare/00af4564881e9fc031f6b3303c1d6d19ecfe00f3...4eccadd67819b427978ca540e0c31e6cce08f226) --- updated-dependencies: - dependency-name: src/taskchampion-cpp/corrosion dependency-version: 4eccadd67819b427978ca540e0c31e6cce08f226 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/taskchampion-cpp/corrosion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/taskchampion-cpp/corrosion b/src/taskchampion-cpp/corrosion index 00af45648..4eccadd67 160000 --- a/src/taskchampion-cpp/corrosion +++ b/src/taskchampion-cpp/corrosion @@ -1 +1 @@ -Subproject commit 00af4564881e9fc031f6b3303c1d6d19ecfe00f3 +Subproject commit 4eccadd67819b427978ca540e0c31e6cce08f226 From a949c698f92a2ebee86ac29c22aa8d05368899de Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 14 Jun 2025 17:34:59 +0200 Subject: [PATCH 74/76] [pre-commit.ci] pre-commit autoupdate (#3887) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/mirrors-clang-format: v20.1.4 → v20.1.5](https://github.com/pre-commit/mirrors-clang-format/compare/v20.1.4...v20.1.5) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 60f0e3f5a..e8dfa828f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: check-yaml - id: check-added-large-files - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v20.1.4 + rev: v20.1.5 hooks: - id: clang-format types_or: [c++, c] From baaf69202bfe83e5c7f7867608726ae75317c178 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 14:08:43 -0400 Subject: [PATCH 75/76] [pre-commit.ci] pre-commit autoupdate (#3897) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/mirrors-clang-format: v20.1.5 → v20.1.6](https://github.com/pre-commit/mirrors-clang-format/compare/v20.1.5...v20.1.6) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e8dfa828f..f17f48519 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: check-yaml - id: check-added-large-files - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v20.1.5 + rev: v20.1.6 hooks: - id: clang-format types_or: [c++, c] From c594ecb58df950b9cdd0dbd06e2fb205663deaa4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 10:18:30 -0400 Subject: [PATCH 76/76] Bump sigstore/cosign-installer from 3.8.2 to 3.9.0 (#3902) Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.8.2 to 3.9.0. - [Release notes](https://github.com/sigstore/cosign-installer/releases) - [Commits](https://github.com/sigstore/cosign-installer/compare/v3.8.2...v3.9.0) --- updated-dependencies: - dependency-name: sigstore/cosign-installer dependency-version: 3.9.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index c6d116b1c..63a0f976c 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -33,7 +33,7 @@ jobs: submodules: "recursive" - name: Install cosign - uses: sigstore/cosign-installer@v3.8.2 + uses: sigstore/cosign-installer@v3.9.0 - name: Log into registry ${{ env.REGISTRY }} uses: docker/login-action@v3.4.0