Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Never use fallback for baked segmentation data #4510

Merged
merged 3 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- `icu_datagen`
- Datagen shows elapsed time for keys that are slow to generate (https://github.com/unicode-org/icu4x/pull/4469)
- Datagen performance improvement by caching supported locales (https://github.com/unicode-org/icu4x/pull/4470)
- Never use fallback for baked segmentation data (https://github.com/unicode-org/icu4x/pull/4510)
- `icu_provider`
- (Small breakage) `DataPayload::new_owned()` is no longer `const`, this was a mistake (https://github.com/unicode-org/icu4x/pull/4456)
- `icu_provider_blob`
Expand All @@ -28,7 +29,7 @@
- Changed file extensions for better compatibility with nodejs modules (https://github.com/rust-diplomat/diplomat/pull/387)
- C++
- Fixed a bug where a result header defines a struct that shadows the class' name (https://github.com/rust-diplomat/diplomat/pull/394)
- Add `expclicit` keyword to internal constructors (https://github.com/rust-diplomat/diplomat/pull/386)
- Add `explicit` keyword to internal constructors (https://github.com/rust-diplomat/diplomat/pull/386)
- Utilities
- `calendrical_calculations`:
- Add Keviyah/Four Gates based optimized calculations module for the Hebrew calendar.
Expand Down
2 changes: 1 addition & 1 deletion provider/datagen/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ impl DatagenDriver {

let transform_duration = instant1.elapsed();

if fallback == FallbackMode::Runtime {
if fallback == FallbackMode::Runtime && !key.path().get().starts_with("segmenter") {
robertbastian marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional

Suggested change
if fallback == FallbackMode::Runtime && !key.path().get().starts_with("segmenter") {
if fallback == FallbackMode::Runtime && !key.path().get().starts_with("segmenter/") {

sink.flush_with_built_in_fallback(key, BuiltInFallbackMode::Standard)
} else {
sink.flush(key)
Expand Down
10 changes: 3 additions & 7 deletions tools/bakeddata-scripts/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,9 @@ fn main() {
)
.unwrap();
}

if component == "segmenter" {
// segmenter uses hardcoded locales internally, so fallback is not necessary.
driver.clone().with_fallback_mode(FallbackMode::Hybrid)
} else {
driver.clone()
}

driver
.clone()
.with_keys(keys.iter().copied())
.export(
&source,
Expand Down
Loading