Skip to content

Commit

Permalink
Be semver safe for icu_capi/test_provider (#3833)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian authored Aug 10, 2023
1 parent b18da77 commit c619df8
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 26 deletions.
2 changes: 1 addition & 1 deletion ffi/diplomat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ logging = ["icu_provider/logging", "dep:log"]
simple_logger = ["dep:simple_logger", "logging"]

# Legacy features
provider_test = []
provider_test = ["compiled_data"]
cpp_default = ["logging"]
wasm_default = ["logging"]

Expand Down
4 changes: 2 additions & 2 deletions ffi/diplomat/cpp/docs/source/locale_ffi.rst

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

4 changes: 2 additions & 2 deletions ffi/diplomat/cpp/docs/source/provider_ffi.rst

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

4 changes: 2 additions & 2 deletions ffi/diplomat/cpp/include/ICU4XDataProvider.hpp

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

4 changes: 2 additions & 2 deletions ffi/diplomat/cpp/include/ICU4XLocale.hpp

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

4 changes: 2 additions & 2 deletions ffi/diplomat/js/docs/source/locale_ffi.rst

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

4 changes: 2 additions & 2 deletions ffi/diplomat/js/docs/source/provider_ffi.rst

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

4 changes: 2 additions & 2 deletions ffi/diplomat/js/include/ICU4XDataProvider.d.ts

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

4 changes: 2 additions & 2 deletions ffi/diplomat/js/include/ICU4XLocale.d.ts

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

2 changes: 0 additions & 2 deletions ffi/diplomat/src/datetime_formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ pub mod ffi {
#[diplomat::opaque]
/// An ICU4X TimeFormatter object capable of formatting an [`ICU4XTime`] type (and others) as a string
#[diplomat::rust_link(icu::datetime::TimeFormatter, Struct)]
// TODO(#2153) - Rename to ICU4XTimeFormatter when we remove the dependency on calendar
// from TimeFormatter.
pub struct ICU4XTimeFormatter(pub TimeFormatter);

#[diplomat::enum_convert(length::Time, needs_wildcard)]
Expand Down
8 changes: 4 additions & 4 deletions ffi/diplomat/src/locale.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,20 +185,20 @@ pub mod ffi {
self.0.strict_cmp(other).into()
}

/// Unconditionally panics.
/// Deprecated
///
/// Use `create_from_string("en").
#[cfg(feature = "provider_test")]
pub fn create_en() -> Box<ICU4XLocale> {
unimplemented!()
Box::new(ICU4XLocale(icu_locid::locale!("en")))
}

/// Unconditionally panics.
/// Deprecated
///
/// Use `create_from_string("bn").
#[cfg(feature = "provider_test")]
pub fn create_bn() -> Box<ICU4XLocale> {
unimplemented!()
Box::new(ICU4XLocale(icu_locid::locale!("bn")))
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions ffi/diplomat/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ pub mod ffi {
)))
}

/// Unconditionally panics.
/// Deprecated
///
/// It used to provide a test data provider, but has been superseded by `create_compiled`.
/// Use `create_compiled()`.
#[cfg(all(
feature = "provider_test",
any(feature = "any_provider", feature = "buffer_provider")
))]
pub fn create_test() -> Box<ICU4XDataProvider> {
unimplemented!()
Self::create_compiled()
}

/// Constructs a `BlobDataProvider` and returns it as an [`ICU4XDataProvider`].
Expand Down

0 comments on commit c619df8

Please sign in to comment.