From 3e99dd39996b87492e588ab216a91a8e1bbd45b5 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Mon, 19 Feb 2024 23:56:54 -0500 Subject: [PATCH] core: Use latest fluent-templates `master` for reproducible builds --- Cargo.lock | 43 ++++++++++++++++++++++++++++++++++++++++--- core/Cargo.toml | 2 +- core/src/i18n.rs | 4 ++-- deny.toml | 1 + 4 files changed, 44 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c33baeb17..5b5785ff8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1976,6 +1976,20 @@ dependencies = [ "unic-langid", ] +[[package]] +name = "fluent-template-macros" +version = "0.8.0" +source = "git+https://github.com/XAMPPRocky/fluent-templates?rev=4ed6eebae897c19c4bc7e80800f54d7b8e65a9cf#4ed6eebae897c19c4bc7e80800f54d7b8e65a9cf" +dependencies = [ + "flume 0.10.14", + "ignore", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.51", + "unic-langid", +] + [[package]] name = "fluent-templates" version = "0.8.0" @@ -1987,7 +2001,30 @@ dependencies = [ "fluent-bundle", "fluent-langneg", "fluent-syntax", - "fluent-template-macros", + "fluent-template-macros 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "flume 0.10.14", + "heck", + "ignore", + "intl-memoizer", + "lazy_static", + "log", + "once_cell", + "serde_json", + "snafu", + "unic-langid", +] + +[[package]] +name = "fluent-templates" +version = "0.8.0" +source = "git+https://github.com/XAMPPRocky/fluent-templates?rev=4ed6eebae897c19c4bc7e80800f54d7b8e65a9cf#4ed6eebae897c19c4bc7e80800f54d7b8e65a9cf" +dependencies = [ + "arc-swap", + "fluent", + "fluent-bundle", + "fluent-langneg", + "fluent-syntax", + "fluent-template-macros 0.8.0 (git+https://github.com/XAMPPRocky/fluent-templates?rev=4ed6eebae897c19c4bc7e80800f54d7b8e65a9cf)", "flume 0.10.14", "heck", "ignore", @@ -4309,7 +4346,7 @@ dependencies = [ "enumset", "flash-lso", "flate2", - "fluent-templates", + "fluent-templates 0.8.0 (git+https://github.com/XAMPPRocky/fluent-templates?rev=4ed6eebae897c19c4bc7e80800f54d7b8e65a9cf)", "flv-rs", "fnv", "futures", @@ -4370,7 +4407,7 @@ dependencies = [ "egui-winit", "egui_extras", "embed-resource", - "fluent-templates", + "fluent-templates 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "fontdb", "futures", "futures-lite 2.2.0", diff --git a/core/Cargo.toml b/core/Cargo.toml index a5ea367b1..b387ef90d 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -53,7 +53,7 @@ clap = { version = "4.5.1", features = ["derive"], optional=true } realfft = "3.3.0" hashbrown = { version = "0.14.3", features = ["raw"] } scopeguard = "1.2.0" -fluent-templates = "0.8.0" +fluent-templates = { git = "https://github.com/XAMPPRocky/fluent-templates", rev = "4ed6eebae897c19c4bc7e80800f54d7b8e65a9cf" } egui = { workspace = true, optional = true } egui_extras = { version = "0.26.2", optional = true } png = { version = "0.17.13", optional = true } diff --git a/core/src/i18n.rs b/core/src/i18n.rs index ac9fce6f1..0bcc989e5 100644 --- a/core/src/i18n.rs +++ b/core/src/i18n.rs @@ -10,7 +10,7 @@ static_loader! { } pub fn core_text(language: &LanguageIdentifier, id: &str) -> String { - TEXTS.lookup(language, id).unwrap_or_else(|| { + TEXTS.try_lookup(language, id).unwrap_or_else(|| { tracing::error!("Unknown core text id '{id}'"); id.to_string() }) @@ -22,7 +22,7 @@ pub fn core_text_with_args>( args: &HashMap, ) -> String { TEXTS - .lookup_with_args(language, id, args) + .try_lookup_with_args(language, id, args) .unwrap_or_else(|| { tracing::error!("Unknown core text id '{id}'"); id.to_string() diff --git a/deny.toml b/deny.toml index daccccbf2..2ee80a9ca 100644 --- a/deny.toml +++ b/deny.toml @@ -71,4 +71,5 @@ unknown-git = "deny" # github.com organizations to allow git sources for github = [ "ruffle-rs", + "XAMPPRocky" # Remove once there's a new release of fluent-templates ]