diff --git a/Cargo.lock b/Cargo.lock index f0dffb5bb..43f43bbdb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -59,9 +59,9 @@ checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1" [[package]] name = "allocator-api2" -version = "0.2.19" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611cc2ae7d2e242c457e4be7f97036b8ad9ca152b499f53faf99b1ed8fc2553f" +checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" [[package]] name = "ammonia" @@ -353,7 +353,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "serde", ] @@ -437,9 +437,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.37" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40545c26d092346d8a8dab71ee48e7685a7a9cba76e634790c215b41a4a7b4cf" +checksum = "1aeb932158bd710538c73702db6945cb68a8fb08c519e6e12706b94263b36db8" dependencies = [ "jobserver", "libc", @@ -585,7 +585,7 @@ checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" dependencies = [ "serde", "termcolor", - "unicode-width", + "unicode-width 0.1.11", ] [[package]] @@ -619,7 +619,7 @@ dependencies = [ "encode_unicode", "lazy_static", "libc", - "unicode-width", + "unicode-width 0.1.11", "windows-sys 0.52.0", ] @@ -683,9 +683,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "0ca741a962e1b0bff6d724a1a0958b686406e853bb14061f218562e1896f95e6" dependencies = [ "libc", ] @@ -890,7 +890,7 @@ dependencies = [ "console", "shell-words", "tempfile", - "thiserror", + "thiserror 1.0.69", "zeroize", ] @@ -1294,7 +1294,7 @@ dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "regex-syntax 0.8.5", ] @@ -1358,7 +1358,7 @@ dependencies = [ "pest_derive", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1449,6 +1449,7 @@ dependencies = [ "supports-hyperlinks", "tabled", "terminal-link", + "thiserror 2.0.3", "time", "tracing", "tracing-subscriber", @@ -1485,7 +1486,7 @@ dependencies = [ "steamlocate", "strsim", "strum", - "thiserror", + "thiserror 2.0.3", "toml 0.8.19", "tracing", "tracing-test", @@ -1541,7 +1542,7 @@ version = "1.0.1" dependencies = [ "libc", "rand", - "thiserror", + "thiserror 2.0.3", ] [[package]] @@ -1552,6 +1553,7 @@ dependencies = [ "hemtt-common", "hemtt-workspace", "indexmap", + "thiserror 2.0.3", ] [[package]] @@ -1576,6 +1578,7 @@ dependencies = [ "insta", "serde", "sha-1", + "thiserror 2.0.3", ] [[package]] @@ -1592,6 +1595,7 @@ dependencies = [ "pest", "pest_derive", "strsim", + "thiserror 2.0.3", "tracing", "vfs", ] @@ -1606,6 +1610,7 @@ dependencies = [ "rand", "rsa", "sha-1", + "thiserror 2.0.3", ] [[package]] @@ -1624,6 +1629,7 @@ dependencies = [ "insta", "linkme", "paste", + "thiserror 2.0.3", "toml 0.8.19", "tracing", ] @@ -1659,6 +1665,7 @@ dependencies = [ "serde", "supports-hyperlinks", "terminal-link", + "thiserror 2.0.3", "toml 0.8.19", "tower-lsp", "tracing", @@ -2051,7 +2058,7 @@ dependencies = [ "globset", "log", "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "same-file", "walkdir", "winapi-util", @@ -2108,15 +2115,15 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.17.8" +version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +checksum = "cbf675b85ed934d3c67b5c5469701eec7db22689d0a2139d856e0925fa28b281" dependencies = [ "console", - "instant", "number_prefix", "portable-atomic", - "unicode-width", + "unicode-width 0.2.0", + "web-time", ] [[package]] @@ -2238,7 +2245,7 @@ dependencies = [ "combine", "jni-sys", "log", - "thiserror", + "thiserror 1.0.69", "walkdir", "windows-sys 0.45.0", ] @@ -2281,7 +2288,7 @@ checksum = "7e4c8354918309196302015ac9cae43362f1a13d0d5c5539a33b4c2fd2cd6d25" dependencies = [ "pest", "pest_derive", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2292,7 +2299,7 @@ checksum = "0447866c47c00f8bd1949618e8f63017cf93e985b4684dc28d784527e2882390" dependencies = [ "keyvalues-parser", "serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2421,18 +2428,18 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linkme" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70fe496a7af8c406f877635cbf3cd6a9fac9d6f443f58691cd8afe6ce0971af4" +checksum = "566336154b9e58a4f055f6dd4cbab62c7dc0826ce3c0a04e63b2d2ecd784cdae" dependencies = [ "linkme-impl", ] [[package]] name = "linkme-impl" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b01f197a15988fb5b2ec0a5a9800c97e70771499c456ad757d63b3c5e9b96e75" +checksum = "edbe595006d355eaf9ae11db92707d4338cd2384d16866131cc1afdbdd35d8d9" dependencies = [ "proc-macro2", "quote", @@ -3005,7 +3012,7 @@ checksum = "c7419ad52a7de9b60d33e11085a0fe3df1fbd5926aa3f93d3dd53afbc9e86725" dependencies = [ "bytecount", "fnv", - "unicode-width", + "unicode-width 0.1.11", ] [[package]] @@ -3081,7 +3088,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" dependencies = [ "memchr", - "thiserror", + "thiserror 1.0.69", "ucd-trie", ] @@ -3482,7 +3489,7 @@ dependencies = [ "rand_chacha", "simd_helpers", "system-deps", - "thiserror", + "thiserror 1.0.69", "v_frame", "wasm-bindgen", ] @@ -3539,7 +3546,7 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3550,7 +3557,7 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "regex-syntax 0.8.5", ] @@ -3565,9 +3572,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", @@ -3752,9 +3759,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" -version = "0.38.39" +version = "0.38.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375116bee2be9ed569afe2154ea6a99dfdffd257f533f187498c2a8f5feaf4ee" +checksum = "99e4ea3e1cdc4b559b8e5650f9c8e5998e3e5c1343b4eaf034565f32318d63c0" dependencies = [ "bitflags 2.6.0", "errno", @@ -3909,18 +3916,18 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.214" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.214" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", @@ -4427,18 +4434,38 @@ checksum = "a38c90d48152c236a3ab59271da4f4ae63d678c5d7ad6b7714d7cb9760be5e4b" [[package]] name = "thiserror" -version = "1.0.68" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +dependencies = [ + "thiserror-impl 2.0.3", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ - "thiserror-impl", + "proc-macro2", + "quote", + "syn 2.0.87", ] [[package]] name = "thiserror-impl" -version = "1.0.68" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" +checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" dependencies = [ "proc-macro2", "quote", @@ -4826,7 +4853,7 @@ dependencies = [ "log", "rand", "sha1", - "thiserror", + "thiserror 1.0.69", "url", "utf-8", ] @@ -4861,6 +4888,12 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" + [[package]] name = "unsafe-libyaml" version = "0.2.11" @@ -5104,6 +5137,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "webbrowser" version = "1.0.2" @@ -5609,7 +5652,7 @@ dependencies = [ "pbkdf2", "rand", "sha1", - "thiserror", + "thiserror 1.0.69", "time", "zeroize", "zopfli", diff --git a/Cargo.toml b/Cargo.toml index 3f65eda46..7f1c63dc7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,14 +52,14 @@ peekmore = "1.3.0" pest = "2.7.14" pest_derive = "2.7.14" regex = "1.11.1" -serde = { version = "1.0.214", features = ["derive"] } +serde = { version = "1.0.215", features = ["derive"] } serde_json = "1.0.132" sha-1 = "0.10.1" strsim = "0.11.1" supports-hyperlinks = "3.0.0" tabled = "0.16.0" terminal-link = "0.1.0" -thiserror = "1.0.65" +thiserror = "2.0.3" toml = "0.8.19" tower-lsp = "0.20.0" tracing = { version = "0.1.40", features = ["attributes"] } diff --git a/bin/Cargo.toml b/bin/Cargo.toml index 07e1abeb0..4640c79f1 100644 --- a/bin/Cargo.toml +++ b/bin/Cargo.toml @@ -38,7 +38,7 @@ dirs = { workspace = true } fs_extra = "1.3.0" git2 = { workspace = true } glob = "0.3.1" -indicatif = "0.17.8" +indicatif = "0.17.9" num_cpus = "1.16.0" paste = { workspace = true } rayon = "1.10.0" @@ -51,6 +51,7 @@ serde_json = { workspace = true } supports-hyperlinks = { workspace = true } tabled = { workspace = true } terminal-link = { workspace = true } +thiserror = { workspace = true } time = { version = "0.3.36", features = ["formatting"] } tracing = { workspace = true } tracing-subscriber = { version = "0.3.18", features = ["json"] } diff --git a/bin/src/error.rs b/bin/src/error.rs index 186969a34..4fa8cd676 100644 --- a/bin/src/error.rs +++ b/bin/src/error.rs @@ -1,5 +1,3 @@ -use hemtt_common::error::thiserror; - #[derive(thiserror::Error, Debug)] pub enum Error { #[error("`.hemtt/project.toml` not found")] diff --git a/libs/common/src/error.rs b/libs/common/src/error.rs index 20cef8484..6c8d09221 100644 --- a/libs/common/src/error.rs +++ b/libs/common/src/error.rs @@ -2,8 +2,6 @@ #![allow(missing_docs)] -pub use thiserror; - #[derive(thiserror::Error, Debug)] /// HEMTT Error pub enum Error { diff --git a/libs/p3d/Cargo.toml b/libs/p3d/Cargo.toml index da1252686..a068f52a0 100644 --- a/libs/p3d/Cargo.toml +++ b/libs/p3d/Cargo.toml @@ -14,3 +14,4 @@ hemtt-workspace = { path = "../workspace", version = "1.0.0" } byteorder = { workspace = true } indexmap = { workspace = true } +thiserror = { workspace = true } diff --git a/libs/p3d/src/error.rs b/libs/p3d/src/error.rs index dde2184ed..8614bbf47 100644 --- a/libs/p3d/src/error.rs +++ b/libs/p3d/src/error.rs @@ -1,5 +1,3 @@ -use hemtt_common::error::thiserror; - #[derive(thiserror::Error, Debug)] /// Error type for the PBO writer/reader pub enum Error { diff --git a/libs/pbo/Cargo.toml b/libs/pbo/Cargo.toml index aed7af485..ed449cb44 100644 --- a/libs/pbo/Cargo.toml +++ b/libs/pbo/Cargo.toml @@ -18,6 +18,7 @@ byteorder = { workspace = true } indexmap = { workspace = true } serde = { workspace = true } sha-1 = { workspace = true } +thiserror = { workspace = true } [dev-dependencies] insta = { workspace = true } diff --git a/libs/pbo/src/error.rs b/libs/pbo/src/error.rs index 641d2295e..2bb4cd172 100644 --- a/libs/pbo/src/error.rs +++ b/libs/pbo/src/error.rs @@ -1,5 +1,3 @@ -use hemtt_common::error::thiserror; - #[derive(thiserror::Error, Debug)] /// Error type for the PBO writer/reader pub enum Error { diff --git a/libs/preprocessor/Cargo.toml b/libs/preprocessor/Cargo.toml index 8931d3d6d..92a1ac35e 100644 --- a/libs/preprocessor/Cargo.toml +++ b/libs/preprocessor/Cargo.toml @@ -21,6 +21,7 @@ peekmore = { workspace = true } pest = { workspace = true } pest_derive = { workspace = true } strsim = { workspace = true } +thiserror = { workspace = true } tracing = { workspace = true } vfs = { workspace = true } diff --git a/libs/preprocessor/src/error.rs b/libs/preprocessor/src/error.rs index 8e317aeb4..961919987 100644 --- a/libs/preprocessor/src/error.rs +++ b/libs/preprocessor/src/error.rs @@ -2,7 +2,6 @@ use std::sync::Arc; use tracing::error; -use hemtt_common::error::thiserror; use hemtt_workspace::reporting::Code; #[derive(thiserror::Error, Debug)] diff --git a/libs/signing/Cargo.toml b/libs/signing/Cargo.toml index 57fb4acf4..87815ebb9 100644 --- a/libs/signing/Cargo.toml +++ b/libs/signing/Cargo.toml @@ -20,3 +20,4 @@ byteorder = { workspace = true } rand = "0.8.5" rsa = "0.9.6" sha-1 = { workspace = true } +thiserror = { workspace = true } diff --git a/libs/signing/src/error.rs b/libs/signing/src/error.rs index 34bd6073e..4878c6a70 100644 --- a/libs/signing/src/error.rs +++ b/libs/signing/src/error.rs @@ -1,4 +1,3 @@ -use hemtt_common::error::thiserror; #[derive(thiserror::Error, Debug)] /// Error type for the signing module diff --git a/libs/sqf/Cargo.toml b/libs/sqf/Cargo.toml index c71b402bc..190e5ee8b 100644 --- a/libs/sqf/Cargo.toml +++ b/libs/sqf/Cargo.toml @@ -22,6 +22,7 @@ byteorder = { workspace = true, optional = true } chumsky = { workspace = true, optional = true} float-ord = "0.3.2" linkme = { workspace = true } +thiserror = { workspace = true } toml = { workspace = true } tracing = { workspace = true } diff --git a/libs/sqf/src/compiler/mod.rs b/libs/sqf/src/compiler/mod.rs index 0e5946d1c..eaa017898 100644 --- a/libs/sqf/src/compiler/mod.rs +++ b/libs/sqf/src/compiler/mod.rs @@ -14,7 +14,6 @@ pub mod serializer; use std::{ops::Range, sync::Arc}; -use hemtt_common::error::thiserror; use hemtt_workspace::reporting::Processed; use serializer::CodePointer; diff --git a/libs/sqf/src/compiler/serializer/mod.rs b/libs/sqf/src/compiler/serializer/mod.rs index a2e152325..842b9d257 100644 --- a/libs/sqf/src/compiler/serializer/mod.rs +++ b/libs/sqf/src/compiler/serializer/mod.rs @@ -9,7 +9,6 @@ mod display; pub use self::display::{DisplayConstant, DisplayInstructions}; use byteorder::{ReadBytesExt, WriteBytesExt, LE}; -use hemtt_common::error::thiserror; use std::cmp::Ordering; use std::io::{self, Read, Write}; diff --git a/libs/sqf/src/error.rs b/libs/sqf/src/error.rs index ce0170ad9..bf8207875 100644 --- a/libs/sqf/src/error.rs +++ b/libs/sqf/src/error.rs @@ -1,5 +1,3 @@ -use hemtt_common::error::thiserror; - #[derive(Debug, thiserror::Error)] pub enum Error { #[error(transparent)] diff --git a/libs/sqf/src/parser/mod.rs b/libs/sqf/src/parser/mod.rs index 108b4a6e4..10c095690 100644 --- a/libs/sqf/src/parser/mod.rs +++ b/libs/sqf/src/parser/mod.rs @@ -11,7 +11,6 @@ use crate::{BinaryCommand, Expression, NularCommand, Statement, Statements, Unar use chumsky::prelude::*; use chumsky::Stream; -use hemtt_common::error::thiserror::Error; use hemtt_workspace::reporting::{Code, Processed}; /// Parses a SQF string into a list of statements. @@ -278,7 +277,7 @@ fn keyword(name: &'static str) -> impl Parser> } #[allow(clippy::module_name_repetitions)] -#[derive(Debug, Error)] +#[derive(Debug, thiserror::Error)] pub enum ParserError { #[error("lexing error {0:?}")] LexingError(Vec>), diff --git a/libs/workspace/Cargo.toml b/libs/workspace/Cargo.toml index db0af955d..5a4be538f 100644 --- a/libs/workspace/Cargo.toml +++ b/libs/workspace/Cargo.toml @@ -20,6 +20,7 @@ paste = { workspace = true } serde = { workspace = true } supports-hyperlinks = { workspace = true } terminal-link = { workspace = true } +thiserror = { workspace = true } toml = { workspace = true } tracing = { workspace = true } vfs = { workspace = true } diff --git a/libs/workspace/src/addons.rs b/libs/workspace/src/addons.rs index 34f7eed4a..36f2b65f6 100644 --- a/libs/workspace/src/addons.rs +++ b/libs/workspace/src/addons.rs @@ -5,7 +5,6 @@ use std::sync::{Arc, RwLock}; use std::{fs::DirEntry, str::FromStr}; use hemtt_common::config::AddonConfig; -use hemtt_common::error::thiserror; use hemtt_common::prefix::{Prefix, FILES}; use hemtt_common::version::Version; use tracing::{trace, warn}; diff --git a/libs/workspace/src/error.rs b/libs/workspace/src/error.rs index a2744cbe2..e83781435 100644 --- a/libs/workspace/src/error.rs +++ b/libs/workspace/src/error.rs @@ -1,5 +1,3 @@ -use hemtt_common::error::thiserror; - #[derive(Debug, thiserror::Error)] /// Errors that can occur while parsing a version pub enum Error {