Skip to content

Commit 8d0a6f5

Browse files
committed
fix: serialize compile cache
1 parent 5796f43 commit 8d0a6f5

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

float-pigment-css-macro/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repository.workspace = true
1414
proc-macro = true
1515

1616
[features]
17-
skip_compare_cache = []
17+
serialize_compile_cache = []
1818

1919
[dependencies]
2020
proc-macro2 = "1.0"

float-pigment-css-macro/src/compatibility_check.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fn file_creator(
3636

3737
fn folder_checker() {
3838
// check folder
39-
if !cfg!(feature = "skip_compare_cache") && !cfg!(debug_assertions) {
39+
if cfg!(feature = "serialize_compile_cache") {
4040
let mut path_buffer = PathBuf::new();
4141
path_buffer.push(std::env::var("CARGO_MANIFEST_DIR").unwrap());
4242
path_buffer.push(Path::new(CACHE_ROOT));
@@ -443,7 +443,7 @@ pub(crate) fn compare_enum_cache(
443443
}
444444
}
445445
}
446-
if !cfg!(feature = "skip_compare_cache") && !cfg!(debug_assertions) {
446+
if cfg!(feature = "serialize_compile_cache") {
447447
let next_cache_toml = toml::to_string(&next_cache).unwrap();
448448
let mut file = file_creator("enum", &enum_name, EXTENSION, true, true).unwrap();
449449
file.write_all(next_cache_toml.as_bytes())
@@ -547,7 +547,7 @@ pub(crate) fn compare_struct_cache(
547547
}
548548
}
549549
}
550-
if !cfg!(feature = "skip_compare_cache") && !cfg!(debug_assertions) {
550+
if cfg!(feature = "serialize_compile_cache") {
551551
let next_cache_toml = toml::to_string(&next_cache).unwrap();
552552
let mut file = file_creator("struct", &struct_name, EXTENSION, true, true).unwrap();
553553
file.write_all(next_cache_toml.as_bytes())

float-pigment-css/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ deserialize_json = []
4848
write_cache = []
4949
compatibility_test = []
5050
compile_cache = ["toml", "colorful"]
51-
skip_compare_cache = ["float-pigment-css-macro/skip_compare_cache"]
51+
serialize_compile_cache = ["float-pigment-css-macro/serialize_compile_cache"]
5252
ffi = []
5353

5454
[dependencies]

0 commit comments

Comments
 (0)