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

Make HelloWorld DATA variable be non-pub #1962

Closed
sffc opened this issue May 28, 2022 · 5 comments
Closed

Make HelloWorld DATA variable be non-pub #1962

sffc opened this issue May 28, 2022 · 5 comments
Labels
blocked A dependency must be resolved before this is actionable C-data-infra Component: provider, datagen, fallback, adapters help wanted Issue needs an assignee S-tiny Size: Less than an hour (trivial fixes) T-bug Type: Bad behavior, security, privacy

Comments

@sffc
Copy link
Member

sffc commented May 28, 2022

Follow-up from #1947

The data provider APIs should be used to inspect the data. It should not be directly visible. The whole point of HelloWorldProvider is to allow for easy testing of the data provider APIs, and we should use them, not work around them.

CC @robertbastian

@sffc sffc added T-bug Type: Bad behavior, security, privacy C-data-infra Component: provider, datagen, fallback, adapters S-tiny Size: Less than an hour (trivial fixes) labels May 28, 2022
@robertbastian
Copy link
Member

We need some way to obtain the expected output of the provider. In the fs exporter test I do something like

for each language/value in HelloWorldProvider::DATA
  check that FsDataProvider returns value for language

I don't think we should be using IterableResourceProvider for this, as that's a datagen utility.

@sffc
Copy link
Member Author

sffc commented Jun 1, 2022

I think IterableResourceProvider is the right tool for the job.

I think it doesn't need to hide in the datagen feature?

@robertbastian
Copy link
Member

robertbastian commented Jun 2, 2022

Meanwhile, IterableProvider is and should continue to be a low-level trait with one purpose, to drive the data exporter.

- sffc, #1092 (comment)

That kind of implies gating it on the datagen feature.

@sffc
Copy link
Member Author

sffc commented Jun 2, 2022

OK. Well, #1092 is on my to-do list for the current milestone, and once that is fixed, then maybe we can drive HelloWorldProvider off of that instead of IterableResourceProvider.

@sffc sffc added the blocked A dependency must be resolved before this is actionable label Jun 9, 2022
@sffc sffc added this to the ICU4X 1.0 (Polish) milestone Jun 9, 2022
@sffc sffc added the help wanted Issue needs an assignee label Jun 9, 2022
@robertbastian
Copy link
Member

Fixed by #2152

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked A dependency must be resolved before this is actionable C-data-infra Component: provider, datagen, fallback, adapters help wanted Issue needs an assignee S-tiny Size: Less than an hour (trivial fixes) T-bug Type: Bad behavior, security, privacy
Projects
None yet
Development

No branches or pull requests

2 participants