Bump ron version to 0.10. (#19631)

# Objective

- Update ron to the latest version.
- This is blocking changes to AnimationGraph (as some valid structs are
not capable of being deserialized).

## Solution

- Bump ron!

## Testing

- The particular issue I was blocked by seems to be resolved!
This commit is contained in:
andriyDev 2025-06-13 12:54:31 -07:00 committed by GitHub
parent 2b0a05cbb8
commit f47b1c00ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 20 additions and 17 deletions

View File

@ -562,7 +562,7 @@ bevy_dylib = { path = "crates/bevy_dylib", version = "0.16.0-dev", default-featu
[dev-dependencies]
rand = "0.8.0"
rand_chacha = "0.3.1"
ron = "0.8.0"
ron = "0.10"
flate2 = "1.0"
serde = { version = "1", features = ["derive"] }
serde_json = "1.0.140"

View File

@ -32,7 +32,7 @@ bevy_platform = { path = "../bevy_platform", version = "0.16.0-dev", default-fea
# other
petgraph = { version = "0.7", features = ["serde-1"] }
ron = "0.8"
ron = "0.10"
serde = "1"
blake3 = { version = "1.0" }
downcast-rs = { version = "2", default-features = false, features = ["std"] }

View File

@ -1,10 +1,11 @@
//! The animation graph, which allows animations to be blended together.
use core::{
fmt::Write,
iter,
ops::{Index, IndexMut, Range},
};
use std::io::{self, Write};
use std::io;
use bevy_asset::{
io::Reader, Asset, AssetEvent, AssetId, AssetLoader, AssetPath, Assets, Handle, LoadContext,

View File

@ -54,7 +54,7 @@ parking_lot = { version = "0.12", default-features = false, features = [
"arc_lock",
"send_guard",
] }
ron = { version = "0.8", default-features = false }
ron = { version = "0.10", default-features = false }
serde = { version = "1", default-features = false, features = ["derive"] }
thiserror = { version = "2", default-features = false }
derive_more = { version = "1", default-features = false, features = ["from"] }

View File

@ -31,7 +31,7 @@ bevy_state = { path = "../bevy_state", version = "0.16.0-dev" }
# other
serde = { version = "1.0", features = ["derive"], optional = true }
ron = { version = "0.8.0", optional = true }
ron = { version = "0.10", optional = true }
tracing = { version = "0.1", default-features = false, features = ["std"] }
[lints]

View File

@ -114,7 +114,7 @@ wgpu-types = { version = "24", features = [
], optional = true, default-features = false }
[dev-dependencies]
ron = "0.8.0"
ron = "0.10"
rmp-serde = "1.1"
bincode = { version = "2.0", features = ["serde"] }
serde_json = "1.0.140"

View File

@ -112,15 +112,15 @@ use crate::{PartialReflect, TypeRegistry};
/// }
/// }
///
/// fn save(type_registry: &TypeRegistry, asset: &MyAsset) -> Result<Vec<u8>, AssetError> {
/// let mut asset_bytes = Vec::new();
/// fn save(type_registry: &TypeRegistry, asset: &MyAsset) -> Result<String, AssetError> {
/// let mut asset_string = String::new();
///
/// let processor = HandleProcessor;
/// let serializer = ReflectSerializer::with_processor(asset, type_registry, &processor);
/// let mut ron_serializer = ron::Serializer::new(&mut asset_bytes, None)?;
/// let mut ron_serializer = ron::Serializer::new(&mut asset_string, None)?;
///
/// serializer.serialize(&mut ron_serializer)?;
/// Ok(asset_bytes)
/// Ok(asset_string)
/// }
/// ```
///

View File

@ -180,17 +180,19 @@ fn setup_assets_programmatically(
IoTaskPool::get()
.spawn(async move {
use std::io::Write;
let serialized_graph =
ron::ser::to_string_pretty(&animation_graph, PrettyConfig::default())
.expect("Failed to serialize the animation graph");
let mut animation_graph_writer = File::create(Path::join(
&FileAssetReader::get_base_path(),
Path::join(Path::new("assets"), Path::new(ANIMATION_GRAPH_PATH)),
))
.expect("Failed to open the animation graph asset");
ron::ser::to_writer_pretty(
&mut animation_graph_writer,
&animation_graph,
PrettyConfig::default(),
)
.expect("Failed to serialize the animation graph");
animation_graph_writer
.write_all(serialized_graph.as_bytes())
.expect("Failed to write the animation graph");
})
.detach();
}

View File

@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
[dependencies]
xshell = "0.2"
clap = { version = "4.0", features = ["derive"] }
ron = "0.8"
ron = "0.10"
toml_edit = { version = "0.22.7", default-features = false, features = [
"parse",
] }