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:
parent
2b0a05cbb8
commit
f47b1c00ee
@ -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"
|
||||
|
@ -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"] }
|
||||
|
@ -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,
|
||||
|
@ -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"] }
|
||||
|
@ -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]
|
||||
|
@ -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"
|
||||
|
@ -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)
|
||||
/// }
|
||||
/// ```
|
||||
///
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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",
|
||||
] }
|
||||
|
Loading…
Reference in New Issue
Block a user