Open younies opened 1 month ago
Related issue: https://github.com/unicode-org/icu4x/issues/5336
icu_calendar
and icu_timezone
and fixed_decimal
. Not clear if it is a component or a utility.icu_units
and icu_dimension
. https://docs.google.com/document/d/1AftqfMIFjgQAKpIfO8pmYMZW-KIOBtYkVHZuwgYcfsw/editicu_units
would contain both the units conversion and the units structs. So we should first decide whether we want to split these crates.A few ways we could split these crates:
icu_units
(core data types), icu_units_conversion
(conversion)icu_units
(conversion and re-exports), icu_units_core
(core data types). Could be extended to also split out icu_units_conversion
icu_foo
(core data types) and icu_bar
(conversion)icu_units
(re-exports), icu_units_parser
(core data types), icu_units_conversion
(conversion)Discussion:
icu_measure
(core data types) and icu_units
(conversion)... which is a little confusingicu_locale
.icu_measure
crate. I'd like to finish doing that and fix it up to the agreement later.icu_units_core
vs. icu_measure
is basically the same.icu_units_core
, do I also need to graduate the conversion?icu_units_representation
instead of icu_units_core
?icu_units_core
is best because it is consistent with icu_locale_core
which the module structure is modeled after.Proposal:
icu_measure
and then rename it to icu_units_bikeshed
after we decide the name.icu_units_bikeshed
can be graduated independently from icu_units
LGTM: @younies @echeran @sffc
Based on the ballot, the winning crate name is: icu_units_core
Task
Refactor the codebase by moving the
MeasureUnit
functionality into a dedicated crate.Background
The
MeasureUnit
module is responsible for representing single or compound CLDR units (e.g.,meter
,square-meter
,kilometer-per-second
). This module is essential for various components, including unit formatting, unit conversion, and locale-aware unit representation.To improve modularity and reusability across the project, it is necessary to isolate
MeasureUnit
into its own crate. This will facilitate better code organization and allow independent development and maintenance of unit-related functionalities.