diff --git a/Cargo.lock b/Cargo.lock index cee1a9f34..abae65ecd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -46,9 +46,9 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "ammonia" -version = "4.1.0" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ada2ee439075a3e70b6992fce18ac4e407cd05aea9ca3f75d2c0b0c20bbb364" +checksum = "17e913097e1a2124b46746c980134e8c954bc17a6a59bb3fde96f088d126dde6" dependencies = [ "cssparser", "html5ever", @@ -133,13 +133,14 @@ dependencies = [ "once_cell", "pbkdf2", "percent-encoding-iri", + "permutation", "phf", "pin-project", "prettyplease", "prost", "prost-reflect", "pulldown-cmark", - "rand 0.9.2", + "rand 0.9.4", "rayon", "regex", "reqwest", @@ -152,6 +153,7 @@ dependencies = [ "serde_repr", "serde_tuple", "sha1", + "sha2 0.11.0", "snafu", "strum 0.27.2", "syn 2.0.103", @@ -577,6 +579,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdd35008169921d80bc60d3d0ab416eecb028c4cd653352907921d95084790be" +dependencies = [ + "hybrid-array", +] + [[package]] name = "build_rust" version = "0.1.0" @@ -677,7 +688,7 @@ dependencies = [ "log", "num-traits", "portable-atomic-util", - "rand 0.9.2", + "rand 0.9.4", "rmp-serde", "serde", "serde_json", @@ -703,7 +714,7 @@ dependencies = [ "hashbrown 0.15.2", "log", "num-traits", - "rand 0.9.2", + "rand 0.9.4", "serde", "spin 0.10.0", "text_placeholder", @@ -733,7 +744,7 @@ dependencies = [ "csv", "derive-new 0.7.0", "dirs 6.0.0", - "rand 0.9.2", + "rand 0.9.4", "rmp-serde", "sanitize-filename 0.6.0", "serde", @@ -788,7 +799,7 @@ dependencies = [ "num-traits", "paste", "portable-atomic-util", - "rand 0.9.2", + "rand 0.9.4", "seq-macro", "spin 0.10.0", ] @@ -836,7 +847,7 @@ dependencies = [ "half", "hashbrown 0.15.2", "num-traits", - "rand 0.9.2", + "rand 0.9.4", "rand_distr", "serde", "serde_bytes", @@ -902,9 +913,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.10.1" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "bytesize" @@ -933,7 +944,7 @@ dependencies = [ "memmap2", "num-traits", "num_cpus", - "rand 0.9.2", + "rand 0.9.4", "rand_distr", "rayon", "safetensors", @@ -1153,6 +1164,12 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "const-oid" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" + [[package]] name = "constant_time_eq" version = "0.3.1" @@ -1214,6 +1231,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + [[package]] name = "crc32fast" version = "1.4.2" @@ -1273,6 +1299,15 @@ dependencies = [ "typenum", ] +[[package]] +name = "crypto-common" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77727bb15fa921304124b128af125e7e3b968275d1b108b379190264f4423710" +dependencies = [ + "hybrid-array", +] + [[package]] name = "cssparser" version = "0.35.0" @@ -1351,7 +1386,7 @@ dependencies = [ "log", "num-traits", "portable-atomic", - "rand 0.9.2", + "rand 0.9.4", "sanitize-filename 0.5.0", "serde", "serde_json", @@ -1700,11 +1735,22 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer", - "crypto-common", + "block-buffer 0.10.4", + "crypto-common 0.1.6", "subtle", ] +[[package]] +name = "digest" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" +dependencies = [ + "block-buffer 0.12.0", + "const-oid", + "crypto-common 0.2.1", +] + [[package]] name = "dirs" version = "5.0.1" @@ -2093,16 +2139,16 @@ dependencies = [ [[package]] name = "fsrs" -version = "5.1.0" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04954cc67c3c11ee342a2ee1f5222bf76d73f7772df08d37dc9a6cdd73c467eb" +checksum = "cab5f80c16d1d07e492a6828478ecb9f379f142ba6f19fa3b7955edd180ddc2e" dependencies = [ "burn", "itertools", "log", "ndarray", "priority-queue", - "rand 0.9.2", + "rand 0.9.4", "rayon", "serde", "snafu", @@ -2635,7 +2681,7 @@ dependencies = [ "cfg-if", "crunchy", "num-traits", - "rand 0.9.2", + "rand 0.9.4", "rand_distr", "serde", ] @@ -2741,17 +2787,16 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest", + "digest 0.10.7", ] [[package]] name = "html5ever" -version = "0.31.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953cbbe631aae7fc0a112702ad5d3aaf09da38beaf45ea84610d6e1c358f569c" +checksum = "55d958c2f74b664487a2035fe1dadb032c48718a03b63f3ab0b8537db8549ed4" dependencies = [ "log", - "mac", "markup5ever", "match_token", ] @@ -2808,6 +2853,15 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +[[package]] +name = "hybrid-array" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9155a582abd142abc056962c29e3ce5ff2ad5469f4246b537ed42c5deba857da" +dependencies = [ + "typenum", +] + [[package]] name = "hyper" version = "1.6.0" @@ -3355,9 +3409,9 @@ checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" [[package]] name = "markup5ever" -version = "0.16.2" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e4cd8c02f18a011991a039855480c64d74291c5792fcc160d55d77dc4de4a39" +checksum = "311fe69c934650f8f19652b3946075f0fc41ad8757dbb68f1ca14e7900ecc1c3" dependencies = [ "log", "tendril", @@ -3366,9 +3420,9 @@ dependencies = [ [[package]] name = "match_token" -version = "0.1.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88a9689d8d44bf9964484516275f5cd4c9b59457a6940c1d5d0ecbb94510a36b" +checksum = "ac84fd3f360fcc43dc5f5d186f02a94192761a080e8bc58621ad4d12296a58cf" dependencies = [ "proc-macro2", "quote", @@ -3891,10 +3945,10 @@ version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ - "digest", + "digest 0.10.7", "hmac", "password-hash", - "sha2", + "sha2 0.10.8", ] [[package]] @@ -3917,6 +3971,12 @@ name = "percent-encoding-iri" version = "2.2.0" source = "git+https://github.com/ankitects/rust-url.git?rev=bb930b8d089f4d30d7d19c12e54e66191de47b88#bb930b8d089f4d30d7d19c12e54e66191de47b88" +[[package]] +name = "permutation" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df202b0b0f5b8e389955afd5f27b007b00fb948162953f1db9c70d2c7e3157d7" + [[package]] name = "petgraph" version = "0.7.1" @@ -4249,7 +4309,7 @@ checksum = "b820744eb4dc9b57a3398183639c511b5a26d2ed702cedd3febaa1393caa22cc" dependencies = [ "bytes", "getrandom 0.3.2", - "rand 0.9.2", + "rand 0.9.4", "ring", "rustc-hash 2.1.1", "rustls", @@ -4301,9 +4361,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" dependencies = [ "rand_chacha", "rand_core 0.9.3", @@ -4341,7 +4401,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8615d50dcf34fa31f7ab52692afec947c4dd0ab803cc87cb3b0b4570ff7463" dependencies = [ "num-traits", - "rand 0.9.2", + "rand 0.9.4", ] [[package]] @@ -5010,8 +5070,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", - "cpufeatures", - "digest", + "cpufeatures 0.2.17", + "digest 0.10.7", ] [[package]] @@ -5021,8 +5081,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", - "cpufeatures", - "digest", + "cpufeatures 0.2.17", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "digest 0.11.3", ] [[package]] @@ -5825,9 +5896,9 @@ checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" [[package]] name = "typenum" -version = "1.18.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" +checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" [[package]] name = "ug" diff --git a/anki b/anki index 3890e12c9..7a9ef3239 160000 --- a/anki +++ b/anki @@ -1 +1 @@ -Subproject commit 3890e12c9e48c028c3f12aa58cb64bd9f8895e30 +Subproject commit 7a9ef323993c86ed58f8648547f710a2f7b14eca diff --git a/gradle.properties b/gradle.properties index aa37d4cf8..93b6ab406 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,7 +19,7 @@ android.useAndroidX=true android.enableJetifier=false GROUP=io.github.david-allison -VERSION_NAME=0.1.64-anki25.09.2 +VERSION_NAME=0.1.65-anki26.05b1 POM_INCEPTION_YEAR=2020 diff --git a/rsdroid/src/main/java/net/ankiweb/rsdroid/BackendException.kt b/rsdroid/src/main/java/net/ankiweb/rsdroid/BackendException.kt index 1ab8ef32b..d14d7bea7 100644 --- a/rsdroid/src/main/java/net/ankiweb/rsdroid/BackendException.kt +++ b/rsdroid/src/main/java/net/ankiweb/rsdroid/BackendException.kt @@ -173,6 +173,10 @@ open class BackendException : RuntimeException { error: BackendError, ) : BackendException(error) + class BackendInvalidChecksumException( + error: BackendError, + ) : BackendException(error) + class BackendFatalError( error: BackendError, ) : BackendException(error) @@ -206,6 +210,7 @@ open class BackendException : RuntimeException { BackendError.Kind.OS_ERROR -> return BackendOsErrorException(error) BackendError.Kind.SCHEDULER_UPGRADE_REQUIRED -> return BackendSchedulerUpgradeRequiredException(error) BackendError.Kind.INVALID_CERTIFICATE_FORMAT -> return BackendInvalidCertificateFormatException(error) + BackendError.Kind.INVALID_CHECKSUM -> return BackendInvalidChecksumException(error) } } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 452c65213..7e819fd82 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] # older versions may fail to compile; newer versions may fail the clippy tests -channel = "1.89.0" +channel = "1.92.0" \ No newline at end of file diff --git a/set-android-ndk-home.sh b/set-android-ndk-home.sh index 07b41edde..d3dba3cde 100755 --- a/set-android-ndk-home.sh +++ b/set-android-ndk-home.sh @@ -12,6 +12,6 @@ ANDROID_NDK_VERSION=$(toml get gradle/libs.versions.toml versions.ndk --raw) export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/$ANDROID_NDK_VERSION if ! [ -e "${ANDROID_NDK_HOME}" ]; then echo "Android NDK ${ANDROID_NDK_VERSION} needed for Anki-Android-Backend but not installed." - echo "Install it with \'${ANDROID_HOME}\cmdline-tools\latest\bin\sdkmanager --install ndk;${ANDROID_NDK_VERSION}\'." + echo "Install it with '${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install \"ndk;${ANDROID_NDK_VERSION}\"'." exit 1 fi \ No newline at end of file