From a6e2a23cc0b6ae2c0106823a72b713353b66c8fd Mon Sep 17 00:00:00 2001 From: extrawurst Date: Wed, 14 Jan 2026 13:58:21 -0500 Subject: [PATCH 1/2] bevy 0.18 migration --- Cargo.toml | 6 +++--- src/assets/bundle.rs | 8 ++++---- src/assets/resource.rs | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cf256f1..ca39bc7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ categories = [ exclude = [".github/**/*"] [dependencies] -bevy = { version = "0.17", default-features = false, features = [ +bevy = { version = "0.18", default-features = false, features = [ "bevy_asset", "bevy_log", ] } @@ -28,7 +28,7 @@ fluent_content = "0.0.5" futures-lite = "2.2.0" indexmap = { version = "2.2.5", features = ["serde"] } intl-memoizer = "0.5.1" -ron = "0.8.1" +ron = "0.12" serde = { version = "1.0.197", features = ["derive"] } serde_yaml = "0.9.32" thiserror = "1.0.58" @@ -37,5 +37,5 @@ unic-langid = { version = "0.9.4", features = ["serde"] } uuid = { version = "1.7.0", features = ["serde", "v4", "v5"] } [dev-dependencies] -bevy = "0.17" +bevy = "0.18" unic-langid = { version = "0.9.4", features = ["macros"] } diff --git a/src/assets/bundle.rs b/src/assets/bundle.rs index c8d7282..9a9bb50 100644 --- a/src/assets/bundle.rs +++ b/src/assets/bundle.rs @@ -29,7 +29,7 @@ impl Deref for BundleAsset { } /// [`AssetLoader`](bevy::asset::AssetLoader) implementation for [`BundleAsset`] -#[derive(Default)] +#[derive(Default, TypePath)] pub struct BundleAssetLoader; impl AssetLoader for BundleAssetLoader { @@ -43,7 +43,7 @@ impl AssetLoader for BundleAssetLoader { _: &Self::Settings, load_context: &mut LoadContext<'_>, ) -> Result { - let path = load_context.path(); + let path = load_context.path().path(); let mut content = String::new(); reader.read_to_string(&mut content).await?; match path.extension() { @@ -70,12 +70,12 @@ struct Data { resources: Vec, } -#[instrument(fields(path = %load_context.path().display()), skip_all)] +#[instrument(fields(path = %load_context.path().path().display()), skip_all)] async fn load(data: Data, load_context: &mut LoadContext<'_>) -> Result { let mut bundle = FluentBundle::new_concurrent(vec![data.locale.clone()]); for mut path in data.resources { if path.is_relative() { - if let Some(parent) = load_context.path().parent() { + if let Some(parent) = load_context.path().path().parent() { path = parent.join(path); } } diff --git a/src/assets/resource.rs b/src/assets/resource.rs index 328a751..faabb3a 100644 --- a/src/assets/resource.rs +++ b/src/assets/resource.rs @@ -24,7 +24,7 @@ impl Deref for ResourceAsset { /// [`AssetLoader`](bevy::asset::AssetLoader) implementation for /// [`ResourceAsset`] -#[derive(Default)] +#[derive(Default, TypePath)] pub struct ResourceAssetLoader; impl AssetLoader for ResourceAssetLoader { From 2e82b15e035dc78d2b72a3f40926c491d5b7c07f Mon Sep 17 00:00:00 2001 From: extrawurst Date: Wed, 14 Jan 2026 13:59:18 -0500 Subject: [PATCH 2/2] version bump --- Cargo.toml | 2 +- README.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ca39bc7..023950e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_fluent" -version = "0.13.0" +version = "0.14.0" authors = ["g "] edition = "2021" description = "Bevy plugin for localization using Fluent" diff --git a/README.md b/README.md index 6316412..ffcdd06 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ | bevy | bevy_fluent | | ---- | ----------- | +| 0.18 | 0.14 | | 0.17 | 0.13 | | 0.16 | 0.12 | | 0.15 | 0.11 |