Skip to content

Commit

Permalink
dep cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian committed Apr 27, 2022
1 parent 2a904c1 commit 14a32cc
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 25 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 14 additions & 10 deletions provider/datagen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,31 @@ skip_optional_dependencies = true
all-features = true

[dependencies]
displaydoc = { version = "0.2.3", default-features = false }
elsa = "1.7"

# ICU components
icu_calendar = { version = "0.5", path = "../../components/calendar", features = ["datagen"] }
icu_codepointtrie = { version = "0.3.3", path = "../../utils/codepointtrie", features = ["serde_serialize"] }
icu_datetime = { version = "0.5", path = "../../components/datetime", features = ["datagen"] }
icu_decimal = { version = "0.5", path = "../../components/decimal", features = ["datagen"] }
icu_list = { version = "0.5", path = "../../components/list", features = ["datagen"]}
icu_locale_canonicalizer = { version = "0.5", path = "../../components/locale_canonicalizer", features = ["datagen"] }
icu_locid = { version = "0.5", path = "../../components/locid", features = ["std"]}
icu_plurals = { version = "0.5", path = "../../components/plurals", features = ["datagen"] }
icu_properties = { version = "0.5", path = "../../components/properties", features = ["std", "datagen"]}
icu_properties = { version = "0.5", path = "../../components/properties", features = ["datagen"]}
# (experimental)
icu_casemapping = { version = "0.1", path = "../../experimental/casemapping", features = ["datagen"], optional = true }
icu_segmenter = { version = "0.1", path = "../../experimental/segmenter", features = ["datagen"], optional = true }

# ICU provider infrastructure
icu_provider = { version = "0.5", path = "../core", features = ["std", "log_error_context"]}
icu_provider_adapters = { path = "../adapters", features = ["datagen"] }
icu_provider_blob = { version = "0.5", path = "../blob", features = ["export"] }
icu_provider_fs = { version = "0.5", path = "../fs", features = ["export"] }
icu_testdata = { version = "0.5", path = "../testdata", features = ["metadata"] }

# Other
displaydoc = { version = "0.2.3", default-features = false }
elsa = "1.7"
icu_codepointtrie = { version = "0.3.3", path = "../../utils/codepointtrie", features = ["serde_serialize"] }
icu_locid = { version = "0.5", path = "../../components/locid", features = ["std"]}
icu_uniset = { version = "0.4.1", path = "../../utils/uniset", features = ["serde"] }
itertools = "0.10"
litemap = { version = "0.3.0", path = "../../utils/litemap" }
Expand All @@ -56,15 +65,10 @@ rayon = "1.5"
serde = { version = "1.0", default-features = false, features = ["derive", "alloc"] }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
serde-aux = "2.1.1"
serde-tuple-vec-map = "1.0"
tinystr = { path = "../../utils/tinystr", version = "0.5.0", features = ["alloc", "serde", "zerovec"], default-features = false }
toml = "0.5"
zerovec = { version = "0.6", path = "../../utils/zerovec", features = ["serde_serialize", "yoke"] }

# Experimental crates
icu_casemapping = { version = "0.1", path = "../../experimental/casemapping", features = ["datagen"], optional = true }
icu_segmenter = { version = "0.1", path = "../../experimental/segmenter", features = ["datagen"], optional = true }

# Dependencies for "bin" feature
clap = { version = "2.33", optional = true }
eyre = { version = "0.6", optional = true }
Expand Down
21 changes: 11 additions & 10 deletions provider/datagen/src/transform/cldr/serde/aliases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use serde::Deserialize;
use tinystr::TinyAsciiStr;
use litemap::LiteMap;

#[derive(PartialEq, Debug, Deserialize)]
pub struct Replacement<T> {
Expand All @@ -18,16 +19,16 @@ pub struct Replacement<T> {

#[derive(PartialEq, Debug, Deserialize)]
pub struct Alias {
#[serde(with = "tuple_vec_map", rename = "languageAlias")]
pub language_aliases: Vec<(String, Replacement<String>)>,
#[serde(with = "tuple_vec_map", rename = "scriptAlias")]
pub script_aliases: Vec<(TinyAsciiStr<4>, Replacement<TinyAsciiStr<4>>)>,
#[serde(with = "tuple_vec_map", rename = "territoryAlias")]
pub region_aliases: Vec<(TinyAsciiStr<3>, Replacement<String>)>,
#[serde(with = "tuple_vec_map", rename = "variantAlias")]
pub variant_aliases: Vec<(TinyAsciiStr<8>, Replacement<TinyAsciiStr<8>>)>,
#[serde(with = "tuple_vec_map", rename = "subdivisionAlias")]
pub subdivision_aliases: Vec<(TinyAsciiStr<7>, Replacement<String>)>,
#[serde(rename = "languageAlias")]
pub language_aliases: LiteMap<String, Replacement<String>>,
#[serde(rename = "scriptAlias")]
pub script_aliases: LiteMap<TinyAsciiStr<4>, Replacement<TinyAsciiStr<4>>>,
#[serde(rename = "territoryAlias")]
pub region_aliases: LiteMap<TinyAsciiStr<3>, Replacement<String>>,
#[serde(rename = "variantAlias")]
pub variant_aliases: LiteMap<TinyAsciiStr<8>, Replacement<TinyAsciiStr<8>>>,
#[serde(rename = "subdivisionAlias")]
pub subdivision_aliases: LiteMap<TinyAsciiStr<7>, Replacement<String>>,
}

#[derive(PartialEq, Debug, Deserialize)]
Expand Down
5 changes: 3 additions & 2 deletions provider/datagen/src/transform/cldr/serde/likely_subtags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
use icu_locid::LanguageIdentifier;
use serde::Deserialize;
use litemap::LiteMap;

#[derive(PartialEq, Debug, Deserialize)]
pub struct Supplemental {
#[serde(with = "tuple_vec_map", rename = "likelySubtags")]
pub likely_subtags: Vec<(LanguageIdentifier, LanguageIdentifier)>,
#[serde(rename = "likelySubtags")]
pub likely_subtags: LiteMap<LanguageIdentifier, LanguageIdentifier>,
}

#[derive(PartialEq, Debug, Deserialize)]
Expand Down
3 changes: 1 addition & 2 deletions provider/datagen/src/transform/cldr/serde/numbers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use itertools::Itertools;
use litemap::LiteMap;
use serde::de::{Deserializer, Error, MapAccess, Unexpected, Visitor};
use serde::Deserialize;
use serde_aux::prelude::*;
use tinystr::TinyStr8;

#[derive(PartialEq, Debug, Deserialize)]
Expand Down Expand Up @@ -96,7 +95,7 @@ pub struct Numbers {
#[serde(rename = "defaultNumberingSystem")]
pub default_numbering_system: TinyStr8,
#[serde(rename = "minimumGroupingDigits")]
#[serde(deserialize_with = "deserialize_number_from_string")]
#[serde(deserialize_with = "serde_aux::prelude::deserialize_number_from_string")]
pub minimum_grouping_digits: u8,
#[serde(flatten)]
pub numsys_data: NumberingSystemData,
Expand Down

0 comments on commit 14a32cc

Please sign in to comment.