Skip to content

Commit

Permalink
Merge branch 'main' into x-
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian committed Jun 13, 2024
2 parents fff0e9d + 8f9bda4 commit c768a83
Show file tree
Hide file tree
Showing 137 changed files with 1,263 additions and 1,450 deletions.
51 changes: 29 additions & 22 deletions Cargo.lock

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

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ members = [
"provider/datagen",
"provider/fs",
"provider/registry",
"provider/icu4x-datagen",

# Baked data
"provider/data/calendar",
Expand Down Expand Up @@ -89,13 +90,14 @@ members = [
"tools/ffi_coverage",
"tools/testdata-scripts",
"tools/md-tests",
"tools/graveyard",
]
# Note: Workspaces in subdirectories, such as tutorials/crates, are
# implicitly excluded from the main workspace.
exclude = [
# Tutorials are tested outside the workspace to simulate external users
"tutorials",
# Don't publish the graveyard
"tools/graveyard"
]

[workspace.package]
Expand Down
2 changes: 1 addition & 1 deletion components/datetime/tests/data/gen.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
cargo run -p icu_datagen -- \
cargo run -p icu4x-datagen -- \
--markers "datetime/gregory/datelengths@1" "datetime/gregory/datesymbols@1" "datetime/timelengths@1" "datetime/timesymbols@1" "decimal/symbols@1" "time_zone/formats@1" "time_zone/specific_short@1" \
--locales en \
--format blob2 \
Expand Down
2 changes: 1 addition & 1 deletion components/experimental/tests/transliterate/data/gen.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
cargo run -p icu_datagen --features experimental_components -- \
cargo run -p icu4x-datagen --features experimental_components -- \
--markers "transliterator/rules@1" \
--locales full \
--runtime-fallback-location external \
Expand Down
15 changes: 15 additions & 0 deletions components/icu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,21 @@ compiled_data = [
"icu_timezone/compiled_data",
"icu_experimental?/compiled_data",
]
datagen = [
"icu_calendar/datagen",
"icu_casemap/datagen",
"icu_collator/datagen",
"icu_datetime/datagen",
"icu_decimal/datagen",
"icu_list/datagen",
"icu_locale/datagen",
"icu_normalizer/datagen",
"icu_plurals/datagen",
"icu_properties/datagen",
"icu_segmenter/datagen",
"icu_timezone/datagen",
"icu_experimental?/datagen",
]
serde_human = [
"icu_list/serde_human"
]
Expand Down
8 changes: 8 additions & 0 deletions components/locale_core/src/langid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@ impl LanguageIdentifier {
variants: subtags::Variants::new(),
};

/// Whether this language identifier equals [`Self::UND`].
pub const fn is_empty(&self) -> bool {
self.language.is_empty()
&& self.script.is_none()
&& self.region.is_none()
&& self.variants.is_empty()
}

/// This is a best-effort operation that performs all available levels of canonicalization.
///
/// At the moment the operation will normalize casing and the separator, but in the future
Expand Down
2 changes: 1 addition & 1 deletion components/locale_core/src/shortvec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ impl<T> ShortBoxSlice<T> {

/// Returns whether the collection is empty.
#[inline]
pub fn is_empty(&self) -> bool {
pub const fn is_empty(&self) -> bool {
use ShortBoxSliceInner::*;
matches!(self.0, ZeroOne(None))
}
Expand Down
4 changes: 2 additions & 2 deletions components/locale_core/src/subtags/language.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ impl Language {
/// assert!(lang.is_empty());
/// ```
#[inline]
pub fn is_empty(self) -> bool {
self == Self::UND
pub const fn is_empty(self) -> bool {
matches!(self, Self::UND)
}
}

Expand Down
5 changes: 5 additions & 0 deletions components/locale_core/src/subtags/variants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ impl Variants {
core::mem::take(self)
}

/// Whether the list of variants is empty.
pub const fn is_empty(&self) -> bool {
self.0.is_empty()
}

pub(crate) fn for_each_subtag_str<E, F>(&self, f: &mut F) -> Result<(), E>
where
F: FnMut(&str) -> Result<(), E>,
Expand Down
7 changes: 4 additions & 3 deletions documents/process/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This is a checklist of things that should be done in the weeks leading to the re
* [ ] Go through `ffi/capi/tests/missing_apis.txt` and verify that it is empty. If it is not, component owners should either add FFI APIs, add `rust_link` annotations, or allowlist the relevant APIs as having been punted to the future
* [ ] Verify that `ffi/capi` depends on a released (not Git) version of Diplomat. Get it published (ask manishearth or sffc) otherwise.
* [ ] Get all contributors to complete the changelog (see below)
* [ ] Draft the text for the GitHub release. This text will be sent to GitHub subscribers and can also be used for the mailing list email.
* [ ] Draft the text for the GitHub release. This text will be sent to GitHub subscribers and can also be used for the mailing list email and blog post.
* [ ] Prepare a PR to update tutorials using the upcoming release. The PR should pass `cargo make test-tutorials-local`, but can fail `cargo make test-tutorials-cratesio` prior to release

## Release steps
Expand All @@ -51,8 +51,9 @@ Once the release checklist is complete, the assigned release driver will perform
* [Tag the Release](https://github.com/unicode-org/icu4x/releases) with the text drafted above
* Create a branch named `release/x.y` on the release tag and push it to the upstream
* Announce the release to public
* Send an email to [icu4x-announce](https://groups.google.com/u/0/a/unicode.org/g/icu4x-announce)
* Submit to This Week In Rust
* (All releases) Send an email to [icu4x-announce](https://groups.google.com/u/0/a/unicode.org/g/icu4x-announce)
* (All releases) Blog post on Unicode blog
* (Major releases only) Submit to This Week In Rust
* Keep the main branch relatively stable for 7-14 days following the release to make things easier in case a patch release is needed.
* It's okay to land smaller or incremental changes, but avoid breaking changes during this period.

Expand Down
22 changes: 9 additions & 13 deletions ffi/capi/bindings/c/ICU4XDataError.d.h

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

3 changes: 1 addition & 2 deletions ffi/capi/bindings/c/ICU4XDataStruct.h

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

4 changes: 0 additions & 4 deletions ffi/capi/bindings/c/ICU4XError.d.h

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

This file was deleted.

22 changes: 9 additions & 13 deletions ffi/capi/bindings/cpp/ICU4XDataError.d.h

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

22 changes: 9 additions & 13 deletions ffi/capi/bindings/cpp/ICU4XDataError.d.hpp

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

6 changes: 1 addition & 5 deletions ffi/capi/bindings/cpp/ICU4XDataError.hpp

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

Loading

0 comments on commit c768a83

Please sign in to comment.