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/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 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/docker-image.yaml b/.github/workflows/docker-image.yaml index d774bd3ed..b274c712b 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -33,10 +33,10 @@ jobs: submodules: "recursive" - name: Install cosign - uses: sigstore/cosign-installer@v3.7.0 + uses: sigstore/cosign-installer@v3.8.2 - 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 }} @@ -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.16.0 with: context: . file: "./docker/task.dockerfile" 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/.pre-commit-config.yaml b/.pre-commit-config.yaml index ea9333263..85ff519ce 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,11 +9,11 @@ repos: - id: check-yaml - id: check-added-large-files - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v19.1.6 + rev: v20.1.3 hooks: - id: clang-format types_or: [c++, c] - repo: https://github.com/psf/black - rev: 24.10.0 + rev: 25.1.0 hooks: - id: black diff --git a/CMakeLists.txt b/CMakeLists.txt index a6cbadc3f..9323dc5a0 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.1 DESCRIPTION "Taskwarrior - a command-line TODO list manager" HOMEPAGE_URL https://taskwarrior.org/) @@ -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) 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/Cargo.lock b/Cargo.lock index b2120f98a..299662c96 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" @@ -587,13 +658,24 @@ 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 = [ + "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,15 +2359,14 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.8" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", - "spin", "untrusted", "windows-sys 0.52.0", ] @@ -2130,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" @@ -2143,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" @@ -2157,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", @@ -2179,7 +2462,7 @@ dependencies = [ "openssl-probe", "rustls-pemfile 1.0.4", "schannel", - "security-framework", + "security-framework 2.11.1", ] [[package]] @@ -2192,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]] @@ -2215,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", ] @@ -2238,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", @@ -2245,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", ] @@ -2272,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" @@ -2307,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", @@ -2315,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", @@ -2325,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", @@ -2351,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", @@ -2422,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", ] @@ -2443,26 +2752,20 @@ 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", ] -[[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" @@ -2522,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", @@ -2572,7 +2875,7 @@ dependencies = [ "serde_json", "strum", "strum_macros", - "thiserror 2.0.6", + "thiserror 2.0.12", "tokio", "ureq", "url", @@ -2599,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", @@ -2628,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", @@ -2639,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", @@ -2654,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", @@ -2680,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", ] @@ -2695,9 +2998,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.44.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" dependencies = [ "backtrace", "bytes", @@ -2713,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", @@ -2734,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", @@ -2755,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" @@ -2763,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", @@ -2774,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", @@ -2785,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", ] @@ -2800,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" @@ -2841,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", @@ -2879,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", ] @@ -2921,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", @@ -2948,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", @@ -2970,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", @@ -2983,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", @@ -3002,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", @@ -3022,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" @@ -3044,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]] @@ -3083,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]] @@ -3092,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]] @@ -3101,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]] @@ -3117,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" @@ -3207,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]] @@ -3223,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/ChangeLog b/ChangeLog index 7e7540fc9..5d372307b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,36 @@ ------ 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 + 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 + +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 +43,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/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 ----------------------- 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` 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: 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 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'. diff --git a/doc/man/taskrc.5.in b/doc/man/taskrc.5.in index 7ad152ab6..9b8e4903a 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. @@ -1381,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/CMakeLists.txt b/src/CMakeLists.txt index 45b027c4a..eaf5025e5 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,26 +27,25 @@ 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 - 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) diff --git a/src/Context.cpp b/src/Context.cpp index ed4c65770..f90dd984e 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -36,16 +36,15 @@ #include #include #include -#include +#include +#include #include #include #include -#include #include #include #include -#include #include #include #include @@ -55,7 +54,6 @@ #include #endif -#include #include #ifdef SOLARIS @@ -598,9 +596,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 +669,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. @@ -869,7 +879,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(); } 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..1d1e440a4 100644 --- a/src/Hooks.cpp +++ b/src/Hooks.cpp @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include @@ -276,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/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 2e37640ef..5676a509f 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -33,16 +33,11 @@ #include #include #include -#include #include -#include #include #include #include -#include -#include -#include #include #include @@ -50,17 +45,16 @@ 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) { - // 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. @@ -194,11 +188,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(); } @@ -363,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(); } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/TDB2.h b/src/TDB2.h index 3dafe6748..51669ab6d 100644 --- a/src/TDB2.h +++ b/src/TDB2.h @@ -27,9 +27,7 @@ #ifndef INCLUDED_TDB2 #define INCLUDED_TDB2 -#include #include -#include #include #include @@ -46,7 +44,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/TF2.cpp b/src/TF2.cpp index 9b7e2f940..0b78fe531 100644 --- a/src/TF2.cpp +++ b/src/TF2.cpp @@ -31,18 +31,12 @@ #include #include #include -#include +#ifdef PRODUCT_TASKWARRIOR +#include +#endif #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.cpp b/src/Task.cpp index bab293341..6608db850 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. @@ -321,8 +322,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"); @@ -776,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 << '{'; @@ -797,20 +798,23 @@ 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"; // 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); + if (attributes_written) out << ','; - ++attributes_written; + out << '"' << (i.first == "modification" ? "modified" : i.first) + << "\":\"" + // Date was deleted, do not export parsed empty string + << (i.second == "" ? "" : d.toISO()) << '"'; + + ++attributes_written; + } } /* @@ -820,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; @@ -827,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) << '"'; @@ -886,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 << '}'; @@ -920,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; } @@ -1991,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/Task.h b/src/Task.h index 66e18b13b..0b577baff 100644 --- a/src/Task.h +++ b/src/Task.h @@ -30,7 +30,6 @@ #include #include #include -#include #include #include @@ -69,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 }; 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/src/Variant.h b/src/Variant.h index 3cbc5c6af..5634473b9 100644 --- a/src/Variant.h +++ b/src/Variant.h @@ -28,9 +28,7 @@ #define INCLUDED_VARIANT #include -#include -#include #include class Variant { 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/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); 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/src/commands/CmdAdd.cpp b/src/commands/CmdAdd.cpp index 5778ab737..f951083dc 100644 --- a/src/commands/CmdAdd.cpp +++ b/src/commands/CmdAdd.cpp @@ -29,8 +29,8 @@ #include #include +#include #include -#include //////////////////////////////////////////////////////////////////////////////// CmdAdd::CmdAdd() { @@ -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/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..fae5d3818 100644 --- a/src/commands/CmdContext.cpp +++ b/src/commands/CmdContext.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include @@ -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( 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 b7890bdee..11cd8d937 100644 --- a/src/commands/CmdEdit.cpp +++ b/src/commands/CmdEdit.cpp @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -64,7 +63,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 +77,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/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 d6f1f9147..d379a89dd 100644 --- a/src/commands/CmdHistory.cpp +++ b/src/commands/CmdHistory.cpp @@ -33,7 +33,6 @@ #include #include #include -#include #include #include @@ -55,7 +54,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 +293,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..aa6bc6921 100644 --- a/src/commands/CmdIDs.cpp +++ b/src/commands/CmdIDs.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include @@ -137,8 +136,6 @@ CmdCompletionIds::CmdCompletionIds() { //////////////////////////////////////////////////////////////////////////////// int CmdCompletionIds::execute(std::string& output) { // Apply filter. - handleUntil(); - handleRecurrence(); Filter filter; std::vector filtered; filter.subset(filtered); @@ -174,8 +171,6 @@ CmdZshCompletionIds::CmdZshCompletionIds() { //////////////////////////////////////////////////////////////////////////////// int CmdZshCompletionIds::execute(std::string& output) { // Apply filter. - handleUntil(); - handleRecurrence(); Filter filter; std::vector filtered; filter.subset(filtered); @@ -211,8 +206,6 @@ CmdUUIDs::CmdUUIDs() { //////////////////////////////////////////////////////////////////////////////// int CmdUUIDs::execute(std::string& output) { // Apply filter. - handleUntil(); - handleRecurrence(); Filter filter; std::vector filtered; filter.subset(filtered); @@ -247,8 +240,6 @@ CmdCompletionUuids::CmdCompletionUuids() { //////////////////////////////////////////////////////////////////////////////// int CmdCompletionUuids::execute(std::string& output) { // Apply filter. - handleUntil(); - handleRecurrence(); Filter filter; std::vector filtered; filter.subset(filtered); @@ -283,8 +274,6 @@ CmdZshCompletionUuids::CmdZshCompletionUuids() { //////////////////////////////////////////////////////////////////////////////// int CmdZshCompletionUuids::execute(std::string& output) { // Apply filter. - handleUntil(); - handleRecurrence(); Filter filter; std::vector filtered; filter.subset(filtered); 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/CmdInfo.cpp b/src/commands/CmdInfo.cpp index 7ffb56942..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 @@ -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/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 ed6e3d609..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 @@ -119,7 +120,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/commands/CmdNews.cpp b/src/commands/CmdNews.cpp index 6eeec1ba6..b6a6f75cb 100644 --- a/src/commands/CmdNews.cpp +++ b/src/commands/CmdNews.cpp @@ -33,7 +33,6 @@ #include #include #include -#include #include #include @@ -161,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; } @@ -531,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(); @@ -573,61 +588,10 @@ 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; } 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& = "", 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/CmdSync.cpp b/src/commands/CmdSync.cpp index 1d8cc0818..3adca98c9 100644 --- a/src/commands/CmdSync.cpp +++ b/src/commands/CmdSync.cpp @@ -32,13 +32,11 @@ #include #include #include -#include #include -#include #include #include -#include +#include #include //////////////////////////////////////////////////////////////////////////////// @@ -81,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'; @@ -149,7 +151,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); 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/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/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.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/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: diff --git a/src/dependency.cpp b/src/dependency.cpp index 28b592470..380c471cb 100644 --- a/src/dependency.cpp +++ b/src/dependency.cpp @@ -28,13 +28,11 @@ // cmake.h include header must come first #include +#include #include -#include #include -#include #include -#include #include #define STRING_DEPEND_BLOCKED "Task {1} is blocked by:" 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 60d89a686..efd2302b4 100644 --- a/src/feedback.cpp +++ b/src/feedback.cpp @@ -31,13 +31,11 @@ #include #include #include +#include #include -#include -#include #include #include -#include #include #include #include @@ -51,7 +49,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/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.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/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/libshared b/src/libshared index 1a06cb4ca..8ad364620 160000 --- a/src/libshared +++ b/src/libshared @@ -1 +1 @@ -Subproject commit 1a06cb4caebdae3c5e58fe83e2fd2211d2959815 +Subproject commit 8ad3646209c8d2e7820c3cd59319a2be3b3d221e diff --git a/src/main.h b/src/main.h deleted file mode 100644 index 9220a1345..000000000 --- a/src/main.h +++ /dev/null @@ -1,94 +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 -#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.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/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 d6bb47454..482fc1060 100644 --- a/src/recur.cpp +++ b/src/recur.cpp @@ -31,25 +31,19 @@ #include #include #include +#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) { @@ -288,9 +282,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 +342,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/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 924644233..21c46307d 100644 --- a/src/rules.cpp +++ b/src/rules.cpp @@ -29,9 +29,8 @@ #include #include -#include +#include #include -#include static std::map gsColor; static std::vector gsPrecedence; 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/taskchampion-cpp/corrosion b/src/taskchampion-cpp/corrosion index 64289b1d7..715c235da 160000 --- a/src/taskchampion-cpp/corrosion +++ b/src/taskchampion-cpp/corrosion @@ -1 +1 @@ -Subproject commit 64289b1d79d6d19cd2e241db515381a086bb8407 +Subproject commit 715c235daef4b8ee67278f12256334ad3dd4c4ae 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/src/util.cpp b/src/util.cpp index 04593791f..ebbbf2191 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -34,14 +34,11 @@ #ifdef FREEBSD #define _WITH_GETLINE #endif +#include #include -#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) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 08051bab2..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 @@ -188,6 +189,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 +209,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/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/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""" 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 { diff --git a/test/make_tc_task.cpp b/test/make_tc_task.cpp new file mode 100644 index 000000000..37f1d963f --- /dev/null +++ b/test/make_tc_task.cpp @@ -0,0 +1,76 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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 + +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, /*create_if_missing=*/true, /*read_write=*/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/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): 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/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 22134d250..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 { @@ -61,7 +59,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 +106,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/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/unusual_task.test.py b/test/unusual_task.test.py new file mode 100755 index 000000000..18f8efffe --- /dev/null +++ b/test/unusual_task.test.py @@ -0,0 +1,204 @@ +#!/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 json +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") + json.loads(out) + + +if __name__ == "__main__": + from simpletap import TAPTestRunner + + unittest.main(testRunner=TAPTestRunner()) + +# vim: ai sts=4 et sw=4 ft=python 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/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; } diff --git a/test/view_test.cpp b/test/view_test.cpp index 76a27541a..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 @@ -47,6 +46,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");