Skip to content
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

Moving datagen options to export #3784

Merged
merged 5 commits into from
Aug 4, 2023
Merged

Conversation

robertbastian
Copy link
Member

This also necessarily moves the locale filtering from supported_locales into export, and resolves #3409.

Part of #3487.

Resolves most todos in #3640 (comment)

@Manishearth Manishearth removed their request for review August 4, 2023 15:40
@Manishearth
Copy link
Member

(letting shane review locale filtering, I can but I'm less familiar with the code)

sffc
sffc previously approved these changes Aug 4, 2023
Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Time for me to resolve conflicts on my side

@@ -42,12 +42,11 @@ use std::collections::HashSet;
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq, Default)]
pub struct Options {
/// The set of keys to generate. See [`icu_datagen::keys`],
/// [`icu_datagen::all_keys`], [`icu_datagen::key`] and [`icu_datagen::keys_from_bin`].
pub keys: HashSet<icu_provider::DataKey>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Observation (pre-existing issue): this means Options is not Copy, which means we won't benefit from non-exhaustive spread syntax once it becomes available.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The locales, segmentation_models, and collations fields are collections already.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Yeah, which is why my comment is "observation pre-existing")

We should probably discuss this choice especially before we ship this API

@sffc sffc merged commit 247021e into unicode-org:main Aug 4, 2023
@robertbastian robertbastian deleted the filter branch August 7, 2023 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Where should locale filtering take place in the data exporter?
3 participants