Skip to content

Commit

Permalink
Move icu_pattern to components (#5625)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian authored Oct 1, 2024
1 parent 0006d90 commit 786b561
Show file tree
Hide file tree
Showing 24 changed files with 55 additions and 3 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ members = [
"components/list",
"components/locale",
"components/normalizer",
"components/pattern",
"components/plurals",
"components/properties",
"components/segmenter",
Expand Down Expand Up @@ -70,7 +71,6 @@ members = [
"utils/fixed_decimal",
"utils/ixdtf",
"utils/litemap",
"utils/pattern",
"utils/preferences",
"utils/resb",
"utils/env_preferences",
Expand Down Expand Up @@ -147,6 +147,7 @@ icu_experimental = { version = "~0.1.0", path = "components/experimental", defau
icu_list = { version = "~1.5.0", path = "components/list", default-features = false }
icu_locale = { version = "~1.5.0", path = "components/locale", default-features = false }
icu_normalizer = { version = "~1.5.0", path = "components/normalizer", default-features = false }
icu_pattern = { version = "0.2.0", path = "components/pattern", default-features = false }
icu_plurals = { version = "~1.5.0", path = "components/plurals", default-features = false }
icu_properties = { version = "~1.5.0", path = "components/properties", default-features = false }
icu_segmenter = { version = "~1.5.0", path = "components/segmenter", default-features = false }
Expand Down Expand Up @@ -191,7 +192,6 @@ databake = { version = "0.1.8", path = "utils/databake", default-features = fals
databake-derive = { version = "0.1.8", path = "utils/databake/derive", default-features = false }
deduplicating_array = { version = "0.1.6", path = "utils/deduplicating_array", default-features = false }
fixed_decimal = { version = "0.5.6", path = "utils/fixed_decimal", default-features = false }
icu_pattern = { version = "0.2.0", path = "utils/pattern", default-features = false }
ixdtf = { version = "0.2.0", path = "utils/ixdtf", default-features = false }
litemap = { version = "0.7.3", path = "utils/litemap", default-features = false }
tinystr = { version = "0.7.5", path = "utils/tinystr", default-features = false }
Expand Down
5 changes: 5 additions & 0 deletions components/icu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ icu_properties = { workspace = true }
icu_segmenter = { workspace = true }
icu_timezone = { workspace = true }
icu_experimental = { workspace = true, optional = true }
icu_pattern = { workspace = true, optional = true }

# For markers_from_bin
icu_provider_registry = { workspace = true, optional = true }
Expand Down Expand Up @@ -63,6 +64,7 @@ default = [
"icu_segmenter/default",
"icu_timezone/default",
"icu_experimental?/default",
"icu_pattern?/default",
]
std = [
"icu_calendar/std",
Expand All @@ -79,6 +81,7 @@ std = [
"icu_segmenter/std",
"icu_timezone/std",
"icu_experimental?/std",
"icu_pattern?/std",
]
serde = [
"icu_calendar/serde",
Expand All @@ -95,6 +98,7 @@ serde = [
"icu_segmenter/serde",
"icu_timezone/serde",
"icu_experimental?/serde",
"icu_pattern?/serde",
]
compiled_data = [
"icu_calendar/compiled_data",
Expand Down Expand Up @@ -142,6 +146,7 @@ experimental = [
"icu_datetime_experimental",
"icu_plurals_experimental",
"dep:icu_experimental",
"dep:icu_pattern",
]
sync = ["icu_provider/sync"]
logging = ["icu_provider/logging", "icu_datetime/logging"]
Expand Down
4 changes: 4 additions & 0 deletions components/icu/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ pub use icu_timezone as timezone;
#[cfg(feature = "experimental")]
pub use icu_experimental as experimental;

#[doc(inline)]
#[cfg(feature = "experimental")]
pub use icu_pattern as pattern;

#[cfg(feature = "datagen")]
mod datagen;
#[cfg(feature = "datagen")]
Expand Down
1 change: 1 addition & 0 deletions utils/pattern/Cargo.toml → components/pattern/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ serde_json = { workspace = true }
postcard = { workspace = true, features = ["use-std"] }

[features]
default = []
alloc = []
std = ["alloc"]
databake = ["dep:databake"]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
41 changes: 41 additions & 0 deletions ffi/capi/tests/missing_apis.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,47 @@ icu::normalizer::uts46::Uts46MapperBorrowed#Struct
icu::normalizer::uts46::Uts46MapperBorrowed::map_normalize#FnInStruct
icu::normalizer::uts46::Uts46MapperBorrowed::new#FnInStruct
icu::normalizer::uts46::Uts46MapperBorrowed::normalize_validate#FnInStruct
icu::pattern::DoublePlaceholder#Enum
icu::pattern::DoublePlaceholderKey#Enum
icu::pattern::DoublePlaceholderKey::from_str#FnInEnum
icu::pattern::DoublePlaceholderKey::value_for#FnInEnum
icu::pattern::DoublePlaceholderPattern#Typedef
icu::pattern::Error#Enum
icu::pattern::MissingNamedPlaceholderError#Struct
icu::pattern::MissingNamedPlaceholderError::write_to#FnInStruct
icu::pattern::MultiNamedPlaceholder#Enum
icu::pattern::MultiNamedPlaceholderKey#Struct
icu::pattern::MultiNamedPlaceholderKey::value_for#FnInStruct
icu::pattern::MultiNamedPlaceholderPattern#Typedef
icu::pattern::PATTERN_LITERAL_PART#Constant
icu::pattern::PATTERN_PLACEHOLDER_PART#Constant
icu::pattern::ParsedPatternItem#Enum
icu::pattern::Parser#Struct
icu::pattern::Parser::new#FnInStruct
icu::pattern::Parser::next#FnInStruct
icu::pattern::Parser::try_collect_into_vec#FnInStruct
icu::pattern::Parser::try_next#FnInStruct
icu::pattern::ParserError#Enum
icu::pattern::ParserOptions#Struct
icu::pattern::Pattern#Struct
icu::pattern::Pattern::interpolate#FnInStruct
icu::pattern::Pattern::interpolate_to_string#FnInStruct
icu::pattern::Pattern::iter#FnInStruct
icu::pattern::Pattern::try_from_items#FnInStruct
icu::pattern::Pattern::try_from_str#FnInStruct
icu::pattern::Pattern::try_interpolate#FnInStruct
icu::pattern::Pattern::try_interpolate_to_string#FnInStruct
icu::pattern::PatternError#Enum
icu::pattern::PatternItem#Enum
icu::pattern::PatternItemCow#Enum
icu::pattern::PatternString#Struct
icu::pattern::PlaceholderValueProvider::value_for#FnInTrait
icu::pattern::QuoteMode#Enum
icu::pattern::SinglePlaceholder#Enum
icu::pattern::SinglePlaceholderKey#Enum
icu::pattern::SinglePlaceholderKey::from_str#FnInEnum
icu::pattern::SinglePlaceholderKey::value_for#FnInEnum
icu::pattern::SinglePlaceholderPattern#Typedef
icu::plurals::PluralElements#Struct
icu::plurals::PluralElements::as_ref#FnInStruct
icu::plurals::PluralElements::explicit_one#FnInStruct
Expand Down
2 changes: 1 addition & 1 deletion tutorials/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ icu_experimental = { path = "../components/experimental" }
icu_list = { path = "../components/list" }
icu_locale = { path = "../components/locale" }
icu_normalizer = { path = "../components/normalizer" }
icu_pattern = { path = "../components/pattern" }
icu_plurals = { path = "../components/plurals" }
icu_properties = { path = "../components/properties" }
icu_segmenter = { path = "../components/segmenter" }
Expand Down Expand Up @@ -69,7 +70,6 @@ databake = { path = "../utils/databake" }
databake-derive = { path = "../utils/databake/derive" }
deduplicating_array = { path = "../utils/deduplicating_array" }
fixed_decimal = { path = "../utils/fixed_decimal" }
icu_pattern = { path = "../utils/pattern" }
ixdtf = { path = "../utils/ixdtf" }
litemap = { path = "../utils/litemap" }
tinystr = { path = "../utils/tinystr" }
Expand Down

0 comments on commit 786b561

Please sign in to comment.