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]
|
[dev-dependencies]
|
||||||
rand = "0.8.0"
|
rand = "0.8.0"
|
||||||
rand_chacha = "0.3.1"
|
rand_chacha = "0.3.1"
|
||||||
ron = "0.8.0"
|
ron = "0.10"
|
||||||
flate2 = "1.0"
|
flate2 = "1.0"
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
serde_json = "1.0.140"
|
serde_json = "1.0.140"
|
||||||
|
|||||||
@ -32,7 +32,7 @@ bevy_platform = { path = "../bevy_platform", version = "0.16.0-dev", default-fea
|
|||||||
|
|
||||||
# other
|
# other
|
||||||
petgraph = { version = "0.7", features = ["serde-1"] }
|
petgraph = { version = "0.7", features = ["serde-1"] }
|
||||||
ron = "0.8"
|
ron = "0.10"
|
||||||
serde = "1"
|
serde = "1"
|
||||||
blake3 = { version = "1.0" }
|
blake3 = { version = "1.0" }
|
||||||
downcast-rs = { version = "2", default-features = false, features = ["std"] }
|
downcast-rs = { version = "2", default-features = false, features = ["std"] }
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
//! The animation graph, which allows animations to be blended together.
|
//! The animation graph, which allows animations to be blended together.
|
||||||
|
|
||||||
use core::{
|
use core::{
|
||||||
|
fmt::Write,
|
||||||
iter,
|
iter,
|
||||||
ops::{Index, IndexMut, Range},
|
ops::{Index, IndexMut, Range},
|
||||||
};
|
};
|
||||||
use std::io::{self, Write};
|
use std::io;
|
||||||
|
|
||||||
use bevy_asset::{
|
use bevy_asset::{
|
||||||
io::Reader, Asset, AssetEvent, AssetId, AssetLoader, AssetPath, Assets, Handle, LoadContext,
|
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",
|
"arc_lock",
|
||||||
"send_guard",
|
"send_guard",
|
||||||
] }
|
] }
|
||||||
ron = { version = "0.8", default-features = false }
|
ron = { version = "0.10", default-features = false }
|
||||||
serde = { version = "1", default-features = false, features = ["derive"] }
|
serde = { version = "1", default-features = false, features = ["derive"] }
|
||||||
thiserror = { version = "2", default-features = false }
|
thiserror = { version = "2", default-features = false }
|
||||||
derive_more = { version = "1", default-features = false, features = ["from"] }
|
derive_more = { version = "1", default-features = false, features = ["from"] }
|
||||||
|
|||||||
@ -31,7 +31,7 @@ bevy_state = { path = "../bevy_state", version = "0.16.0-dev" }
|
|||||||
|
|
||||||
# other
|
# other
|
||||||
serde = { version = "1.0", features = ["derive"], optional = true }
|
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"] }
|
tracing = { version = "0.1", default-features = false, features = ["std"] }
|
||||||
|
|
||||||
[lints]
|
[lints]
|
||||||
|
|||||||
@ -114,7 +114,7 @@ wgpu-types = { version = "24", features = [
|
|||||||
], optional = true, default-features = false }
|
], optional = true, default-features = false }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
ron = "0.8.0"
|
ron = "0.10"
|
||||||
rmp-serde = "1.1"
|
rmp-serde = "1.1"
|
||||||
bincode = { version = "2.0", features = ["serde"] }
|
bincode = { version = "2.0", features = ["serde"] }
|
||||||
serde_json = "1.0.140"
|
serde_json = "1.0.140"
|
||||||
|
|||||||
@ -112,15 +112,15 @@ use crate::{PartialReflect, TypeRegistry};
|
|||||||
/// }
|
/// }
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// fn save(type_registry: &TypeRegistry, asset: &MyAsset) -> Result<Vec<u8>, AssetError> {
|
/// fn save(type_registry: &TypeRegistry, asset: &MyAsset) -> Result<String, AssetError> {
|
||||||
/// let mut asset_bytes = Vec::new();
|
/// let mut asset_string = String::new();
|
||||||
///
|
///
|
||||||
/// let processor = HandleProcessor;
|
/// let processor = HandleProcessor;
|
||||||
/// let serializer = ReflectSerializer::with_processor(asset, type_registry, &processor);
|
/// 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)?;
|
/// serializer.serialize(&mut ron_serializer)?;
|
||||||
/// Ok(asset_bytes)
|
/// Ok(asset_string)
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
|
|||||||
@ -180,17 +180,19 @@ fn setup_assets_programmatically(
|
|||||||
|
|
||||||
IoTaskPool::get()
|
IoTaskPool::get()
|
||||||
.spawn(async move {
|
.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(
|
let mut animation_graph_writer = File::create(Path::join(
|
||||||
&FileAssetReader::get_base_path(),
|
&FileAssetReader::get_base_path(),
|
||||||
Path::join(Path::new("assets"), Path::new(ANIMATION_GRAPH_PATH)),
|
Path::join(Path::new("assets"), Path::new(ANIMATION_GRAPH_PATH)),
|
||||||
))
|
))
|
||||||
.expect("Failed to open the animation graph asset");
|
.expect("Failed to open the animation graph asset");
|
||||||
ron::ser::to_writer_pretty(
|
animation_graph_writer
|
||||||
&mut animation_graph_writer,
|
.write_all(serialized_graph.as_bytes())
|
||||||
&animation_graph,
|
.expect("Failed to write the animation graph");
|
||||||
PrettyConfig::default(),
|
|
||||||
)
|
|
||||||
.expect("Failed to serialize the animation graph");
|
|
||||||
})
|
})
|
||||||
.detach();
|
.detach();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
xshell = "0.2"
|
xshell = "0.2"
|
||||||
clap = { version = "4.0", features = ["derive"] }
|
clap = { version = "4.0", features = ["derive"] }
|
||||||
ron = "0.8"
|
ron = "0.10"
|
||||||
toml_edit = { version = "0.22.7", default-features = false, features = [
|
toml_edit = { version = "0.22.7", default-features = false, features = [
|
||||||
"parse",
|
"parse",
|
||||||
] }
|
] }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user