-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating icu_experimental
crate
#4564
Conversation
@@ -24,13 +24,15 @@ use zerovec::{VarZeroVec, ZeroVec}; | |||
/// </div> | |||
pub struct Baked; | |||
|
|||
include!("../../../provider/datagen/tests/data/baked/macros.rs"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made this use the stub data until we can move it into experimental. It's singleton anyway.
@@ -45,7 +45,6 @@ buffer_provider = [ | |||
"icu_collator?/serde", | |||
"icu_datetime?/serde", | |||
"icu_decimal?/serde", | |||
"icu_displaynames?/serde", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disabled displaynames FFI for now. We have to decide between pulling in all of experimental or not having it on FFI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should still take part in DCE and I wouldn't want to forbid a component from having FFI only because it is in icu_experimental.
Also, we said that moving the code from icu_experimental into its own crate should be a no-op PR that puts the repo into a releasable state with the crate at stable, and we can't do that if we then need to add FFI bindings. We should start drafting the FFI bindings while the code is in icu_experimental.
I lean toward including it in icu_capi
and probably also in icu::experimental
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to include it in icu_capi
, but behind a experimental_components
features (like in datagen), instead of one feature per module.
Regarding icu
, I like the property that a module is either in icu
or in icu_experimental
, and that stabilisation moves it over. I also see value in removing the experimental
feature from icu
, we have too many features.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I retract what I said about icu::experimental
. I think we should include it in icu_capi
.
icu_displaynames = { workspace = true, features = ["datagen"], optional = true } | ||
icu_relativetime = { workspace = true, features = ["datagen"], optional = true } | ||
icu_transliterate = { workspace = true, features = ["datagen"], optional = true } | ||
icu_unitsconversion = { workspace = true, features = ["datagen"], optional = true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The repo becomes releasable with this PR
3f187a0
to
d5c1c5f
Compare
d5c1c5f
to
c0a15fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Praise: Nice work keeping the diffs to a nice reviewable state
"experimental/unitsconversion", | ||
"experimental/components", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or components/experimental? 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Soooo my thinking here is to move everything from components to the top level, and also move icu_experimental to the top level. It makes for a nicer GitHub page where our core crates are all listed out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not move things other than experimental components without first discussing with the team. I think we should land this PR and we can always move around the experimental components again later. experimental/components
seems approximately as reasonable as components/experimental
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes this wasn't thinking for this pr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Soooo my thinking here is to move everything from components to the top level, and also move icu_experimental to the top level. It makes for a nicer GitHub page where our core crates are all listed out.
Hmm. I don't know if I'm a huge fan of this, I like the split we have right now.
docs/tutorials/.cargo/config.toml
Outdated
icu_relativetime = { path = "../../experimental/relativetime" } | ||
icu_transliterate = { path = "../../experimental/transliterate" } | ||
icu_unicodeset_parse = { path = "../../experimental/unicodeset_parse" } | ||
icu_experimental = { path = "../../experimental/experimental" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: did you need to manually update this file or was it auto-generated? Is there something that enforces this file being up to date?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manual. There's a comment on the top level Cargo toml that "enforces" this. Tutorials ci also breaks if you move or delete crates, however not if you add
[dev-dependencies] | ||
icu_locid = { path = "../../components/locid" } | ||
|
||
[features] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: should we make each module in icu_experimental be feature-gated?
pub mod transliterate; | ||
pub mod unicodeset_parse; | ||
|
||
#[doc(hidden)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: We don't normally put the provider module in doc(hidden), though we could consider making them internal when we implement #4467
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well we have n provider modules in this crate, but Baked
needs to be in crate::provider
because the constructor macro expects that. We can reexport Baked
in foo::provider to have it public?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine for crate::provider
to behave as it normally does with baked data, and for the data structs to be defined in crate::foo::provider
.
@@ -45,7 +45,6 @@ buffer_provider = [ | |||
"icu_collator?/serde", | |||
"icu_datetime?/serde", | |||
"icu_decimal?/serde", | |||
"icu_displaynames?/serde", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I retract what I said about icu::experimental
. I think we should include it in icu_capi
.
autosubmit=true |
@@ -2,11 +2,11 @@ | |||
// called LICENSE at the top level of the ICU4X source tree | |||
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed that you are moving personnames; there is a big PR which has been open for some months which I'm perpetually halfway through reviewing. (It's also there if you want to review it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be a clean-enough move, and if it's been open for a few months it's not something I want to block on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm gonna merge this PR and then update the personnames PR (#4050)
# icu_experimental is not currently published | ||
# exec --fail-on-error cargo run --release --manifest-path experimental/Cargo.toml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tracking issue to re-enable this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The website one, when we don't require the same test to work against release and head?
Part of #4551
This contains compactdecimal, displaynames, relativetime, dimension, transliterate, and unicodeset_builder.
unitsconversion can be done once there are no outstanding PRs.