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

Add initialisation macro to baked output #4014

Merged
merged 10 commits into from
Sep 18, 2023

Conversation

robertbastian
Copy link
Member

@robertbastian robertbastian commented Sep 7, 2023

Fixes #3535

Manishearth
Manishearth previously approved these changes Sep 7, 2023
@@ -1,37 +1,18 @@
// @generated
include!("macros.rs");
/// Implement `DataProvider<M>` on the given struct using the data
Copy link
Member

Choose a reason for hiding this comment

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

Question: where did these docs go

Copy link
Member Author

Choose a reason for hiding this comment

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

I decided these should not be public, only locally usable.

Copy link
Member

Choose a reason for hiding this comment

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

Why did you decide that? I thought we had decided that these macros were public API of the data crates. We just talked about that together earlier this week.

Copy link
Member Author

Choose a reason for hiding this comment

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

They haven't been public before, and impl_data_provider doesn't work reexported because it cannot address the individual macros (well, it can, but then it wouldn't work locally anymore). AnyProvider can be implemented through the impl_dynamic_data_provider macro.

Copy link
Member

Choose a reason for hiding this comment

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

Oh I see, this is impl_data_provider. But shouldn't impl_any_provider still work reexported? It doesn't reference macros, only types. impl_dynamic_data_provider needs a list of keys.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think it should if impl_data_provider isn't. Remember we don't like AnyProviders anymore.

Copy link
Member

Choose a reason for hiding this comment

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

ok

components/calendar/data/data/macros.rs Outdated Show resolved Hide resolved
@@ -1,37 +1,18 @@
// @generated
include!("macros.rs");
/// Implement `DataProvider<M>` on the given struct using the data
Copy link
Member

Choose a reason for hiding this comment

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

ok

@robertbastian robertbastian merged commit 13b6b4e into unicode-org:main Sep 18, 2023
26 checks passed
@robertbastian robertbastian deleted the macro branch September 19, 2023 06:19
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.

Globaldata data location / data crate API guarantees
3 participants