diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..1a2c2412 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +version: 2 +updates: + - package-ecosystem: cargo + directory: / + schedule: + interval: weekly + cooldown: # applies only to version-updates (security-updates will be suggested immediately) + default-days: 10 + semver-minor-days: 14 # wait 14 days before applying minor updates + semver-major-days: 28 + versioning-strategy: increase-if-necessary # Update Cargo.toml only if necessary https://github.com/dependabot/dependabot-core/issues/4009 + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + cooldown: + default-days: 10 diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 92ce9cc7..9f9d08dd 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -9,7 +9,7 @@ jobs: benchmark: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install Rust uses: dtolnay/rust-toolchain@stable @@ -22,7 +22,7 @@ jobs: pip install ruff pytest - name: Install Go - uses: actions/setup-go@v5 + uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 with: go-version: 'stable' diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index bd1e0893..54091dcd 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -16,7 +16,7 @@ jobs: release_created: ${{ steps.release.outputs.release_created }} tag_name: ${{ steps.release.outputs.tag_name }} steps: - - uses: googleapis/release-please-action@v4 + - uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0 id: release with: release-type: rust @@ -39,7 +39,7 @@ jobs: if: ${{ needs.release-please.outputs.release_created == 'true' }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 15113f51..2371e576 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,7 +50,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install Rust uses: dtolnay/rust-toolchain@stable @@ -88,7 +88,7 @@ jobs: cd ../../.. - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 with: name: rtk-${{ matrix.target }} path: rtk-${{ matrix.target }}.${{ matrix.archive }} @@ -98,7 +98,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install Rust uses: dtolnay/rust-toolchain@stable @@ -110,7 +110,7 @@ jobs: run: cargo deb - name: Upload DEB - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 with: name: rtk-deb path: target/debian/*.deb @@ -121,7 +121,7 @@ jobs: container: fedora:latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install dependencies run: | @@ -137,7 +137,7 @@ jobs: run: cargo generate-rpm - name: Upload RPM - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 with: name: rtk-rpm path: target/generate-rpm/*.rpm @@ -148,10 +148,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Download all artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0 with: path: artifacts @@ -185,7 +185,7 @@ jobs: sha256sum * > checksums.txt - name: Upload Release Assets - uses: softprops/action-gh-release@v2 + uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0 with: tag_name: ${{ steps.version.outputs.version }} files: release/* diff --git a/.github/workflows/security-check.yml b/.github/workflows/security-check.yml index 75859305..f0426a22 100644 --- a/.github/workflows/security-check.yml +++ b/.github/workflows/security-check.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout PR - uses: actions/checkout@v4 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 diff --git a/.github/workflows/validate-docs.yml b/.github/workflows/validate-docs.yml index 27879bc0..4c23a47d 100644 --- a/.github/workflows/validate-docs.yml +++ b/.github/workflows/validate-docs.yml @@ -16,7 +16,7 @@ jobs: validate: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Validate documentation consistency run: bash scripts/validate-docs.sh diff --git a/Cargo.lock b/Cargo.lock index 85ec1d45..706be3b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,18 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "ahash" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.4" @@ -68,7 +56,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.61.2", + "windows-sys", ] [[package]] @@ -79,7 +67,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.61.2", + "windows-sys", ] [[package]] @@ -193,12 +181,11 @@ checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "colored" -version = "2.2.0" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" +checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34" dependencies = [ - "lazy_static", - "windows-sys 0.59.0", + "windows-sys", ] [[package]] @@ -234,23 +221,23 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "dirs" -version = "5.0.1" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" dependencies = [ "dirs-sys", ] [[package]] name = "dirs-sys" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -266,7 +253,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys", ] [[package]] @@ -293,6 +280,12 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db" +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + [[package]] name = "getrandom" version = "0.2.17" @@ -329,28 +322,22 @@ dependencies = [ "regex-syntax", ] -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", -] - [[package]] name = "hashbrown" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "foldhash", +] [[package]] name = "hashlink" -version = "0.9.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +checksum = "ea0b22561a9c04a7cb1a302c013e0259cd3b4bb619f145b32f72b8b4bcbed230" dependencies = [ - "hashbrown 0.14.5", + "hashbrown", ] [[package]] @@ -406,7 +393,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", - "hashbrown 0.16.1", + "hashbrown", ] [[package]] @@ -455,9 +442,9 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.28.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f" +checksum = "95b4103cffefa72eb8428cb6b47d6627161e51c2739fc5e3b734584157bc642a" dependencies = [ "cc", "pkg-config", @@ -541,9 +528,9 @@ checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "redox_users" -version = "0.4.6" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ "getrandom 0.2.17", "libredox", @@ -579,6 +566,16 @@ version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" +[[package]] +name = "rsqlite-vfs" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8a1f2315036ef6b1fbacd1972e8ee7688030b0a2121edfc2a6550febd41574d" +dependencies = [ + "hashbrown", + "thiserror", +] + [[package]] name = "rtk" version = "0.23.0" @@ -602,9 +599,9 @@ dependencies = [ [[package]] name = "rusqlite" -version = "0.31.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae" +checksum = "f1c93dd1c9683b438c392c492109cb702b8090b2bfc8fed6f6e4eb4523f17af3" dependencies = [ "bitflags", "fallible-iterator", @@ -612,6 +609,7 @@ dependencies = [ "hashlink", "libsqlite3-sys", "smallvec", + "sqlite-wasm-rs", ] [[package]] @@ -624,7 +622,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.2", + "windows-sys", ] [[package]] @@ -688,11 +686,11 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.9" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -707,6 +705,18 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +[[package]] +name = "sqlite-wasm-rs" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4206ed3a67690b9c29b77d728f6acc3ce78f16bf846d83c94f76400320181b" +dependencies = [ + "cc", + "js-sys", + "rsqlite-vfs", + "wasm-bindgen", +] + [[package]] name = "strsim" version = "0.11.1" @@ -734,23 +744,23 @@ dependencies = [ "getrandom 0.3.4", "once_cell", "rustix", - "windows-sys 0.61.2", + "windows-sys", ] [[package]] name = "thiserror" -version = "1.0.69" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.69" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", @@ -759,44 +769,42 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.23" +version = "1.0.3+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +checksum = "c7614eaf19ad818347db24addfa201729cf2a9b6fdfd9eb0ab870fcacc606c0c" dependencies = [ - "serde", + "indexmap", + "serde_core", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_parser", + "toml_writer", + "winnow", ] [[package]] name = "toml_datetime" -version = "0.6.11" +version = "1.0.0+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +checksum = "32c2555c699578a4f59f0cc68e5116c8d7cabbd45e1409b989d4be085b53f13e" dependencies = [ - "serde", + "serde_core", ] [[package]] -name = "toml_edit" -version = "0.22.27" +name = "toml_parser" +version = "1.0.9+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4" dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "toml_write", "winnow", ] [[package]] -name = "toml_write" -version = "0.1.2" +name = "toml_writer" +version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" +checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" [[package]] name = "unicode-ident" @@ -816,12 +824,6 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - [[package]] name = "walkdir" version = "2.5.0" @@ -898,7 +900,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys", ] [[package]] @@ -960,24 +962,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-sys" version = "0.61.2" @@ -987,135 +971,11 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", - "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_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[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_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[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_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[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_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - [[package]] name = "winnow" version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" -dependencies = [ - "memchr", -] [[package]] name = "wit-bindgen" @@ -1123,26 +983,6 @@ version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" -[[package]] -name = "zerocopy" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "zmij" version = "1.0.16" diff --git a/Cargo.toml b/Cargo.toml index 0859faff..c89cd0b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,12 +20,12 @@ regex = "1" lazy_static = "1.4" serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["preserve_order"] } -colored = "2" -dirs = "5" -rusqlite = { version = "0.31", features = ["bundled"] } -toml = "0.8" +colored = "3" +dirs = "6" +rusqlite = { version = "0.38", features = ["bundled"] } +toml = "1.0" chrono = "0.4" -thiserror = "1.0" +thiserror = "2.0" tempfile = "3" [dev-dependencies] diff --git a/src/cc_economics.rs b/src/cc_economics.rs index b38bba2f..cf135ac3 100644 --- a/src/cc_economics.rs +++ b/src/cc_economics.rs @@ -14,6 +14,7 @@ use crate::utils::{format_cpt, format_tokens, format_usd}; // ── Constants ── +#[allow(dead_code)] const BILLION: f64 = 1e9; // API pricing ratios (verified Feb 2026, consistent across Claude models <=200K context) diff --git a/src/ccusage.rs b/src/ccusage.rs index 822cca15..77634810 100644 --- a/src/ccusage.rs +++ b/src/ccusage.rs @@ -115,6 +115,7 @@ fn build_command() -> Option { } /// Check if ccusage CLI is available (binary or via npx) +#[allow(dead_code)] pub fn is_available() -> bool { build_command().is_some() } diff --git a/src/discover/provider.rs b/src/discover/provider.rs index e9218b2d..cc5b31e1 100644 --- a/src/discover/provider.rs +++ b/src/discover/provider.rs @@ -17,6 +17,7 @@ pub struct ExtractedCommand { pub output_content: Option, /// Whether the tool_result indicated an error pub is_error: bool, + #[allow(dead_code)] /// Chronological sequence index within the session pub sequence_index: usize, } diff --git a/src/golangci_cmd.rs b/src/golangci_cmd.rs index ca55a0ce..520c7f0a 100644 --- a/src/golangci_cmd.rs +++ b/src/golangci_cmd.rs @@ -10,8 +10,10 @@ struct Position { #[serde(rename = "Filename")] filename: String, #[serde(rename = "Line")] + #[allow(dead_code)] line: usize, #[serde(rename = "Column")] + #[allow(dead_code)] column: usize, } @@ -20,6 +22,7 @@ struct Issue { #[serde(rename = "FromLinter")] from_linter: String, #[serde(rename = "Text")] + #[allow(dead_code)] text: String, #[serde(rename = "Pos")] pos: Position, diff --git a/src/init.rs b/src/init.rs index 961e4ac3..5d409577 100644 --- a/src/init.rs +++ b/src/init.rs @@ -558,7 +558,6 @@ fn clean_double_blanks(content: &str) -> String { if line.trim().is_empty() { // Count consecutive blank lines let mut blank_count = 0; - let start = i; while i < lines.len() && lines[i].trim().is_empty() { blank_count += 1; i += 1; @@ -1429,14 +1428,7 @@ More notes let serialized = serde_json::to_string(&parsed).unwrap(); // Keys should appear in same order - let original_keys: Vec<&str> = original.split("\"").filter(|s| s.contains(":")).collect(); - let serialized_keys: Vec<&str> = - serialized.split("\"").filter(|s| s.contains(":")).collect(); - - // Just check that keys exist (preserve_order doesn't guarantee exact order in nested objects) - assert!(serialized.contains("\"env\"")); - assert!(serialized.contains("\"permissions\"")); - assert!(serialized.contains("\"model\"")); + assert_eq!(original.replace(" ", ""), serialized); } // Tests for clean_double_blanks() diff --git a/src/learn/detector.rs b/src/learn/detector.rs index 87f0e162..d115bd9f 100644 --- a/src/learn/detector.rs +++ b/src/learn/detector.rs @@ -5,6 +5,7 @@ use regex::Regex; pub enum ErrorType { UnknownFlag, CommandNotFound, + #[allow(dead_code)] WrongSyntax, WrongPath, MissingArg, diff --git a/src/lint_cmd.rs b/src/lint_cmd.rs index 9eeb92a8..01d90088 100644 --- a/src/lint_cmd.rs +++ b/src/lint_cmd.rs @@ -3,7 +3,6 @@ use crate::ruff_cmd; use crate::tracking; use crate::utils::{package_manager_exec, truncate}; use anyhow::{Context, Result}; -use regex::Regex; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::process::Command; @@ -37,11 +36,13 @@ struct PylintDiagnostic { module: String, #[allow(dead_code)] obj: String, + #[allow(dead_code)] line: usize, #[allow(dead_code)] column: usize, path: String, symbol: String, // rule code like "unused-variable" + #[allow(dead_code)] message: String, #[serde(rename = "message-id")] message_id: String, // e.g., "W0612" diff --git a/src/parser/error.rs b/src/parser/error.rs index eee4f343..e3e48f07 100644 --- a/src/parser/error.rs +++ b/src/parser/error.rs @@ -2,6 +2,7 @@ use thiserror::Error; #[derive(Error, Debug)] +#[allow(dead_code)] pub enum ParseError { #[error("JSON parse failed at line {line}, column {col}: {msg}")] JsonError { diff --git a/src/parser/mod.rs b/src/parser/mod.rs index 5561ec68..48f5dadc 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -27,6 +27,7 @@ pub enum ParseResult { Passthrough(String), } +#[allow(dead_code)] impl ParseResult { /// Unwrap the parsed data, panicking on Passthrough pub fn unwrap(self) -> T { @@ -85,6 +86,7 @@ pub trait OutputParser: Sized { fn parse(input: &str) -> ParseResult; /// Parse with explicit tier preference (for testing/debugging) + #[allow(dead_code)] fn parse_with_tier(input: &str, max_tier: u8) -> ParseResult { let result = Self::parse(input); if result.tier() > max_tier { diff --git a/src/parser/types.rs b/src/parser/types.rs index 2339e2d4..ea3ffb14 100644 --- a/src/parser/types.rs +++ b/src/parser/types.rs @@ -23,6 +23,7 @@ pub struct TestFailure { /// Linting result (eslint, biome, tsc, etc.) #[derive(Debug, Clone, Serialize, Deserialize)] +#[allow(dead_code)] pub struct LintResult { pub total_files: usize, pub files_with_issues: usize, @@ -33,6 +34,7 @@ pub struct LintResult { } #[derive(Debug, Clone, Serialize, Deserialize)] +#[allow(dead_code)] pub struct LintIssue { pub file_path: String, pub line: usize, @@ -43,6 +45,7 @@ pub struct LintIssue { } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[allow(dead_code)] pub enum LintSeverity { Error, Warning, @@ -68,6 +71,7 @@ pub struct Dependency { /// Build output (next, webpack, vite, cargo, etc.) #[derive(Debug, Clone, Serialize, Deserialize)] +#[allow(dead_code)] pub struct BuildOutput { pub success: bool, pub duration_ms: Option, @@ -78,6 +82,7 @@ pub struct BuildOutput { } #[derive(Debug, Clone, Serialize, Deserialize)] +#[allow(dead_code)] pub struct BundleInfo { pub name: String, pub size_bytes: u64, @@ -93,6 +98,7 @@ pub struct RouteInfo { /// Git operation result #[derive(Debug, Clone, Serialize, Deserialize)] +#[allow(dead_code)] pub struct GitResult { pub operation: String, pub files_changed: usize, @@ -102,6 +108,7 @@ pub struct GitResult { } #[derive(Debug, Clone, Serialize, Deserialize)] +#[allow(dead_code)] pub struct GitCommit { pub hash: String, pub author: String, @@ -111,6 +118,7 @@ pub struct GitCommit { /// Generic command output (for tools without specific types) #[derive(Debug, Clone, Serialize, Deserialize)] +#[allow(dead_code)] pub struct GenericOutput { pub exit_code: i32, pub stdout: String, diff --git a/src/ruff_cmd.rs b/src/ruff_cmd.rs index 3a58cf51..d69cae1b 100644 --- a/src/ruff_cmd.rs +++ b/src/ruff_cmd.rs @@ -7,7 +7,9 @@ use std::process::Command; #[derive(Debug, Deserialize)] struct RuffLocation { + #[allow(dead_code)] row: usize, + #[allow(dead_code)] column: usize, } @@ -20,7 +22,9 @@ struct RuffFix { #[derive(Debug, Deserialize)] struct RuffDiagnostic { code: String, + #[allow(dead_code)] message: String, + #[allow(dead_code)] location: RuffLocation, #[allow(dead_code)] end_location: Option, diff --git a/src/tracking.rs b/src/tracking.rs index 0408ab75..f0008aca 100644 --- a/src/tracking.rs +++ b/src/tracking.rs @@ -390,6 +390,7 @@ impl Tracker { /// summary.total_saved, summary.avg_savings_pct); /// # Ok::<(), anyhow::Error>(()) /// ``` + #[allow(dead_code)] pub fn get_summary(&self) -> Result { self.get_summary_filtered(None) // delegate to filtered variant } @@ -753,6 +754,7 @@ impl Tracker { /// } /// # Ok::<(), anyhow::Error>(()) /// ``` + #[allow(dead_code)] pub fn get_recent(&self, limit: usize) -> Result> { self.get_recent_filtered(limit, None) // delegate to filtered variant } @@ -991,6 +993,7 @@ pub fn args_display(args: &[OsString]) -> String { /// timer.track("ls -la", "rtk ls", "input", "output"); /// ``` #[deprecated(note = "Use TimedExecution instead")] +#[allow(dead_code)] pub fn track(original_cmd: &str, rtk_cmd: &str, input: &str, output: &str) { let input_tokens = estimate_tokens(input); let output_tokens = estimate_tokens(output);