summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-02-24 12:32:51 +0800
committer魏曹先生 <1992414357@qq.com>2026-02-24 12:32:51 +0800
commit554cd69f91bb98eef9033531d9b1c3daee305c53 (patch)
tree19f3a6b9f63f4db7c1eb31f2213293953dde34dc
parentfbf4054ea8e11bae65196b7069c56375ca4e79b9 (diff)
Add deprecated feature and migrate string_proc to just_fmt
- Add `deprecated` feature flag to Cargo.toml - Gate `string_proc` module behind both `deprecated` and `string_proc` features - Replace internal `string_proc` dependency with `just_fmt` crate in constants macros - Mark all `string_proc` modules as deprecated with migration instructions - Remove `string_proc` dependency from sheet system
-rw-r--r--Cargo.toml1
-rw-r--r--src/lib.rs2
-rw-r--r--systems/_asset/src/asset.rs2
-rw-r--r--systems/_constants/macros/Cargo.toml3
-rw-r--r--systems/_constants/macros/src/lib.rs2
-rw-r--r--systems/sheet/Cargo.toml1
-rw-r--r--utils/string_proc/src/lib.rs11
7 files changed, 16 insertions, 6 deletions
diff --git a/Cargo.toml b/Cargo.toml
index ab2e5eb..d2d44d5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,6 +22,7 @@ sha1_hash = []
tcp_connection = []
string_proc = []
lib = []
+deprecated = []
[workspace]
members = [
diff --git a/src/lib.rs b/src/lib.rs
index a01e5e4..306441b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -63,7 +63,7 @@ pub mod utils {
}
// Feature `string_proc`
- #[cfg(feature = "string_proc")]
+ #[cfg(all(feature = "deprecated", feature = "string_proc"))]
pub mod string_proc {
extern crate string_proc;
pub use string_proc::*;
diff --git a/systems/_asset/src/asset.rs b/systems/_asset/src/asset.rs
index a3b1c6a..cdcae3c 100644
--- a/systems/_asset/src/asset.rs
+++ b/systems/_asset/src/asset.rs
@@ -384,7 +384,7 @@ async fn check_handle_is_cross_directory(
fn check_path(file_name: &OsStr) -> Result<Cow<'_, str>, PrecheckFailed> {
let file_name_str = file_name.to_string_lossy();
-
+
// When operating on a TEMP_FILE or LOCK_FILE,
// names like `~~foo.txt` or `.tmp_.tmp_foo.txt` would be generated
// This is not expected and should result in an error
diff --git a/systems/_constants/macros/Cargo.toml b/systems/_constants/macros/Cargo.toml
index 2aec6bc..1b1012b 100644
--- a/systems/_constants/macros/Cargo.toml
+++ b/systems/_constants/macros/Cargo.toml
@@ -11,5 +11,4 @@ syn = { version = "2.0", features = ["full", "extra-traits"] }
quote = "1.0"
proc-macro2 = "1.0"
regex = "1.12"
-
-string_proc = { path = "../../../utils/string_proc" }
+just_fmt = "0.1"
diff --git a/systems/_constants/macros/src/lib.rs b/systems/_constants/macros/src/lib.rs
index f6cf945..2d3f255 100644
--- a/systems/_constants/macros/src/lib.rs
+++ b/systems/_constants/macros/src/lib.rs
@@ -1,6 +1,6 @@
+use just_fmt::pascal_case;
use proc_macro::TokenStream;
use quote::quote;
-use string_proc::pascal_case;
use syn::{Expr, ExprLit, Ident, Item, ItemMod, Lit, LitStr, parse_macro_input};
#[proc_macro_attribute]
diff --git a/systems/sheet/Cargo.toml b/systems/sheet/Cargo.toml
index 5c53c36..99cc7c7 100644
--- a/systems/sheet/Cargo.toml
+++ b/systems/sheet/Cargo.toml
@@ -5,5 +5,4 @@ version.workspace = true
[dependencies]
sheet_system_macros = { path = "macros" }
-string_proc = { path = "../../utils/string_proc" }
asset_system = { path = "../_asset" }
diff --git a/utils/string_proc/src/lib.rs b/utils/string_proc/src/lib.rs
index a5b2040..d019003 100644
--- a/utils/string_proc/src/lib.rs
+++ b/utils/string_proc/src/lib.rs
@@ -1,4 +1,15 @@
+#[deprecated = "The module has been migrated to crates.io, please migrate to `just_fmt = \"0.1\"`"]
+#[allow(deprecated)]
pub mod format_path;
+
+#[deprecated = "The module has been migrated to crates.io, please migrate to `just_fmt = \"0.1\"`"]
+#[allow(deprecated)]
pub mod format_processer;
+
+#[deprecated = "The module has been migrated to crates.io, please migrate to `just_fmt = \"0.1\"`"]
+#[allow(deprecated)]
pub mod macros;
+
+#[deprecated = "The module has been migrated to crates.io, please migrate to `just_fmt = \"0.1\"`"]
+#[allow(deprecated)]
pub mod simple_processer;