Track Fluent files using `include!`
Dependencies
- [2]
3NMKD6I5Refactor `Localize` trait to use `std::io::Write` - [*]
CESJ4CTOMove macro-specific code into `macro_impl` module
Change contents
- edit in fluent_embed_derive/src/macro_impl/mod.rs at line 26[4.646][4.646]
// Keep track of all the Fluent fileslet tracked_paths = locales.clone();let tracked_paths = tracked_paths.values().map(|path| path.to_string_lossy().to_string());let path_count = locales.len(); - edit in fluent_embed_derive/src/macro_impl/mod.rs at line 55[4.1507][2.211]
impl #ident {// Call the `include_str!` macro to make sure the Fluent files are tracked// so when Fluent code changes, the generated code should be rebuild// TODO: This is a hack that should be replaced with https://github.com/rust-lang/rust/issues/99515 once stableconst _tracked_paths: [&str; #path_count] = [#(include_str!(#tracked_paths)),*];}